From 52850267b077dc45b6f6dd9028f35d5c311b8f10 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Apr 20 2023 11:01:09 +0000 Subject: nvme-pci: mark Lexar NM760 as IGNORE_DEV_SUBNQN (bsc#1012628). --- diff --git a/patches.kernel.org/6.2.12-134-nvme-pci-mark-Lexar-NM760-as-IGNORE_DEV_SUBNQN.patch b/patches.kernel.org/6.2.12-134-nvme-pci-mark-Lexar-NM760-as-IGNORE_DEV_SUBNQN.patch new file mode 100644 index 0000000..41dca27 --- /dev/null +++ b/patches.kernel.org/6.2.12-134-nvme-pci-mark-Lexar-NM760-as-IGNORE_DEV_SUBNQN.patch @@ -0,0 +1,65 @@ +From: Juraj Pecigos +Date: Sun, 26 Mar 2023 11:29:49 +0200 +Subject: [PATCH] nvme-pci: mark Lexar NM760 as IGNORE_DEV_SUBNQN +References: bsc#1012628 +Patch-mainline: 6.2.12 +Git-commit: 1231363aec86704a6b0467a12e3ca7bdf890e01d + +[ Upstream commit 1231363aec86704a6b0467a12e3ca7bdf890e01d ] + +A system with more than one of these SSDs will only have one usable. +The kernel fails to detect more than one nvme device due to duplicate +cntlids. + +before: +[ 9.395229] nvme 0000:01:00.0: platform quirk: setting simple suspend +[ 9.395262] nvme nvme0: pci function 0000:01:00.0 +[ 9.395282] nvme 0000:03:00.0: platform quirk: setting simple suspend +[ 9.395305] nvme nvme1: pci function 0000:03:00.0 +[ 9.409873] nvme nvme0: Duplicate cntlid 1 with nvme1, subsys nqn.2022-07.com.siliconmotion:nvm-subsystem-sn- , rejecting +[ 9.409982] nvme nvme0: Removing after probe failure status: -22 +[ 9.427487] nvme nvme1: allocated 64 MiB host memory buffer. +[ 9.445088] nvme nvme1: 16/0/0 default/read/poll queues +[ 9.449898] nvme nvme1: Ignoring bogus Namespace Identifiers + +after: +[ 1.161890] nvme 0000:01:00.0: platform quirk: setting simple suspend +[ 1.162660] nvme nvme0: pci function 0000:01:00.0 +[ 1.162684] nvme 0000:03:00.0: platform quirk: setting simple suspend +[ 1.162707] nvme nvme1: pci function 0000:03:00.0 +[ 1.191354] nvme nvme0: allocated 64 MiB host memory buffer. +[ 1.193378] nvme nvme1: allocated 64 MiB host memory buffer. +[ 1.211044] nvme nvme1: 16/0/0 default/read/poll queues +[ 1.211080] nvme nvme0: 16/0/0 default/read/poll queues +[ 1.216145] nvme nvme0: Ignoring bogus Namespace Identifiers +[ 1.216261] nvme nvme1: Ignoring bogus Namespace Identifiers + +Adding the NVME_QUIRK_IGNORE_DEV_SUBNQN quirk to resolves the issue. + +Signed-off-by: Juraj Pecigos +Reviewed-by: Chaitanya Kulkarni +Signed-off-by: Christoph Hellwig +Stable-dep-of: 74391b3e6985 ("nvme-pci: add NVME_QUIRK_BOGUS_NID for T-FORCE Z330 SSD") +Signed-off-by: Sasha Levin +Signed-off-by: Jiri Slaby +--- + drivers/nvme/host/pci.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c +index ea3f0806..2e3fae6e 100644 +--- a/drivers/nvme/host/pci.c ++++ b/drivers/nvme/host/pci.c +@@ -3494,7 +3494,8 @@ static const struct pci_device_id nvme_id_table[] = { + { PCI_DEVICE(0x1d97, 0x1d97), /* Lexar NM620 */ + .driver_data = NVME_QUIRK_BOGUS_NID, }, + { PCI_DEVICE(0x1d97, 0x2269), /* Lexar NM760 */ +- .driver_data = NVME_QUIRK_BOGUS_NID, }, ++ .driver_data = NVME_QUIRK_BOGUS_NID | ++ NVME_QUIRK_IGNORE_DEV_SUBNQN, }, + { PCI_DEVICE(PCI_VENDOR_ID_AMAZON, 0x0061), + .driver_data = NVME_QUIRK_DMA_ADDRESS_BITS_48, }, + { PCI_DEVICE(PCI_VENDOR_ID_AMAZON, 0x0065), +-- +2.35.3 + diff --git a/series.conf b/series.conf index bc8b81f..dddd591 100644 --- a/series.conf +++ b/series.conf @@ -2361,6 +2361,7 @@ patches.kernel.org/6.2.12-131-x86-rtc-Remove-__init-for-runtime-functions.patch patches.kernel.org/6.2.12-132-i2c-ocores-generate-stop-condition-after-timeo.patch patches.kernel.org/6.2.12-133-cifs-fix-negotiate-context-parsing.patch + patches.kernel.org/6.2.12-134-nvme-pci-mark-Lexar-NM760-as-IGNORE_DEV_SUBNQN.patch ######################################################## # Build fixes that apply to the vanilla kernel too.