summaryrefslogtreecommitdiff
path: root/drivers/scsi/scsi_sysfs.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-04-01 08:40:47 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-04-01 08:40:47 +0300
commitb63d443be43bd64392fc72f6cae01249c3c3683e (patch)
treeb332614cc725ce0fe8fae16c7f262e9e8501fd29 /drivers/scsi/scsi_sysfs.c
parent0eae4686a128d87503863a261e84887750c8bc68 (diff)
parent79a3aaa7b82e3106be97842dedfd8429248896e6 (diff)
downloadlinux-b63d443be43bd64392fc72f6cae01249c3c3683e.tar.xz
Merge 5.1-rc3 into tty-next
We want the tty/serial fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/scsi/scsi_sysfs.c')
-rw-r--r--drivers/scsi/scsi_sysfs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 6a9040faed00..3b119ca0cc0c 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -771,6 +771,12 @@ 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 (ret == 0 && state == SDEV_RUNNING)
+ blk_mq_run_hw_queues(sdev->request_queue, true);
mutex_unlock(&sdev->state_mutex);
return ret == 0 ? count : -EINVAL;