6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: liuderong <liuderong@xxxxxxxx> commit f103396ae31851d00b561ff9f8a32a441953ff8b upstream. lrbp->compl_time_stamp_local_clock is set to zero after sending a sqe but it is not updated after completing a cqe. Thus the printed information in ufshcd_print_tr() will always be zero. Update lrbp->cmpl_time_stamp_local_clock after completing a cqe. Log sample: ufshcd-qcom 1d84000.ufshc: UPIU[8] - issue time 8750227249 us ufshcd-qcom 1d84000.ufshc: UPIU[8] - complete time 0 us Fixes: c30d8d010b5e ("scsi: ufs: core: Prepare for completion in MCQ") Reviewed-by: Bean Huo <beanhuo@xxxxxxxxxx> Reviewed-by: Peter Wang <peter.wang@xxxxxxxxxxxx> Signed-off-by: liuderong <liuderong@xxxxxxxx> Link: https://lore.kernel.org/r/1733470182-220841-1-git-send-email-liuderong@xxxxxxxx Reviewed-by: Avri Altman <avri.altman@xxxxxxx> Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/ufs/core/ufshcd.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/ufs/core/ufshcd.c +++ b/drivers/ufs/core/ufshcd.c @@ -5566,6 +5566,7 @@ void ufshcd_compl_one_cqe(struct ufs_hba lrbp = &hba->lrb[task_tag]; lrbp->compl_time_stamp = ktime_get(); + lrbp->compl_time_stamp_local_clock = local_clock(); cmd = lrbp->cmd; if (cmd) { if (unlikely(ufshcd_should_inform_monitor(hba, lrbp)))