summaryrefslogtreecommitdiff
path: root/drivers/ufs/core
diff options
context:
space:
mode:
authorPeter Wang <peter.wang@mediatek.com>2023-08-31 16:08:24 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2023-10-13 20:16:09 +0300
commit1d969731b87f122108c50a64acfdbaa63486296e (patch)
tree24a2e18e59edcc7d59ef5aa2244f6b4412f62fc3 /drivers/ufs/core
parentb6f2e063017b92491976a40c32a0e4b3c13e7d2f (diff)
downloadlinux-1d969731b87f122108c50a64acfdbaa63486296e.tar.xz
scsi: ufs: core: Only suspend clock scaling if scaling down
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. Signed-off-by: Peter Wang <peter.wang@mediatek.com> Link: https://lore.kernel.org/r/20230831130826.5592-2-peter.wang@mediatek.com Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/ufs/core')
-rw-r--r--drivers/ufs/core/ufshcd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index c45737c5adb9..c6c53bdd3e43 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -1430,7 +1430,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);