diff options
author | Vikas Chaudhary <vikas.chaudhary@qlogic.com> | 2012-08-09 04:51:30 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-09-14 17:59:22 +0100 |
commit | 0e58076b376824875e7e509b8dd352377a41cbbc (patch) | |
tree | 16fbdeac0d12c1284c935762e69de13230aa9a08 /drivers/scsi/scsi_lib.c | |
parent | d53efb9d518fbc795f79c676649e0ba311838e3a (diff) | |
download | linux-3.10-0e58076b376824875e7e509b8dd352377a41cbbc.tar.gz linux-3.10-0e58076b376824875e7e509b8dd352377a41cbbc.tar.bz2 linux-3.10-0e58076b376824875e7e509b8dd352377a41cbbc.zip |
[SCSI] scsi_lib: Set the device state from transport-offline to running
FC and iSCSI class set SCSI devices to transport-offline state after
fast_io_fail/replacement_timeout has fired, but after relogin, function
scsi_internal_device_unblock() is not setting scsi device state to running.
Due to this the devices even after being relogged in remain offline.
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index ffd77739ae3..4ba37198e06 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -2470,7 +2470,8 @@ scsi_internal_device_unblock(struct scsi_device *sdev, * Try to transition the scsi device to SDEV_RUNNING or one of the * offlined states and goose the device queue if successful. */ - if (sdev->sdev_state == SDEV_BLOCK) + if ((sdev->sdev_state == SDEV_BLOCK) || + (sdev->sdev_state == SDEV_TRANSPORT_OFFLINE)) sdev->sdev_state = new_state; else if (sdev->sdev_state == SDEV_CREATED_BLOCK) { if (new_state == SDEV_TRANSPORT_OFFLINE || |