The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH 0/6] Apple NVMe fixes for macOS 15+ firmware / M4 support
@ 2026-08-06 15:27 Sven Peter
  2026-08-06 15:27 ` [PATCH 1/6] nvme-apple: Destroy the admin queue on removal Sven Peter
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Sven Peter @ 2026-08-06 15:27 UTC (permalink / raw)
  To: Janne Grunau, Neal Gompa, Keith Busch, Jens Axboe,
	Christoph Hellwig, Sagi Grimberg, Arnd Bergmann
  Cc: asahi, linux-arm-kernel, linux-nvme, linux-kernel, Sven Peter

Hi,

This series fixes a bunch of bugs that were working fine with M1/M2 NVMe
controllers with older firmware but are now starting to bite us.
With macOS 15 a new firmware is installed for the controller and both
XNU and the controller are a bit more strict now. This firmware is
required once we add M4 support.

The first patch fixes a panic that can happen when the controller fails
to initialize, which now happens for the first time with the new
firmware. The other fixes then make it work again.

Best,

Sven

Signed-off-by: Sven Peter <sven@kernel.org>
---
Sven Peter (6):
      nvme-apple: Destroy the admin queue on removal
      nvme-apple: Don't set a DMA direction for commands without a data transfer
      nvme-apple: Never set the opcode in the NVMMU TCB
      nvme: Add a quirk for page aligned admin queue buffers
      nvme-apple: Require page aligned buffers on the admin queue
      nvme-apple: Drop the PRP null check chicken bit

 drivers/nvme/host/apple.c | 32 +++++++++++++++-----------------
 drivers/nvme/host/core.c  |  5 ++++-
 drivers/nvme/host/nvme.h  |  7 +++++++
 3 files changed, 26 insertions(+), 18 deletions(-)
---
base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482
change-id: 20260806-b4-nvme-fwabi-000386148b21

Best regards,
--  
Sven Peter <sven@kernel.org>



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH 1/6] nvme-apple: Destroy the admin queue on removal
  2026-08-06 15:27 [PATCH 0/6] Apple NVMe fixes for macOS 15+ firmware / M4 support Sven Peter
@ 2026-08-06 15:27 ` Sven Peter
  2026-08-06 15:27 ` [PATCH 2/6] nvme-apple: Don't set a DMA direction for commands without a data transfer Sven Peter
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Sven Peter @ 2026-08-06 15:27 UTC (permalink / raw)
  To: Janne Grunau, Neal Gompa, Keith Busch, Jens Axboe,
	Christoph Hellwig, Sagi Grimberg, Arnd Bergmann
  Cc: asahi, linux-arm-kernel, linux-nvme, linux-kernel, Sven Peter

The admin queue is allocated with blk_mq_alloc_queue() but never
destroyed. nvme_free_ctrl() only drops the last reference and
blk_mq_exit_queue() and blk_sync_queue() never run: the hctx is never
moved to q->unused_hctx_list and the timeout timer and work stay armed on
a queue that is about to be freed which will eventually oops inside
blk_mq_timeout_work().

This can only be triggered when the controller fails to come up and is
then immediately torn down again which is why no one ever ran into this
before.

Let's just copy what the pcie driver does: unquiesce and destroy the admin
queue before nvme_uninit_ctrl().

With this the following WARN followed by a panic no longer happens:

  WARNING: block/blk-mq.c:4390 at blk_mq_release+0x194/0x238, CPU#4: kworker/u34:4/119
  CPU: 4 UID: 0 PID: 119 Comm: kworker/u34:4 Not tainted 7.2.0-rc1-dirty #248 PREEMPT
  Hardware name: Apple Mac mini (M1, 2020) (DT)
  Workqueue: nvme-wq apple_nvme_remove_dead_ctrl_work
  pstate: 61400005 (nZCv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--)
  pc : blk_mq_release+0x194/0x238
  lr : blk_mq_release+0x58/0x238
  sp : ffffc000833a3b50
  x29: ffffc000833a3b50 x28: ffff80001d0450f8 x27: ffff800020c95200
  x26: 0000000000000088 x25: 0000000000000000 x24: ffff800020f36805
  x23: 0000000000000000 x22: ffffc00081a86878 x21: ffff800020be9c60
  x20: 0000000000000000 x19: ffff800022501698 x18: 000000000000000a
  x17: 7365757165722066 x16: 666f7265776f7020 x15: 0000000000000000
  x14: 0000000000000028 x13: 0000000000004def x12: 0000000000000003
  x11: 0000000000000000 x10: 0000000000000000 x9 : ffffc000805b4fc8
  x8 : ffffc00081915820 x7 : ffffc00081c4f3c8 x6 : 0000000000000001
  x5 : 0000000000000004 x4 : ffff800022498d80 x3 : ffffc000833a3b14
  x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff800022501698
  Call trace:
   blk_mq_release+0x194/0x238 (P)
   blk_put_queue+0x8c/0xf0
   nvme_free_ctrl+0x4c/0x260
   device_release+0x44/0x128
   kobject_put+0xa0/0x120
   put_device+0x1c/0x40
   nvme_uninit_ctrl+0x48/0x60
   apple_nvme_remove+0x54/0xb0
   platform_remove+0x28/0x40
   device_remove+0x54/0x98
   device_release_driver_internal+
   device_release_driver+0x20/0x38
   apple_nvme_remove_dead_ctrl_wor
   process_one_work+0x1f4/0x770
   worker_thread+0x1b8/0x360
   kthread+0x140/0x160
   ret_from_fork+0x10/0x20
  irq event stamp: 448
  hardirqs last  enabled at (447):in_unlock_irqrestore+0x74/0x80
  hardirqs last disabled at (448): [<ffffc000811cf5c0>] el1_brk64+0x20/0x60
  softirqs last  enabled at (0): [ess+0xb28/0x2698
  softirqs last disabled at (0): [<0000000000000000>] 0x0
  ---[ end trace 0000000000000000
  Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
  Mem abort info:
    ESR = 0x0000000096000005
    EC = 0x25: DABT (current EL),
    SET = 0, FnV = 0
    EA = 0, S1PTW = 0
    FSC = 0x05: level 1 translation fault
  Data abort info:
    ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000
    CM = 0, WnR = 0, TnD = 0, TagA
    GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
  [0000000000000000] user address
  Internal error: Oops: 0000000096000005 [#1]  SMP
  CPU: 7 UID: 0 PID: 54 Comm: kwor          7.2.0-rc1-dirty #248PREEMPT
  Tainted: [W]=WARN
  Hardware name: Apple Mac mini (M1, 2020) (DT)
  Workqueue: kblockd blk_mq_timeou
  pstate: 01400005 (nzcv daif +PAN -UAO -TCO +DIT -SSBS BTYPE=--)
  pc : percpu_ref_tryget_many.cons
  lr : percpu_ref_tryget_many.constprop.0+0xc0/0x168
  sp : ffffc000829cbce0
  x29: ffffc000829cbce0 x28: ffff800020be9f48 x27: ffff800013e503c0
  x26: 0000000000000108 x25: 000009c05
  x23: 0000000000000000 x22: ffffc000819f5000 x21: ffff800020be9f48
  x20: ffff8001deda4808 x19: ffff8000a
  x17: 00000000580e1fac x16: ffffc00082bbbb7c x15: 0000000000000000
  x14: 0000000000000028 x13: 000000001
  x11: 0000000000000000 x10: 0000000000000000 x9 : ffffc000829cbc20
  x8 : ffffc00081915820 x7 : ffffc0001
  x5 : ffff80001ca77d08 x4 : 0000000000000000 x3 : ffff80001ca77cb8
  x2 : 0000000000000000 x1 : 000000007
  Call trace:
   percpu_ref_tryget_many.constpro
   blk_mq_timeout_work+0x48/0x298
   process_one_work+0x1f4/0x770
   worker_thread+0x1b8/0x360
   kthread+0x140/0x160
   ret_from_fork+0x10/0x20
  Code: 91282000 97ed44b2 17ffffd2
  ---[ end trace 0000000000000000 ]---

Fixes: 5bd2927aceba ("nvme-apple: Add initial Apple SoC NVMe driver")
Signed-off-by: Sven Peter <sven@kernel.org>
---
 drivers/nvme/host/apple.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/nvme/host/apple.c b/drivers/nvme/host/apple.c
index be3b91b43ea5..321502847a2c 100644
--- a/drivers/nvme/host/apple.c
+++ b/drivers/nvme/host/apple.c
@@ -1636,6 +1636,15 @@ static void apple_nvme_remove(struct platform_device *pdev)
 	nvme_stop_ctrl(&anv->ctrl);
 	nvme_remove_namespaces(&anv->ctrl);
 	apple_nvme_disable(anv, true);
+	if (anv->ctrl.admin_q && !blk_queue_dying(anv->ctrl.admin_q)) {
+		/*
+		 * If the controller was reset during removal, it's possible
+		 * user requests may be waiting on a stopped queue. Start the
+		 * queue to flush these to completion.
+		 */
+		nvme_unquiesce_admin_queue(&anv->ctrl);
+		blk_mq_destroy_queue(anv->ctrl.admin_q);
+	}
 	nvme_uninit_ctrl(&anv->ctrl);
 
 	if (apple_rtkit_is_running(anv->rtk)) {

-- 
2.55.0



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/6] nvme-apple: Don't set a DMA direction for commands without a data transfer
  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
  2026-08-06 15:27 ` [PATCH 3/6] nvme-apple: Never set the opcode in the NVMMU TCB Sven Peter
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Sven Peter @ 2026-08-06 15:27 UTC (permalink / raw)
  To: Janne Grunau, Neal Gompa, Keith Busch, Jens Axboe,
	Christoph Hellwig, Sagi Grimberg, Arnd Bergmann
  Cc: asahi, linux-arm-kernel, linux-nvme, linux-kernel, Sven Peter

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



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/6] nvme-apple: Never set the opcode in the NVMMU TCB
  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 ` [PATCH 2/6] nvme-apple: Don't set a DMA direction for commands without a data transfer Sven Peter
@ 2026-08-06 15:27 ` Sven Peter
  2026-08-06 15:27 ` [PATCH 4/6] nvme: Add a quirk for page aligned admin queue buffers Sven Peter
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Sven Peter @ 2026-08-06 15:27 UTC (permalink / raw)
  To: Janne Grunau, Neal Gompa, Keith Busch, Jens Axboe,
	Christoph Hellwig, Sagi Grimberg, Arnd Bergmann
  Cc: asahi, linux-arm-kernel, linux-nvme, linux-kernel, Sven Peter

macOS always sets this to zero and the firmware starting with macOS 15
has started to complain about what we're doing here.

Fixes: 5bd2927aceba ("nvme-apple: Add initial Apple SoC NVMe driver")
Signed-off-by: Sven Peter <sven@kernel.org>
---
 drivers/nvme/host/apple.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/apple.c b/drivers/nvme/host/apple.c
index f134b5ffb774..1ea732c3df1c 100644
--- a/drivers/nvme/host/apple.c
+++ b/drivers/nvme/host/apple.c
@@ -318,7 +318,7 @@ static void apple_nvme_submit_cmd_t8103(struct apple_nvme_queue *q,
 	u32 tag = nvme_tag_from_cid(cmd->common.command_id);
 	struct apple_nvmmu_tcb *tcb = &q->tcbs[tag];
 
-	tcb->opcode = cmd->common.opcode;
+	tcb->opcode = 0;
 	tcb->prp1 = cmd->common.dptr.prp1;
 	tcb->prp2 = cmd->common.dptr.prp2;
 	tcb->length = cmd->rw.length;

-- 
2.55.0



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 4/6] nvme: Add a quirk for page aligned admin queue buffers
  2026-08-06 15:27 [PATCH 0/6] Apple NVMe fixes for macOS 15+ firmware / M4 support Sven Peter
                   ` (2 preceding siblings ...)
  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 ` Sven Peter
  2026-08-06 15:27 ` [PATCH 5/6] nvme-apple: Require page aligned buffers on the admin queue Sven Peter
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Sven Peter @ 2026-08-06 15:27 UTC (permalink / raw)
  To: Janne Grunau, Neal Gompa, Keith Busch, Jens Axboe,
	Christoph Hellwig, Sagi Grimberg, Arnd Bergmann
  Cc: asahi, linux-arm-kernel, linux-nvme, linux-kernel, Sven Peter

