aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi
diff options
context:
space:
mode:
authorChristof Schmitt <christof.schmitt@de.ibm.com>2008-11-04 10:35:10 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-11-05 12:47:19 -0500
commit77fd9494bce3188c20d82e45464ed9b1be83bf98 (patch)
treefde00a1b349fa77a478aadb62bf91f24e63f257e /drivers/s390/scsi
parentadc90daffbb454eeae00df92855a88ba79b5b636 (diff)
[SCSI] zfcp: Wait for port scan to complete when setting adapter online
Attaching a unit immediately after setting the adapter online should be possible. The problem right now is that the port_scan runs from a workqueue and has not finished when the set_online call returns and the sysfs structures for the ports are not available yet. Fix that by waiting for the port scan to complete. Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/s390/scsi')
-rw-r--r--drivers/s390/scsi/zfcp_ccw.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/s390/scsi/zfcp_ccw.c b/drivers/s390/scsi/zfcp_ccw.c
index b04038c74786..951a8d409d1d 100644
--- a/drivers/s390/scsi/zfcp_ccw.c
+++ b/drivers/s390/scsi/zfcp_ccw.c
@@ -116,7 +116,9 @@ static int zfcp_ccw_set_online(struct ccw_device *ccw_device)
116 zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, 85, 116 zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, 85,
117 NULL); 117 NULL);
118 zfcp_erp_wait(adapter); 118 zfcp_erp_wait(adapter);
119 goto out; 119 up(&zfcp_data.config_sema);
120 flush_work(&adapter->scan_work);
121 return 0;
120 122
121 out_scsi_register: 123 out_scsi_register:
122 zfcp_erp_thread_kill(adapter); 124 zfcp_erp_thread_kill(adapter);