summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Palomares <paillon@google.com>2021-07-21 18:37:58 -0700
committerVincent Palomares <paillon@google.com>2021-07-28 20:44:10 +0000
commitbca7a1ca1ee565d844d1db3a94aee4601e802491 (patch)
tree1d0581afb87c3c47f599830028bda590f8d0520f
parentb5483713786b8120d47aa9c56141db559dde2b2e (diff)
downloadcommon-bca7a1ca1ee565d844d1db3a94aee4601e802491.tar.gz
FROMLIST: 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@google.com> Cc: Jaegeuk Kim <jaegeuk@kernel.org> Cc: Bart Van Assche <bvanassche@acm.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Stanley Chu <stanley.chu@mediatek.com> Cc: Can Guo <cang@codeaurora.org> Cc: Asutosh Das <asutoshd@codeaurora.org> Cc: Avri Altman <avri.altman@wdc.com> Cc: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Vincent Palomares <paillon@google.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Vincent Palomares <paillon@google.com> Link: https://lore.kernel.org/linux-scsi/a7091f96-12a3-a244-040a-c41a7c5e3617@acm.org/T/#t Bug: 194213025 Change-Id: I46ff584d3a1342ab3b26ffdf196e7a65637294f3
-rw-r--r--drivers/scsi/ufs/ufshcd.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index 17103807d7f6..ca590891da1f 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -9541,6 +9541,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);
+ device_enable_async_suspend(dev);
return 0;
free_tmf_queue: