Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] Add quirk for Samsung PM173X with Subsystem Vendor
@ 2025-05-16  6:30 Shminderjit Singh
  2025-05-16  6:30 ` [PATCH 1/1] nvme-pci: Add quirk for Samsung PM173X with Subsystem Vendor id:0x108e Shminderjit Singh
  0 siblings, 1 reply; 6+ messages in thread
From: Shminderjit Singh @ 2025-05-16  6:30 UTC (permalink / raw)
  To: kbusch, axboe, hch, sagi, linux-nvme; +Cc: shminderjit.singh, junxiao.bi

Samsung PM173X with subsystem vendor id 0x108e exhibit quirk. Add
NVME_QUIRK_BOGUS_NSID to handle this.

Shminderjit Singh (1):
  nvme-pci: Add quirk for Samsung PM173X with Subsystem Vendor id:0x108e

 drivers/nvme/host/pci.c | 7 +++++++
 1 file changed, 7 insertions(+)


base-commit: 546bce579204685a0b204beebab98c3aa496e651
-- 
2.43.5



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

* [PATCH 1/1] nvme-pci: Add quirk for Samsung PM173X with Subsystem Vendor id:0x108e
  2025-05-16  6:30 [PATCH 0/1] Add quirk for Samsung PM173X with Subsystem Vendor Shminderjit Singh
@ 2025-05-16  6:30 ` Shminderjit Singh
  2025-05-16  6:36   ` Christoph Hellwig
  0 siblings, 1 reply; 6+ messages in thread
From: Shminderjit Singh @ 2025-05-16  6:30 UTC (permalink / raw)
  To: kbusch, axboe, hch, sagi, linux-nvme; +Cc: shminderjit.singh, junxiao.bi

This commit adds NVME_QUIRK_BOGUS_NSID for devices with Vendor ID 0x144d,
Device ID 0xa824 and Subsystem Vendor id 0x108e.

Signed-off-by: Shminderjit Singh <shminderjit.singh@oracle.com>
---
 drivers/nvme/host/pci.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 2e30e9be7408..767cdac056df 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3163,6 +3163,13 @@ static unsigned long check_vendor_combination_bug(struct pci_dev *pdev)
 		    dmi_match(DMI_BOARD_NAME, "PH4PRX1_PH6PRX1") ||
 		    dmi_match(DMI_BOARD_NAME, "PH6PG01_PH6PG71"))
 			return NVME_QUIRK_FORCE_NO_SIMPLE_SUSPEND;
+	} else if (pdev->vendor == 0x144d && pdev->device == 0xa824 &&
+			pdev->subsystem_vendor == 0x108e) {
+		/*
+		 * Set NVME_QUIRK_BOGUS_NID for Samsung PM173X
+		 * with subsystem vendor id 0x108e.
+		 */
+		return NVME_QUIRK_BOGUS_NID;
 	}
 
 	/*
-- 
2.43.5



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

* Re: [PATCH 1/1] nvme-pci: Add quirk for Samsung PM173X with Subsystem Vendor id:0x108e
  2025-05-16  6:30 ` [PATCH 1/1] nvme-pci: Add quirk for Samsung PM173X with Subsystem Vendor id:0x108e Shminderjit Singh
@ 2025-05-16  6:36   ` Christoph Hellwig
  2025-05-16  7:13     ` Shminderjit Singh
  0 siblings, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2025-05-16  6:36 UTC (permalink / raw)
  To: Shminderjit Singh; +Cc: kbusch, axboe, hch, sagi, linux-nvme, junxiao.bi

On Fri, May 16, 2025 at 06:30:59AM +0000, Shminderjit Singh wrote:
> This commit adds NVME_QUIRK_BOGUS_NSID for devices with Vendor ID 0x144d,
> Device ID 0xa824 and Subsystem Vendor id 0x108e.
>
Hi Shminderjit,

this is an enterprise device for which a firmware update should fix
this intentionally introduced bug that only affects the eui64 bug,
and according to previous communication actually is available.

Please contact Samsung for the fix.


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

* RE: [PATCH 1/1] nvme-pci: Add quirk for Samsung PM173X with Subsystem Vendor id:0x108e
  2025-05-16  6:36   ` Christoph Hellwig
@ 2025-05-16  7:13     ` Shminderjit Singh
  2025-05-16  7:15       ` Christoph Hellwig
  0 siblings, 1 reply; 6+ messages in thread
From: Shminderjit Singh @ 2025-05-16  7:13 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: kbusch@kernel.org, axboe@fb.com, sagi@grimberg.me,
	linux-nvme@lists.infradead.org, Junxiao Bi

Hi Christoph,

This device is widely used both within and outside the organization. Applying a firmware fix is not viable option. Since this is firmware specific bug, I am adding a flag for OEM specific devices only.

Thanks,
Shminder

> -----Original Message-----
> From: Christoph Hellwig <hch@lst.de>
> Sent: Friday, May 16, 2025 12:07 PM
> To: Shminderjit Singh <shminderjit.singh@oracle.com>
> Cc: kbusch@kernel.org; axboe@fb.com; hch@lst.de; sagi@grimberg.me; linux-
> nvme@lists.infradead.org; Junxiao Bi <junxiao.bi@oracle.com>
> Subject: Re: [PATCH 1/1] nvme-pci: Add quirk for Samsung PM173X with
> Subsystem Vendor id:0x108e
> 
> On Fri, May 16, 2025 at 06:30:59AM +0000, Shminderjit Singh wrote:
> > This commit adds NVME_QUIRK_BOGUS_NSID for devices with Vendor ID
> > 0x144d, Device ID 0xa824 and Subsystem Vendor id 0x108e.
> >
> Hi Shminderjit,
> 
> this is an enterprise device for which a firmware update should fix this
> intentionally introduced bug that only affects the eui64 bug, and according to
> previous communication actually is available.
> 
> Please contact Samsung for the fix.


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

* Re: [PATCH 1/1] nvme-pci: Add quirk for Samsung PM173X with Subsystem Vendor id:0x108e
  2025-05-16  7:13     ` Shminderjit Singh
