diff mbox series

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

Message ID 20230325011734.507453-6-yebin@huaweicloud.com (mailing list archive)
State Superseded
Headers show
Series limit set the host state by sysfs | expand

Commit Message

Ye Bin March 25, 2023, 1:17 a.m. UTC
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 mbox series

Patch

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;
 }