WSL2-Linux-Kernel/drivers/scsi/ufs
Can Guo ce4f62f9dd scsi: ufs: core: Narrow down fast path in system suspend path
If spm_lvl is set to 0 or 1, when system suspend kicks start and HBA is
runtime active, system suspend may just bail without doing anything (the
fast path), leaving other contexts still running, e.g., clock gating and
clock scaling. When system resume kicks start, concurrency can happen
between ufshcd_resume() and these contexts, leading to various stability
issues.

Add a check against HBA's runtime state and allowing fast path only if HBA
is runtime suspended, otherwise let system suspend go ahead call
ufshcd_suspend(). This will guarantee that these contexts are stopped by
either runtime suspend or system suspend.

Link: https://lore.kernel.org/r/1619408921-30426-4-git-send-email-cang@codeaurora.org
Fixes: 0b25773434 ("scsi: ufs: optimize system suspend handling")
Reviewed-by: Daejun Park <daejun7.park@samsung.com>
Signed-off-by: Can Guo <cang@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2021-04-28 23:15:18 -04:00
..
Kconfig
Makefile
cdns-pltfrm.c
tc-dwc-g210-pci.c
tc-dwc-g210-pltfrm.c
tc-dwc-g210.c
tc-dwc-g210.h
ti-j721e-ufs.c
ufs-debugfs.c
ufs-debugfs.h
ufs-exynos.c
ufs-exynos.h
ufs-hisi.c
ufs-hisi.h
ufs-mediatek-trace.h
ufs-mediatek.c
ufs-mediatek.h
ufs-qcom-ice.c
ufs-qcom.c scsi: ufs: ufs-qcom: Remove redundant dev_err() call in ufs_qcom_init() 2021-04-12 23:25:30 -04:00
ufs-qcom.h
ufs-sysfs.c scsi: ufs: core: Fix a typo in ufs-sysfs.c 2021-04-28 22:55:00 -04:00
ufs-sysfs.h
ufs.h
ufs_bsg.c
ufs_bsg.h
ufs_quirks.h
ufshcd-crypto.c
ufshcd-crypto.h
ufshcd-dwc.c
ufshcd-dwc.h
ufshcd-pci.c
ufshcd-pltfrm.c scsi: ufs: ufshcd-pltfrm: Fix deferred probing 2021-04-13 00:14:34 -04:00
ufshcd-pltfrm.h
ufshcd.c scsi: ufs: core: Narrow down fast path in system suspend path 2021-04-28 23:15:18 -04:00
ufshcd.h
ufshci-dwc.h
ufshci.h
unipro.h