diff options
author | Swen Schillig <swen@vnet.ibm.com> | 2009-04-17 09:08:04 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2009-04-27 11:07:26 -0400 |
commit | 92d5193b467c68e8432d6878980621c787e735af (patch) | |
tree | f38286d32216e23adfd4f8a8dc0e8ef152cd4de4 /drivers/s390/scsi/zfcp_aux.c | |
parent | ada81b748b768eb5b75567fd1db5e87ba5c98bf0 (diff) |
[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) | |||
97 | ccw_device_set_online(adapter->ccw_device); | 97 | ccw_device_set_online(adapter->ccw_device); |
98 | 98 | ||
99 | zfcp_erp_wait(adapter); | 99 | zfcp_erp_wait(adapter); |
100 | wait_event(adapter->erp_done_wqh, | 100 | flush_work(&unit->scsi_work); |
101 | !(atomic_read(&unit->status) & | ||
102 | ZFCP_STATUS_UNIT_SCSI_WORK_PENDING)); | ||
103 | 101 | ||
104 | down(&zfcp_data.config_sema); | 102 | down(&zfcp_data.config_sema); |
105 | zfcp_unit_put(unit); | 103 | zfcp_unit_put(unit); |
@@ -279,6 +277,7 @@ struct zfcp_unit *zfcp_unit_enqueue(struct zfcp_port *port, u64 fcp_lun) | |||
279 | 277 | ||
280 | atomic_set(&unit->refcount, 0); | 278 | atomic_set(&unit->refcount, 0); |
281 | init_waitqueue_head(&unit->remove_wq); | 279 | init_waitqueue_head(&unit->remove_wq); |
280 | INIT_WORK(&unit->scsi_work, zfcp_scsi_scan); | ||
282 | 281 | ||
283 | unit->port = port; | 282 | unit->port = port; |
284 | unit->fcp_lun = fcp_lun; | 283 | unit->fcp_lun = fcp_lun; |