summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Chan <towinchenmi@gmail.com>2026-05-14 16:16:01 +0300
committerKeith Busch <kbusch@kernel.org>2026-05-14 17:40:35 +0300
commita6ab75639e23169a741b0b2e12191fd8acb32c73 (patch)
treeb2099f09d1e9ac597d5b0a6d406d015a265cdad1
parent37953cec775ed34e59cf9a7d7bb9b0610daa3f3e (diff)
downloadlinux-a6ab75639e23169a741b0b2e12191fd8acb32c73.tar.xz
nvme-apple: Reset q->sq_tail during queue init
Fixes a "duplicate tag error for tag 0" firmware crash during controller reset while setting up a queue on Apple A11 / T8015 caused by stale entries in the submission queue due to an invalid sq_tail offset after reset. Fixes: 04d8ecf37b5e ("nvme: apple: Add Apple A11 support") Cc: stable@vger.kernel.org Suggested-by: Yuriy Havrylyuk <yhavry@gmail.com> Reviewed-by: Sven Peter <sven@kernel.org> Signed-off-by: Nick Chan <towinchenmi@gmail.com> Signed-off-by: Keith Busch <kbusch@kernel.org>
-rw-r--r--drivers/nvme/host/apple.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvme/host/apple.c b/drivers/nvme/host/apple.c
index 423c9c628e7b..c692fc73babf 100644
--- a/drivers/nvme/host/apple.c
+++ b/drivers/nvme/host/apple.c
@@ -1009,6 +1009,7 @@ static void apple_nvme_init_queue(struct apple_nvme_queue *q)
unsigned int depth = apple_nvme_queue_depth(q);
struct apple_nvme *anv = queue_to_apple_nvme(q);
+ q->sq_tail = 0;
q->cq_head = 0;
q->cq_phase = 1;
if (anv->hw->has_lsq_nvmmu)