mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 20:54:03 +02:00
nvme-apple: Don't set a DMA direction for commands without a data transfer
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: 5bd2927ace ("nvme-apple: Add initial Apple SoC NVMe driver")
Tested-by: Joshua Peisach <jpeisach@ubuntu.com>
Tested-by: Janne Grunau <j@jannau.net>
Tested-by: Nick Chan <towinchenmi@gmail.com>
Signed-off-by: Sven Peter <sven@kernel.org>
This commit is contained in:
parent
87d5b9864c
commit
94dd580493
|
|
@ -341,7 +341,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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user