Skip to content

Commit 2e083cd

Browse files
anvithdosapatimartinkpetersen
authored andcommitted
scsi: ufs: core: Fix clk scaling to be conditional in reset and restore
In ufshcd_host_reset_and_restore(), scale up clocks only when clock scaling is supported. Without this change CPU latency is voted for 0 (ufshcd_pm_qos_update) during resume unconditionally. Signed-off-by: anvithdosapati <[email protected]> Link: https://lore.kernel.org/r/[email protected] Fixes: a3cd5ec ("scsi: ufs: add load based scaling of UFS gear") Cc: [email protected] Reviewed-by: Bart Van Assche <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
1 parent 752eb81 commit 2e083cd

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/ufs/core/ufshcd.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7807,7 +7807,8 @@ static int ufshcd_host_reset_and_restore(struct ufs_hba *hba)
78077807
hba->silence_err_logs = false;
78087808

78097809
/* scale up clocks to max frequency before full reinitialization */
7810-
ufshcd_scale_clks(hba, ULONG_MAX, true);
7810+
if (ufshcd_is_clkscaling_supported(hba))
7811+
ufshcd_scale_clks(hba, ULONG_MAX, true);
78117812

78127813
err = ufshcd_hba_enable(hba);
78137814

0 commit comments

Comments
 (0)