From: Sven Peter <sven@kernel.org>
To: Janne Grunau <j@jannau.net>, Neal Gompa <neal@gompa.dev>,
Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@kernel.dk>,
Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
Arnd Bergmann <arnd@arndb.de>
Cc: asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
Sven Peter <sven@kernel.org>
Subject: [PATCH 2/6] nvme-apple: Don't set a DMA direction for commands without a data transfer
Date: Thu, 06 Aug 2026 17:27:34 +0200 [thread overview]
Message-ID: <20260806-b4-nvme-fwabi-v1-2-bde19ce8db04@kernel.org> (raw)
In-Reply-To: <20260806-b4-nvme-fwabi-v1-0-bde19ce8db04@kernel.org>
Setting the DMA direction for commands that don't do any transfer likely
triggered the PRP NULL check for which we needed a chicken bit. That bit
has disappeared starting with macOS 15 so let's just do this correctly
instead.
Fixes: 5bd2927aceba ("nvme-apple: Add initial Apple SoC NVMe driver")
Signed-off-by: Sven Peter <sven@kernel.org>
---
drivers/nvme/host/apple.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/nvme/host/apple.c b/drivers/nvme/host/apple.c
index 321502847a2c..f134b5ffb774 100644
--- a/drivers/nvme/host/apple.c
+++ b/drivers/nvme/host/apple.c
@@ -324,7 +324,9 @@ static void apple_nvme_submit_cmd_t8103(struct apple_nvme_queue *q,
tcb->length = cmd->rw.length;
tcb->command_id = tag;
- if (nvme_is_write(cmd))
+ if (!cmd->common.dptr.prp1)
+ tcb->dma_flags = 0;
+ else if (nvme_is_write(cmd))
tcb->dma_flags = APPLE_ANS_TCB_DMA_TO_DEVICE;
else
tcb->dma_flags = APPLE_ANS_TCB_DMA_FROM_DEVICE;
--
2.55.0
next prev parent reply other threads:[~2026-08-06 15:29 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-06 15:27 [PATCH 0/6] Apple NVMe fixes for macOS 15+ firmware / M4 support Sven Peter
2026-08-06 15:27 ` [PATCH 1/6] nvme-apple: Destroy the admin queue on removal Sven Peter
2026-08-06 15:27 ` Sven Peter [this message]
2026-08-06 15:27 ` [PATCH 3/6] nvme-apple: Never set the opcode in the NVMMU TCB Sven Peter
2026-08-06 15:27 ` [PATCH 4/6] nvme: Add a quirk for page aligned admin queue buffers Sven Peter
2026-08-06 15:27 ` [PATCH 5/6] nvme-apple: Require page aligned buffers on the admin queue Sven Peter
2026-08-06 15:27 ` [PATCH 6/6] nvme-apple: Drop the PRP null check chicken bit Sven Peter
2026-08-06 16:50 ` [PATCH 0/6] Apple NVMe fixes for macOS 15+ firmware / M4 support Nick Chan
2026-08-06 17:37 ` Janne Grunau
2026-08-07 15:36 ` Joshua Peisach
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=20260806-b4-nvme-fwabi-v1-2-bde19ce8db04@kernel.org \
--to=sven@kernel.org \
--cc=arnd@arndb.de \
--cc=asahi@lists.linux.dev \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=j@jannau.net \
--cc=kbusch@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=neal@gompa.dev \
--cc=sagi@grimberg.me \
/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