>From d0b7698dda596831aa6a7efca1075a231f1ac5db Mon Sep 17 00:00:00 2001 From: Ken Xue <Ken.Xue@xxxxxxx> Date: Wed, 9 Sep 2015 17:36:59 +0800 Subject: [PATCH] SCSI:Fix rpm_status of request_queue in S3 resume of SCSI device rpm_status of the request_queue is set to be RPM_SUSPENDED in runtime suspend before S3. But there is a chance that rpm_status is not recovered to be RPM_ACTIVE after S3 resume even the power status of device already became active. This leads to new request in request_queue cannot be handled and device cannot goto runtime suspend anymore. So, if device is suspended, keep this status until status of request_queue and device all can be updated. Signed-off-by: Ken Xue <Ken.Xue@xxxxxxx> --- drivers/scsi/scsi_pm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/scsi_pm.c b/drivers/scsi/scsi_pm.c index e4b7998..cfda027 100644 --- a/drivers/scsi/scsi_pm.c +++ b/drivers/scsi/scsi_pm.c @@ -110,7 +110,8 @@ scsi_bus_suspend_common(struct device *dev, static void async_sdev_resume(void *dev, async_cookie_t cookie) { - scsi_dev_type_resume(dev, do_scsi_resume); + if (!pm_runtime_suspended(dev)) + scsi_dev_type_resume(dev, do_scsi_resume); } static void async_sdev_thaw(void *dev, async_cookie_t cookie) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html