From: Andreas Herrmann Date: Sat, 11 Feb 2006 00:43:55 +0000 (+0100) Subject: [SCSI] zfcp: fix: avoid race between fc_remote_port_add and scsi_add_device X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=61c41823c50302ca6cd455c48a1395f944c61f8f;p=openwrt%2Fstaging%2Fblogic.git [SCSI] zfcp: fix: avoid race between fc_remote_port_add and scsi_add_device Flush workqueue of a scsi host after a remote port for that host is registered at the fc transport class. Otherwise immediate registration of a scsi device on that host is racy. Signed-off-by: Andreas Herrmann Signed-off-by: James Bottomley --- diff --git a/drivers/s390/scsi/zfcp_erp.c b/drivers/s390/scsi/zfcp_erp.c index 8ed6fcb41653..e3c4bdd29a60 100644 --- a/drivers/s390/scsi/zfcp_erp.c +++ b/drivers/s390/scsi/zfcp_erp.c @@ -3415,6 +3415,8 @@ zfcp_erp_action_cleanup(int action, struct zfcp_adapter *adapter, "(adapter %s, wwpn=0x%016Lx)\n", zfcp_get_busid_by_port(port), port->wwpn); + else + scsi_flush_work(adapter->scsi_host); } zfcp_port_put(port); break;