Created attachment 301221 [details] Adding NVME_QUIRK_IGNORE_DEV_SUBNQN for Micron MTFDKBA2T0TFH Even though first noticed on an Ubuntu kernel, I dare to report this against upstream as this hardware combination malfunction seems not to be known yet (I did not find distribution-specific patches for this issue). Therefore, IMHO, the fix should be included upstream to make these devices work on every kernel deployment. My brand new Lenovo Notebook contains three NVMe 2T disks. When booting with Kernel 5.15.0, I receive the following dmesg output: ... Jun 09 03:33:08 kubuntu kernel: nvme 0000:04:00.0: platform quirk: setting simple suspend Jun 09 03:33:08 kubuntu kernel: nvme nvme0: pci function 0000:04:00.0 Jun 09 03:33:08 kubuntu kernel: nvme 0000:06:00.0: platform quirk: setting simple suspend Jun 09 03:33:08 kubuntu kernel: nvme nvme1: pci function 0000:06:00.0 Jun 09 03:33:08 kubuntu kernel: nvme 0000:05:00.0: platform quirk: setting simple suspend Jun 09 03:33:08 kubuntu kernel: nvme nvme2: pci function 0000:05:00.0 ... Jun 09 03:33:08 kubuntu kernel: nvme nvme1: Duplicate cntlid 0 with nvme0, rejecting Jun 09 03:33:08 kubuntu kernel: nvme nvme1: Removing after probe failure status: -22 Jun 09 03:33:08 kubuntu kernel: nvme nvme2: Duplicate cntlid 0 with nvme0, rejecting Jun 09 03:33:08 kubuntu kernel: nvme nvme2: Removing after probe failure status: -22 Jun 09 03:33:08 kubuntu kernel: pps pps0: new PPS source ptp0 Jun 09 03:33:08 kubuntu kernel: igc 0000:0b:00.0 (unnamed net_device) (uninitialized): PHC added Jun 09 03:33:08 kubuntu kernel: nvme nvme0: 16/0/0 default/read/poll queues Jun 09 03:33:08 kubuntu kernel: nvme0n1: p1 p2 p3 ... nvme0 is properly detected, however nvme1 and nvme2 are both rejected with "Duplicate cntlid 0 with nvme0" error message. lspci properly enumerates all of the 3 devices: 04:00.0 Non-Volatile memory controller: Micron Technology Inc Device 5407 05:00.0 Non-Volatile memory controller: Micron Technology Inc Device 5407 06:00.0 Non-Volatile memory controller: Micron Technology Inc Device 5407 Consequentially, I cannot make use of nvme1 and nvme2. A quirk setting was proposed for a Samsung device [1] which was finally applied to the kernel [2]. [1] https://lkml.kernel.org/lkml/20210118113356.833556252@linuxfoundation.org/ [2] https://lkml.org/lkml/2021/1/18/1172 I wrote up a modified patch for Micron MTFDKBA2T0TFH devices, tested the patch and could make all three NVMe devices work flawlessly under Linux 5.15.0. I also checked this patch against 5.15.48, it applies cleanly. I suggest this patch be applied to latest longterm 5.15.x as well as latest Mainline as only one device has been added to the quirk table since, and the format of the quirktable was not changed in the meantime. The proposed patch itself (also see attachment): diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c index b925a5f4afc3..2e5c33f3b868 100644 --- a/drivers/nvme/host/pci.c +++ b/drivers/nvme/host/pci.c @@ -3372,5 +3372,7 @@ static const struct pci_device_id nvme_id_table[] = { NVME_QUIRK_128_BYTES_SQES | NVME_QUIRK_NO_DEEPEST_PS | NVME_QUIRK_IGNORE_DEV_SUBNQN, }, + { PCI_DEVICE(0x1344, 0x5407), /* Micron Technology Inc NVMe SSD */ + .driver_data = NVME_QUIRK_IGNORE_DEV_SUBNQN }, { PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_EXPRESS, 0xffffff) }, { 0, } };
Thanks for coming up with a fix! Would you mind to submit the patch to the NVME mailing list? http://lists.infradead.org/mailman/listinfo/linux-nvme
You're welcome! Someone did already. Patch seems to be included in Kernels [PATCH AUTOSEL 5.4 26/27] nvme: add a bogus subsystem NQN quirk for Micron MTFDKBA2T0TFH [PATCH AUTOSEL 5.10 32/34] nvme: add a bogus subsystem NQN quirk for Micron MTFDKBA2T0TFH [PATCH AUTOSEL 5.15 39/41] nvme: add a bogus subsystem NQN quirk for Micron MTFDKBA2T0TFH [PATCH AUTOSEL 5.18 51/53] nvme: add a bogus subsystem NQN quirk for Micron MTFDKBA2T0TFH So from my point of view it's fixed.
Great!