From: Christof Schmitt <christof.schmitt@xxxxxxxxxx> 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@xxxxxxxxxx> Signed-off-by: Swen Schillig <swen@xxxxxxxxxxxx> --- drivers/s390/scsi/zfcp_ccw.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/s390/scsi/zfcp_ccw.c 2008-11-04 14:44:04.000000000 +0100 +++ b/drivers/s390/scsi/zfcp_ccw.c 2008-11-04 14:44:27.000000000 +0100 @@ -116,7 +116,9 @@ static int zfcp_ccw_set_online(struct cc 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); -- -- To unsubscribe from this list: send the line "unsubscribe linux-s390" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html