Skip to content

Commit 1d96973

Browse files
ptr324martinkpetersen
authored andcommitted
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>
1 parent b6f2e06 commit 1d96973

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/ufs/core/ufshcd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1430,7 +1430,7 @@ static int ufshcd_devfreq_target(struct device *dev,
14301430
ktime_to_us(ktime_sub(ktime_get(), start)), ret);
14311431

14321432
out:
1433-
if (sched_clk_scaling_suspend_work)
1433+
if (sched_clk_scaling_suspend_work && !scale_up)
14341434
queue_work(hba->clk_scaling.workq,
14351435
&hba->clk_scaling.suspend_work);
14361436

0 commit comments

Comments
 (0)