@ 2025-05-16  7:15       ` Christoph Hellwig
  2025-05-16  8:13         ` [External] : " Shminderjit Singh
  0 siblings, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2025-05-16  7:15 UTC (permalink / raw)
  To: Shminderjit Singh
  Cc: Christoph Hellwig, kbusch@kernel.org, axboe@fb.com,
	sagi@grimberg.me, linux-nvme@lists.infradead.org, Junxiao Bi

On Fri, May 16, 2025 at 07:13:47AM +0000, Shminderjit Singh wrote:
> Hi Christoph,
> 
> This device is widely used both within and outside the organization. Applying a firmware fix is not viable option. Since this is firmware specific bug, I am adding a flag for OEM specific devices only.

The general rule is that for enterprise devices we expect you to fix
firmware bugs in firmware.  And skipping all IDs suddently for an
old device also seems like a really odd bug report that you did not
even manage to explain.  



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

* RE: [External] : Re: [PATCH 1/1] nvme-pci: Add quirk for Samsung PM173X with Subsystem Vendor id:0x108e
  2025-05-16  7:15       ` Christoph Hellwig
@ 2025-05-16  8:13         ` Shminderjit Singh
  0 siblings, 0 replies; 6+ messages in thread
From: Shminderjit Singh @ 2025-05-16  8:13 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: kbusch@kernel.org, axboe@fb.com, sagi@grimberg.me,
	linux-nvme@lists.infradead.org, Junxiao Bi

Hi Christoph,

Please find below an explanation on the bug:

This firmware bug start messing with the systems when in lvm.conf file the default value of use_devicesfile was set to 1. Its default value was used to be 0. 
Conditions required for the issue to occur:
1. The system is configured for dual boot.
2. The use_devicesfiles value in /etc/lvm.conf should be 1 by default or it should be set to 1 when during initial system setup.
3. An NvME device with firmware which has this bug.
4. The two kernels in the dual boot setup must differ in handling the nvme quirks, one kernel must have NVME_QUIRK_BOGUS_NSID set for this Samsung PM173X device and the other one should not.

Behavior:
When 1st booted in kernel which doesn't have this NVME_QUIRK_BOGUS_NSID quirk set. The system has root volume and other partitions configured on the Samsung NvME device, and the corresponding devices entries are created in /etc/lvm/device/devicesfile based on the EUID. The entries made in this file limits the visibility of the lvm devices. These euids are unique and are requested directly from the devic.
After configuring the setup, system is rebooted into 2nd kernel, which has NVME_QUIRK_BOGUS_NSID quirk set. When quirk is set the nvme driver generate an euid instead of requesting them from the device, this euId is of the format of nvme-<vendor id>-<serial no in hex>-<model no. in hex>-<namespace id>.  And since use_devicesfile is set, the lvm relies on entries made in /etc/lvm/device/devicesfile. But due to mismatch in euid formats between the two kernels,  lvm fails to identify the device, as a result, any volume residing on this device become invisible, causing the boot to fail since no root volume available.

The failure works the other way around also, i.e., if system is configured with kernel with NVME_QUIRK_BOGUS_NSID quirk set and then booted into the kernel with NVME_QUIRK_BOGUS_NSID quirk not set. This mismatch in getting the id leads to volume not visible.

So, the issue is inconsistency in EUID between two kernels and without both kernel having same quirk set or unset the volumes will remain invisible in one of the kernels.

Thanks,
Shminder

> -----Original Message-----
> From: Christoph Hellwig <hch@lst.de>
> Sent: Friday, May 16, 2025 12:46 PM
> To: Shminderjit Singh <shminderjit.singh@oracle.com>
> Cc: Christoph Hellwig <hch@lst.de>; kbusch@kernel.org; axboe@fb.com;
> sagi@grimberg.me; linux-nvme@lists.infradead.org; Junxiao Bi
> <junxiao.bi@oracle.com>
> Subject: [External] : Re: [PATCH 1/1] nvme-pci: Add quirk for Samsung
> PM173X with Subsystem Vendor id:0x108e
> 
> On Fri, May 16, 2025 at 07:13:47AM +0000, Shminderjit Singh wrote:
> > Hi Christoph,
> >
> > This device is widely used both within and outside the organization. Applying
> a firmware fix is not viable option. Since this is firmware specific bug, I am
> adding a flag for OEM specific devices only.
> 
> The general rule is that for enterprise devices we expect you to fix firmware
> bugs in firmware.  And skipping all IDs suddently for an old device also seems
> like a really odd bug report that you did not even manage to explain.



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

end of thread, other threads:[~2025-05-16  8:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-16  6:30 [PATCH 0/1] Add quirk for Samsung PM173X with Subsystem Vendor Shminderjit Singh
2025-05-16  6:30 ` [PATCH 1/1] nvme-pci: Add quirk for Samsung PM173X with Subsystem Vendor id:0x108e Shminderjit Singh
2025-05-16  6:36   ` Christoph Hellwig
2025-05-16  7:13     ` Shminderjit Singh
2025-05-16  7:15       ` Christoph Hellwig
2025-05-16  8:13         ` [External] : " Shminderjit Singh

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