Apple controllers seem to require any queue buffers on the admin queue
to be aligned to the NVMe controller page size. Weirdly, this constraint
does not apply to the i/o queue where any alignment is fine. This has
always been required on pre-M1 controllers and is required starting with
macOS 15 firmware or post-M4 controllers again. On M1/M2/M3 we only got
away with this because there was a chicken bit to disable this
requirement. Let's add a quirk that enforces this alignment.

Signed-off-by: Sven Peter <sven@kernel.org>
---
 drivers/nvme/host/core.c | 5 ++++-
 drivers/nvme/host/nvme.h | 7 +++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 453c1f0b2dd0..b76f4e4d8850 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -2071,7 +2071,10 @@ static void nvme_set_ctrl_limits(struct nvme_ctrl *ctrl,
 	lim->max_integrity_segments = ctrl->max_integrity_segments;
 	lim->virt_boundary_mask = ctrl->ops->get_virt_boundary(ctrl, is_admin);
 	lim->max_segment_size = UINT_MAX;
-	lim->dma_alignment = 3;
+	if (is_admin && (ctrl->quirks & NVME_QUIRK_ADMIN_PAGE_ALIGN))
+		lim->dma_alignment = NVME_CTRL_PAGE_SIZE - 1;
+	else
+		lim->dma_alignment = 3;
 }
 
 static bool nvme_update_disk_info(struct nvme_ns *ns, struct nvme_id_ns *id,
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index 824651cc898d..957ded0c6f53 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -178,6 +178,11 @@ enum nvme_quirks {
 	 * Align dma pool segment size to 512 bytes
 	 */
 	NVME_QUIRK_DMAPOOL_ALIGN_512		= (1 << 22),
+
+	/*
+	 * Admin queue DMA buffers must be page aligned
+	 */
+	NVME_QUIRK_ADMIN_PAGE_ALIGN		= (1 << 23),
 };
 
 static inline char *nvme_quirk_name(enum nvme_quirks q)
@@ -229,6 +234,8 @@ static inline char *nvme_quirk_name(enum nvme_quirks q)
 		return "broken_msi";
 	case NVME_QUIRK_DMAPOOL_ALIGN_512:
 		return "dmapool_align_512";
+	case NVME_QUIRK_ADMIN_PAGE_ALIGN:
+		return "admin_page_align";
 	}
 
 	return "unknown";

