Skip to content

Commit e66413f

Browse files
ptr324martinkpetersen
authored andcommitted
scsi: ufs: core: Remove dev cmd clock scaling busy
If a dev command times out, clk_scaling.active_reqs is not decreased which causes abnormal clock scaling. It is complicated to handle different dev command timeout cases in both legacy mode and MCQ mode. Besides, dev cmds are rarely used and the busy time is short. Remove clock scaling busy window for dev cmds like we do for UIC or TM cmds which don't update busy window either. Signed-off-by: Peter Wang <peter.wang@mediatek.com> Link: https://lore.kernel.org/r/20231004062454.29165-1-peter.wang@mediatek.com Reviewed-by: Stanley Chu <stanley.chu@mediatek.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 45e833f commit e66413f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/ufs/core/ufshcd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2165,7 +2165,8 @@ void ufshcd_send_command(struct ufs_hba *hba, unsigned int task_tag,
21652165
lrbp->compl_time_stamp = ktime_set(0, 0);
21662166
lrbp->compl_time_stamp_local_clock = 0;
21672167
ufshcd_add_command_trace(hba, task_tag, UFS_CMD_SEND);
2168-
ufshcd_clk_scaling_start_busy(hba);
2168+
if (lrbp->cmd)
2169+
ufshcd_clk_scaling_start_busy(hba);
21692170
if (unlikely(ufshcd_should_inform_monitor(hba, lrbp)))
21702171
ufshcd_start_monitor(hba, lrbp);
21712172

@@ -5401,7 +5402,6 @@ void ufshcd_compl_one_cqe(struct ufs_hba *hba, int task_tag,
54015402
lrbp->utr_descriptor_ptr->header.ocs = ocs;
54025403
}
54035404
complete(hba->dev_cmd.complete);
5404-
ufshcd_clk_scaling_update_busy(hba);
54055405
}
54065406
}
54075407
}

0 commit comments

Comments
 (0)