[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210728012743.1063928-1-paillon@google.com>
Date: Tue, 27 Jul 2021 18:27:43 -0700
From: Vincent Palomares <paillon@...gle.com>
To: linux-kernel@...r.kernel.org, linux-scsi@...r.kernel.org
Cc: Vincent Palomares <paillon@...gle.com>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Jaegeuk Kim <jaegeuk@...nel.org>,
Bart Van Assche <bvanassche@....org>,
Adrian Hunter <adrian.hunter@...el.com>,
Stanley Chu <stanley.chu@...iatek.com>,
Can Guo <cang@...eaurora.org>,
Asutosh Das <asutoshd@...eaurora.org>,
Avri Altman <avri.altman@....com>,
"Martin K . Petersen" <martin.petersen@...cle.com>
Subject: [PATCH] scsi: ufs: Allow async suspend/resume callbacks
Allow UFS suspend/resume callbacks to run in parallel with other
suspend/resume callbacks. This can recoup dozens of milliseconds on the
resume path if UFS hardware needs to be powered back on.
Suspending and resuming asynchronously is safe to do so long as the driver
callbacks only depend on resources made available by either a) parent
devices or b) devices explicitly marked as suppliers with device_link_add.
Cc: Bjorn Helgaas <bhelgaas@...gle.com>
Cc: Jaegeuk Kim <jaegeuk@...nel.org>
Cc: Bart Van Assche <bvanassche@....org>
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: Stanley Chu <stanley.chu@...iatek.com>
Cc: Can Guo <cang@...eaurora.org>
Cc: Asutosh Das <asutoshd@...eaurora.org>
Cc: Avri Altman <avri.altman@....com>
Cc: Martin K. Petersen <martin.petersen@...cle.com>
Signed-off-by: Vincent Palomares <paillon@...gle.com>
---
Are there any suspend/resume dependencies for UFS drivers not tracked by
the device parent relationship?
drivers/scsi/ufs/ufshcd.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index b87ff68aa9aa..9ec5c308a0ea 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -9625,6 +9625,7 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)
async_schedule(ufshcd_async_scan, hba);
ufs_sysfs_add_nodes(hba->dev);
+ device_enable_async_suspend(dev);
return 0;
free_tmf_queue:
--
2.32.0.432.gabb21c7263-goog
Powered by blists - more mailing lists