ufs: core: only suspend clock scaling if scale down
Subsystems (4)
PATCH 1/1 ufs: core: only suspend clock scaling if scale down
From: Peter Wang <[email protected]>
If clock scale up and suspend clock scaling, ufs will keep high performance/power mode but no read/write requests on going. It is logic wrong and have power concern.
--- drivers/ufs/core/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ufs/core/ufshcd.c +1 -1
@@ -1458,7 +1458,7 @@ static int ufshcd_devfreq_target(struct device *dev, ktime_to_us(ktime_sub(ktime_get(), start)), ret); out: -if (sched_clk_scaling_suspend_work) +if (sched_clk_scaling_suspend_work && !scale_up)queue_work (hba->clk_scaling.workq, &hba->clk_scaling.suspend_work);
Signature · 1 line
2.18.0
Hi all,
Gentle ping for this bug fix review.
Thanks.
Quoted 28 lines · On Tue, 2023-08-01 at 21:34 +0800, [email protected] wrote:
From: Peter Wang <[email protected]>
If clock scale up and suspend clock scaling, ufs will keep high performance/power mode but no read/write requests on going. It is logic wrong and have power concern.
Fixes 401f1e4490ee ("scsi: ufs: don't suspend clock scaling duringclock gating")
Cc <[email protected]>Signed-off-by Peter Wang <[email protected]>--- drivers/ufs/core/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/ufs/core/ufshcd.c +1
-1@@ -1458,7 +1458,7 @@ static int ufshcd_devfreq_target(struct device *dev, ktime_to_us(ktime_sub(ktime_get(), start)), ret); out: -if (sched_clk_scaling_suspend_work) +if (sched_clk_scaling_suspend_work && !scale_up)queue_work (hba->clk_scaling.workq, &hba->clk_scaling.suspend_work);
Quoted 18 lines · On 8/1/23 06:34, [email protected] wrote:
From: Peter Wang <[email protected]>
If clock scale up and suspend clock scaling, ufs will keep high performance/power mode but no read/write requests on going. It is logic wrong and have power concern.
Fixes 401f1e4490ee ("scsi: ufs: don't suspend clock scaling during clock gating")Cc <[email protected]>Signed-off-by Peter Wang <[email protected]>--- drivers/ufs/core/ufshcd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/ufs/core/ufshcd.c +0
-0
drivers/ufs/core/ufshcd.c static int ufshcd_devfreq_target(struct device *dev, · line 1463
Quoted 7 lines
drivers/ufs/core/ufshcd.c +1
-1@@ -1458,7 +1458,7 @@ static int ufshcd_devfreq_target(struct device *dev, ktime_to_us(ktime_sub(ktime_get(), start)), ret); out: -if (sched_clk_scaling_suspend_work) +if (sched_clk_scaling_suspend_work && !scale_up)queue_work (hba->clk_scaling.workq, &hba->clk_scaling.suspend_work);