summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wang <peter.wang@mediatek.com>2026-02-10 14:41:43 +0800
committerMartin K. Petersen <martin.petersen@oracle.com>2026-02-24 13:40:01 -0500
commit01517654bc258efb2610e53e99fa4ef641d134b9 (patch)
tree03d3373c93e785355fa82f53a5c9adaf7a8d7624
parent931c105de11c2e0e9675fbc061b16a9c5f134dcf (diff)
scsi: ufs: core: Add debug log for UIC command timeout
It is difficult to debug when a UIC command timeout occurs simultaneously with a UIC command complete interrupt. Currently, we only see the timeout log without any debug information, making it unclear whether the UFS device failed to respond or the host entered an incorrect state. Add a one-line log to cover this situation. Signed-off-by: Peter Wang <peter.wang@mediatek.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Link: https://patch.msgid.link/20260210070837.1820710-2-peter.wang@mediatek.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/ufs/core/ufshcd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index 847b55789bb8..017d05ef94e2 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -5568,8 +5568,11 @@ static irqreturn_t ufshcd_uic_cmd_compl(struct ufs_hba *hba, u32 intr_status)
guard(spinlock_irqsave)(hba->host->host_lock);
cmd = hba->active_uic_cmd;
- if (!cmd)
+ if (!cmd) {
+ dev_err(hba->dev,
+ "No active UIC command. Maybe a timeout occurred?\n");
return retval;
+ }
if (ufshcd_is_auto_hibern8_error(hba, intr_status))
hba->errors |= (UFSHCD_UIC_HIBERN8_MASK & intr_status);