From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Peter Wang <peter.wang@mediatek.com>,
Bart Van Assche <bvanassche@acm.org>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Sasha Levin <sashal@kernel.org>
Subject: [PATCH 6.6.y 3/5] scsi: ufs: core: Add debug log for MCQ command timeout
Date: Tue, 13 Oct 2026 12:01:33 -0400 [thread overview]
Message-ID: <20261013160048.356245-3-sashal@kernel.org> (raw)
In-Reply-To: <20261013160048.356245-1-sashal@kernel.org>
From: Peter Wang <peter.wang@mediatek.com>
[ Upstream commit 3abe4113e784b4a1135fe0e89828afecbfebf862 ]
It is difficult to debug situations where an 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@mediatek.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20260210070837.1820710-3-peter.wang@mediatek.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Stable-dep-of: 375f3a5691dd ("scsi: ufs: core: Avoid unsafe MMIO reads in ufshcd_mcq_compl_all_cqes_lock()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
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 90314980deed1..846d4c3eb3923 100644
--- a/drivers/ufs/core/ufs-mcq.c
+++ b/drivers/ufs/core/ufs-mcq.c
@@ -280,6 +280,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.53.0
next prev parent reply other threads:[~2026-10-13 16:01 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-12 15:22 FAILED: patch "[PATCH] scsi: ufs: core: Avoid unsafe MMIO reads in" failed to apply to 6.6-stable tree gregkh
2026-10-13 16:01 ` [PATCH 6.6.y 1/5] scsi: ufs: mcq: Remove unused parameters Sasha Levin
2026-10-13 16:01 ` [PATCH 6.6.y 2/5] scsi: ufs: core: Move an assignment in ufshcd_mcq_process_cqe() Sasha Levin
2026-10-13 16:01 ` Sasha Levin [this message]
2026-10-13 16:01 ` [PATCH 6.6.y 4/5] scsi: ufs: core: Add a comment block above ufshcd_mcq_compl_all_cqes_lock() Sasha Levin
2026-10-13 16:01 ` [PATCH 6.6.y 5/5] scsi: ufs: core: Avoid unsafe MMIO reads in ufshcd_mcq_compl_all_cqes_lock() Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261013160048.356245-3-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=bvanassche@acm.org \
--cc=martin.petersen@oracle.com \
--cc=peter.wang@mediatek.com \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox