diff options
author | Can Guo <cang@codeaurora.org> | 2021-04-25 20:48:40 -0700 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-04-28 23:15:18 -0400 |
commit | ce4f62f9dd8cf43ac044045ed598a0b80ef33890 (patch) | |
tree | 523db6cfaa6cc77d8e91de675f68b2d853cb91bc /fs/jfs/jfs_xtree.h | |
parent | 637822e63b79ee8a729f7ba2645a26cf5a524ee4 (diff) | |
download | linux-ce4f62f9dd8cf43ac044045ed598a0b80ef33890.tar.bz2 |
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: 0b257734344a ("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>
Diffstat (limited to 'fs/jfs/jfs_xtree.h')
0 files changed, 0 insertions, 0 deletions