]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: ufs: Let devices remain runtime suspended during system suspend
authorAdrian Hunter <adrian.hunter@intel.com>
Wed, 27 Oct 2021 13:06:14 +0000 (16:06 +0300)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 30 Nov 2021 03:37:04 +0000 (22:37 -0500)
commited247b7df23deb66937a101eddecb306bd5ac760
tree8f64fa994690f7ced58bdeb48f63167013569204
parent0bc11d4599931278b98c568a43b48b12db8b186d
scsi: ufs: Let devices remain runtime suspended during system suspend

If the UFS Device WLUN is runtime suspended and is in the same power mode,
link state, and b_rpm_dev_flush_capable (BKOP or WB buffer flush etc)
state, then it can remain runtime suspended instead of being runtime
resumed and then system suspended.

The following patch has cleared the way for that to happen:

  scsi: core: pm: Only runtime resume if necessary

So amend the logic accordingly.

Note, the ufs-hisi driver uses different RPM and SPM, but it is made
explicit by a new parameter to suspend prepare.

Link: https://lore.kernel.org/r/20211027130614.406985-2-adrian.hunter@intel.com
Reviewed-by: Asutosh Das <asutoshd@codeaurora.org>
Reviewed-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufs-hisi.c
drivers/scsi/ufs/ufshcd.c
drivers/scsi/ufs/ufshcd.h