Commit a6ab7563 authored by Nick Chan's avatar Nick Chan Committed by Keith Busch
Browse files

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: 04d8ecf3 ("nvme: apple: Add Apple A11 support")
Cc: stable@vger.kernel.org
Suggested-by: default avatarYuriy Havrylyuk <yhavry@gmail.com>
Reviewed-by: default avatarSven Peter <sven@kernel.org>
Signed-off-by: default avatarNick Chan <towinchenmi@gmail.com>
Signed-off-by: default avatarKeith Busch <kbusch@kernel.org>
parent 37953cec
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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)