[PATCH v1 2/2] ufs: core: add debug log for mcq commnad timoeut

peter.wang at mediatek.com peter.wang at mediatek.com
Mon Feb 9 00:28:48 PST 2026


From: Peter Wang <peter.wang at mediatek.com>

It is difficult to debug situations where a mcq command timeout
occurs, the corresponding CQ tag response is received, but the
request is not completed.
Add a one-line log to indicate when the CQ entry is abnormal.

Signed-off-by: Peter Wang <peter.wang at mediatek.com>
---
 drivers/ufs/core/ufs-mcq.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/ufs/core/ufs-mcq.c b/drivers/ufs/core/ufs-mcq.c
index 9ab91b4c05b0..ad0ada57959a 100644
--- a/drivers/ufs/core/ufs-mcq.c
+++ b/drivers/ufs/core/ufs-mcq.c
@@ -301,6 +301,8 @@ static void ufshcd_mcq_process_cqe(struct ufs_hba *hba,
 		ufshcd_compl_one_cqe(hba, tag, cqe);
 		/* After processed the cqe, mark it empty (invalid) entry */
 		cqe->command_desc_base_addr = 0;
+	} else {
+		dev_err(hba->dev, "Abnormal CQ entry!\n");
 	}
 }
 
-- 
2.45.2




More information about the Linux-mediatek mailing list