]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: ufs: core: Correct ufshcd_shutdown() flow
authorPeter Wang <peter.wang@mediatek.com>
Wed, 27 Jul 2022 03:05:26 +0000 (11:05 +0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 1 Aug 2022 23:32:44 +0000 (19:32 -0400)
commit59d93813c1b2b77b3ab69deeb2a1942e7523b0f5
tree803a081b39d31d5783f7beb4caf4704ec4fa429b
parent762ad932e2042cb558ee1d0e20755f78e5f7c4d9
scsi: ufs: core: Correct ufshcd_shutdown() flow

After ufshcd_wl_shutdown() set device power off and link off,
ufshcd_shutdown() could turn off clock/power. Also remove
pm_runtime_get_sync.

The reason why it is safe to remove pm_runtime_get_sync() is because:

 - ufshcd_wl_shutdown() -> pm_runtime_get_sync() will resume hba->dev too.

 - device resume(turn on clk/power) is not required, even if device is in
   RPM_SUSPENDED.

Link: https://lore.kernel.org/r/20220727030526.31022-1-peter.wang@mediatek.com
Fixes: 1799d66d7dd4 ("scsi: ufs: core: Enable power management for wlun")
Cc: <stable@vger.kernel.org> # 5.15.x
Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Peter Wang <peter.wang@mediatek.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/core/ufshcd.c