Thread (5 messages) 5 messages, 3 authors, 2021-07-30

RE: [PATCH] scsi: ufs: Allow async suspend/resume callbacks

From: Avri Altman <Avri.Altman@wdc.com>
Date: 2021-07-30 18:17:09
Also in: lkml

On 7/28/21 11:48 PM, Avri Altman wrote:
quoted
Vincent wrote:
quoted
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;
Isn't device_enable_async_suspend is being called for each lun in
scsi_sysfs_add_sdev Anyway?

Hi Avri,

Our measurements have shown that resume takes longer than it should with
encryption enabled. While suspending we change the power mode of the UFS
device to a mode in which it loses crypto keys. Restoring crypto keys
during resume (blk_ksm_reprogram_all_keys()) takes about 31 ms. This is
the long pole and takes much more time than resuming LUNs. This patch
makes UFS resume happen concurrently with resuming other devices in the
system instead of serializing it. Measurements have shown that this
patch significantly improves the time needed to resume an Android device.
OK.
Thanks for the extra info.

Thanks,
Avri
Bart.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help