Skip to content

Commit

Permalink
[SCSI] zfcp: Wait for port scan to complete when setting adapter online
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Christof Schmitt authored and James Bottomley committed Nov 5, 2008
1 parent adc90da commit 77fd949
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/s390/scsi/zfcp_ccw.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ static int zfcp_ccw_set_online(struct ccw_device *ccw_device)
zfcp_erp_adapter_reopen(adapter, ZFCP_STATUS_COMMON_ERP_FAILED, 85,
NULL);
zfcp_erp_wait(adapter);
goto out;
up(&zfcp_data.config_sema);
flush_work(&adapter->scan_work);
return 0;

out_scsi_register:
zfcp_erp_thread_kill(adapter);
Expand Down

0 comments on commit 77fd949

Please sign in to comment.