]> git.baikalelectronics.ru Git - kernel.git/commit
[SCSI] zfcp: Register SCSI devices after successful fc_remote_port_add
authorChristof Schmitt <christof.schmitt@de.ibm.com>
Thu, 8 Jul 2010 07:53:07 +0000 (09:53 +0200)
committerJames Bottomley <James.Bottomley@suse.de>
Wed, 28 Jul 2010 14:46:38 +0000 (09:46 -0500)
commit9a25580ed5fcffef349e8d9f66bc9e7b7d1499ec
tree46e13cf400f672eb7d26e6ffdb4c990256e18c76
parent5eee477163b6595fd4a966a981d0fc569bfdf101
[SCSI] zfcp: Register SCSI devices after successful fc_remote_port_add

When the successful return of an adisc is the final step to set the
port online, the registration of SCSI devices might be omitted. SCSI
devices that have been removed before (due to a short dev_loss_tmo
setting) might not be attached again.

The problem is that the registration of SCSI devices is done only
after erp has finished. The correct place would be after the call to
fc_remote_port_add to mimick the scan in the FC transport class.

Change the registration of SCSI devices to be triggered after the
fc_remote_port_add call. For the initial inquiry command to succeed,
the unit must also be open. If the unit reopen is still pending, the
inquiry command to the LUN will be deferred with DID_IMM_RETRY, so
there is no harm from this approach.

Reviewed-by: Swen Schillig <swen@vnet.ibm.com>
Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/s390/scsi/zfcp_aux.c
drivers/s390/scsi/zfcp_erp.c
drivers/s390/scsi/zfcp_ext.h
drivers/s390/scsi/zfcp_scsi.c
drivers/s390/scsi/zfcp_sysfs.c