]> git.baikalelectronics.ru Git - kernel.git/commit
[SCSI] fc class: fix scanning when devs are offline
authorMike Christie <michaelc@cs.wisc.edu>
Mon, 16 Apr 2012 02:47:50 +0000 (21:47 -0500)
committerJames Bottomley <JBottomley@Parallels.com>
Thu, 10 May 2012 07:59:23 +0000 (08:59 +0100)
commitb2f8d7df41dc93b3a76e6f508c6a1c45a25832bd
treeb10e8bc41a7d643a47dce1ac99567f4919e0a9fd
parentd25b177539ce31830cf4861bb01efba785e471c3
[SCSI] fc class: fix scanning when devs are offline

When a rport is added back or the role is changed the fc class
will queue a scan and then call scsi_target_unblock. The problem
with this is if the devices are in the SDEV_OFFLINE state and
the scan is run before the scsi_target_unblock, then the scan
will see LUN0 as offline and the scan will fail. This patch moves
the unblock call to before the scan, so we know the device state
will be set correctly when the scan is run.

Signed-off-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/scsi_transport_fc.c