[PATCH 5/5] scsi: run queue after set host state from blocked to running

Ye Bin posted 5 patches 2 years, 10 months ago
There is a newer version of this series
[PATCH 5/5] scsi: run queue after set host state from blocked to running
Posted by Ye Bin 2 years, 10 months ago
From: Ye Bin <yebin10@huawei.com>

As when host is blocked, all request is blocked. After set the host
state with running, e will need to ensure that these requests are
started.

Signed-off-by: Ye Bin <yebin10@huawei.com>
---
 drivers/scsi/scsi_sysfs.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c
index 42c5936c7711..202d58f4f267 100644
--- a/drivers/scsi/scsi_sysfs.c
+++ b/drivers/scsi/scsi_sysfs.c
@@ -229,6 +229,9 @@ store_shost_state(struct device *dev, struct device_attribute *attr,
 	}
 	spin_unlock_irqrestore(shost->host_lock, flags);
 
+	if (old_state == SHOST_BLOCKED && state == SHOST_RUNNING)
+		scsi_run_host_queues(shost);
+
 	return count;
 }
 
-- 
2.31.1