diff options
author | Swen Schillig <swen@vnet.ibm.com> | 2009-04-17 15:08:04 +0200 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-04-27 10:07:26 -0500 |
commit | 92d5193b467c68e8432d6878980621c787e735af (patch) | |
tree | f38286d32216e23adfd4f8a8dc0e8ef152cd4de4 /drivers/s390/scsi/zfcp_aux.c | |
parent | ada81b748b768eb5b75567fd1db5e87ba5c98bf0 (diff) | |
download | blackbird-op-linux-92d5193b467c68e8432d6878980621c787e735af.tar.gz blackbird-op-linux-92d5193b467c68e8432d6878980621c787e735af.zip |
[SCSI] zfcp: Dont block zfcp_wq with scan
When running the scsi_scan from the zfcp workqueue and the target
device does not respond, the zfcp workqueue can block until the
scsi_scan hits a timeout. Move the work to the scsi host workqueue,
since this one is also used for the scan from the SCSI midlayer.
Signed-off-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/s390/scsi/zfcp_aux.c')
-rw-r--r-- | drivers/s390/scsi/zfcp_aux.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/s390/scsi/zfcp_aux.c b/drivers/s390/scsi/zfcp_aux.c index 616c60ffcf2c..5a01ef9aeb66 100644 --- a/drivers/s390/scsi/zfcp_aux.c +++ b/drivers/s390/scsi/zfcp_aux.c @@ -97,9 +97,7 @@ static void __init zfcp_init_device_configure(char *busid, u64 wwpn, u64 lun) ccw_device_set_online(adapter->ccw_device); zfcp_erp_wait(adapter); - wait_event(adapter->erp_done_wqh, - !(atomic_read(&unit->status) & - ZFCP_STATUS_UNIT_SCSI_WORK_PENDING)); + flush_work(&unit->scsi_work); down(&zfcp_data.config_sema); zfcp_unit_put(unit); @@ -279,6 +277,7 @@ struct zfcp_unit *zfcp_unit_enqueue(struct zfcp_port *port, u64 fcp_lun) atomic_set(&unit->refcount, 0); init_waitqueue_head(&unit->remove_wq); + INIT_WORK(&unit->scsi_work, zfcp_scsi_scan); unit->port = port; unit->fcp_lun = fcp_lun; |