-- 
2.55.0



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 5/6] nvme-apple: Require page aligned buffers on the admin queue
  2026-08-06 15:27 [PATCH 0/6] Apple NVMe fixes for macOS 15+ firmware / M4 support Sven Peter
                   ` (3 preceding siblings ...)
  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 ` Sven Peter
  2026-08-06 15:27 ` [PATCH 6/6] nvme-apple: Drop the PRP null check chicken bit Sven Peter
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Sven Peter @ 2026-08-06 15:27 UTC (permalink / raw)
  To: Janne Grunau, Neal Gompa, Keith Busch, Jens Axboe,
	Christoph Hellwig, Sagi Grimberg, Arnd Bergmann
  Cc: asahi, linux-arm-kernel, linux-nvme, linux-kernel, Sven Peter

Now that we have a quick to align buffers on the admin queue to the NVMe
controller page size use it for Apple controllers. This fixes pre-M1
controllers, which always rejected unaligned requests, and also makes
this driver work for M4 SoCs and for M1/M2/M3 SoCs that have been
updated to the firmware shipped with macOS 15.

Fixes: 5bd2927aceba ("nvme-apple: Add initial Apple SoC NVMe driver")
Signed-off-by: Sven Peter <sven@kernel.org>
---
 drivers/nvme/host/apple.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/nvme/host/apple.c b/drivers/nvme/host/apple.c
index 1ea732c3df1c..78f89b5679e5 100644
--- a/drivers/nvme/host/apple.c
+++ b/drivers/nvme/host/apple.c
@@ -1583,7 +1583,8 @@ static struct apple_nvme *apple_nvme_alloc(struct platform_device *pdev)
 	}
 
 	ret = nvme_init_ctrl(&anv->ctrl, anv->dev, &nvme_ctrl_ops,
-			     NVME_QUIRK_SKIP_CID_GEN | NVME_QUIRK_IDENTIFY_CNS);
+			     NVME_QUIRK_SKIP_CID_GEN | NVME_QUIRK_IDENTIFY_CNS |
+			     NVME_QUIRK_ADMIN_PAGE_ALIGN);
 	if (ret) {
 		dev_err_probe(dev, ret, "Failed to initialize nvme_ctrl");
 		goto put_dev;

-- 
2.55.0



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 6/6] nvme-apple: Drop the PRP null check chicken bit
  2026-08-06 15:27 [PATCH 0/6] Apple NVMe fixes for macOS 15+ firmware / M4 support Sven Peter
                   ` (4 preceding siblings ...)
  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 ` 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
  7 siblings, 0 replies; 9+ messages in thread
From: Sven Peter @ 2026-08-06 15:27 UTC (permalink / raw)
  To: Janne Grunau, Neal Gompa, Keith Busch, Jens Axboe,
	Christoph Hellwig, Sagi Grimberg, Arnd Bergmann
  Cc: asahi, linux-arm-kernel, linux-nvme, linux-kernel, Sven Peter

Now that we program the DMA direction correctly the NULL check that used
to make commands fail passes. Another side effect of this bit was that
non-align buffers on the admin queue were silently allowed and that's
been fixed now as well and we this don't need this chicken bit anymore.
More importantly, starting with the firmware installed with macOS 15,
which is required for M4 but can also be installed on the previous SoCs,
the controller no longer exposes this control register and any access
SErrors instead. Just drop the write entirely.

Fixes: 5bd2927aceba ("nvme-apple: Add initial Apple SoC NVMe driver")
Signed-off-by: Sven Peter <sven@kernel.org>
---
 drivers/nvme/host/apple.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/drivers/nvme/host/apple.c b/drivers/nvme/host/apple.c
index 78f89b5679e5..bf1c32c66153 100644
--- a/drivers/nvme/host/apple.c
+++ b/drivers/nvme/host/apple.c
@@ -47,9 +47,6 @@
 #define APPLE_ANS_BOOT_STATUS	 0x1300
 #define APPLE_ANS_BOOT_STATUS_OK 0xde71ce55
 
-#define APPLE_ANS_UNKNOWN_CTRL	 0x24008
-#define APPLE_ANS_PRP_NULL_CHECK BIT(11)
-
 #define APPLE_ANS_LINEAR_SQ_CTRL 0x24908
 #define APPLE_ANS_LINEAR_SQ_EN	 BIT(0)
 
@@ -1127,17 +1124,6 @@ static void apple_nvme_reset_work(struct work_struct *work)
 		/* Setup the NVMMU for the maximum admin and IO queue depth */
 		writel(anv->hw->max_queue_depth - 1,
 			anv->mmio_nvme + APPLE_NVMMU_NUM_TCBS);
-
-		/*
-		 * This is probably a chicken bit: without it all commands
-		 * where any PRP is set to zero (including those that don't use
-		 * that field) fail and the co-processor complains about
-		 * "completed with err BAD_CMD-" or a "NULL_PRP_PTR_ERR" in the
-		 * syslog
-		 */
-		writel(readl(anv->mmio_nvme + APPLE_ANS_UNKNOWN_CTRL) &
-			~APPLE_ANS_PRP_NULL_CHECK,
-			anv->mmio_nvme + APPLE_ANS_UNKNOWN_CTRL);
 	}
 
 	/* Setup the admin queue */

-- 
2.55.0



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/6] Apple NVMe fixes for macOS 15+ firmware / M4 support
  2026-08-06 15:27 [PATCH 0/6] Apple NVMe fixes for macOS 15+ firmware / M4 support Sven Peter
                   ` (5 preceding siblings ...)
  2026-08-06 15:27 ` [PATCH 6/6] nvme-apple: Drop the PRP null check chicken bit Sven Peter
@ 2026-08-06 16:50 ` Nick Chan
  2026-08-06 17:37 ` Janne Grunau
  7 siblings, 0 replies; 9+ messages in thread
From: Nick Chan @ 2026-08-06 16:50 UTC (permalink / raw)
  To: Sven Peter, Janne Grunau, Neal Gompa, Keith Busch, Jens Axboe,
	Christoph Hellwig, Sagi Grimberg, Arnd Bergmann
  Cc: asahi, linux-arm-kernel, linux-nvme, linux-kernel



Sven Peter 於 2026/8/6 晚上11:27 寫道:
> Hi,
> 
> This series fixes a bunch of bugs that were working fine with M1/M2 NVMe
> controllers with older firmware but are now starting to bite us.
> With macOS 15 a new firmware is installed for the controller and both
> XNU and the controller are a bit more strict now. This firmware is
> required once we add M4 support.
> 
> The first patch fixes a panic that can happen when the controller fails
> to initialize, which now happens for the first time with the new
> firmware. The other fixes then make it work again.

For the whole series:

Tested-by: Nick Chan <towinchenmi@gmail.com> # pre-M1 controllers

> 
> Best,
> 
> Sven
> 
> Signed-off-by: Sven Peter <sven@kernel.org>
> ---
> Sven Peter (6):
>       nvme-apple: Destroy the admin queue on removal
>       nvme-apple: Don't set a DMA direction for commands without a data transfer
>       nvme-apple: Never set the opcode in the NVMMU TCB
>       nvme: Add a quirk for page aligned admin queue buffers
>       nvme-apple: Require page aligned buffers on the admin queue
>       nvme-apple: Drop the PRP null check chicken bit
> 
>  drivers/nvme/host/apple.c | 32 +++++++++++++++-----------------
>  drivers/nvme/host/core.c  |  5 ++++-
>  drivers/nvme/host/nvme.h  |  7 +++++++
>  3 files changed, 26 insertions(+), 18 deletions(-)
> ---
> base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482
> change-id: 20260806-b4-nvme-fwabi-000386148b21
> 
> Best regards,
> --  
> Sven Peter <sven@kernel.org>
> 
> 
> 


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 0/6] Apple NVMe fixes for macOS 15+ firmware / M4 support
  2026-08-06 15:27 [PATCH 0/6] Apple NVMe fixes for macOS 15+ firmware / M4 support Sven Peter
                   ` (6 preceding siblings ...)
  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
  7 siblings, 0 replies; 9+ messages in thread
From: Janne Grunau @ 2026-08-06 17:37 UTC (permalink / raw)
  To: Sven Peter
  Cc: Neal Gompa, Keith Busch, Jens Axboe, Christoph Hellwig,
	Sagi Grimberg, Arnd Bergmann, asahi, linux-arm-kernel, linux-nvme,
	linux-kernel

On Thu, Aug 06, 2026 at 05:27:32PM +0200, Sven Peter wrote:
> Hi,
> 
> This series fixes a bunch of bugs that were working fine with M1/M2 NVMe
> controllers with older firmware but are now starting to bite us.
> With macOS 15 a new firmware is installed for the controller and both
> XNU and the controller are a bit more strict now. This firmware is
> required once we add M4 support.
> 
> The first patch fixes a panic that can happen when the controller fails
> to initialize, which now happens for the first time with the new
> firmware. The other fixes then make it work again.

Whole series tested on devices with pre macOS 15 system firmware, a M1
with system firmware 13.2 (OS firmware 12.3) and M1 Max with system
firmware 14.5 (OS firmware 13.5).

Tested-by: Janne Grunau <j@jannau.net>

Janne

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-08-06 17:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [PATCH 2/6] nvme-apple: Don't set a DMA direction for commands without a data transfer Sven Peter
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox