diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2021-08-11 22:37:22 -0400 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-08-11 22:37:22 -0400 |
commit | 315480209b8e1032e63c70dafc8f4133b3c9a333 (patch) | |
tree | a99d5b3c2c1afb3d2ab47f77ecf4e933cd00715d /drivers/scsi/scsi_sysfs.c | |
parent | 4cc0096e2d54bc31ead127be59e3a2d02a187ac9 (diff) | |
parent | f0f82e2476f6adb9c7a0135cfab8091456990c99 (diff) | |
download | linux-315480209b8e1032e63c70dafc8f4133b3c9a333.tar.bz2 |
Merge branch '5.14/scsi-fixes' into 5.15/scsi-staging
Resolve mpt3sas conflict between 5.14/scsi-fixes and 5.15/scsi-staging
reported by sfr.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/scsi_sysfs.c')
-rw-r--r-- | drivers/scsi/scsi_sysfs.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index 07cee8dc4100..c3a710bceba0 100644 --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c @@ -808,11 +808,14 @@ store_state_field(struct device *dev, struct device_attribute *attr, mutex_lock(&sdev->state_mutex); ret = scsi_device_set_state(sdev, state); /* - * If the device state changes to SDEV_RUNNING, we need to run - * the queue to avoid I/O hang. + * If the device state changes to SDEV_RUNNING, we need to + * rescan the device to revalidate it, and run the queue to + * avoid I/O hang. */ - if (ret == 0 && state == SDEV_RUNNING) + if (ret == 0 && state == SDEV_RUNNING) { + scsi_rescan_device(dev); blk_mq_run_hw_queues(sdev->request_queue, true); + } mutex_unlock(&sdev->state_mutex); return ret == 0 ? count : -EINVAL; |