[bug report] Duplicate IDs for nsid 1 on another drive

Chaitanya Kulkarni chaitanyak at nvidia.com
Tue May 2 14:22:11 PDT 2023


On 5/2/23 07:03, Daniel Smith wrote:
> Much appreciated. I created this diff from the latest stable source:
>
> diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
> index 7f25c0fe3a0b..be5fa7bae285 100644
> --- a/drivers/nvme/host/pci.c
> +++ b/drivers/nvme/host/pci.c
> @@ -3441,6 +3441,8 @@ static const struct pci_device_id nvme_id_table[] = {
>                                  NVME_QUIRK_IGNORE_DEV_SUBNQN, },
>          { PCI_DEVICE(0x10ec, 0x5763), /* TEAMGROUP T-FORCE CARDEA ZERO
> Z330 SSD */
>                  .driver_data = NVME_QUIRK_BOGUS_NID, },
> +       { PCI_DEVICE(0x10ec, 0x5765), /* TEAMGROUP MP33 2TB SSD */
> +               .driver_data = NVME_QUIRK_BOGUS_NID, },
>          { PCI_DEVICE(PCI_VENDOR_ID_AMAZON, 0x0061),
>                  .driver_data = NVME_QUIRK_DMA_ADDRESS_BITS_48, },
>          { PCI_DEVICE(PCI_VENDOR_ID_AMAZON, 0x0065),
> ________________________________
> From: Chaitanya Kulkarni <chaitanyak at nvidia.com>
> Sent: Tuesday, May 2, 2023 2:49 AM
> To: Daniel Smith <dansmith at ds.gy>; linux-nvme at lists.infradead.org
> <linux-nvme at lists.infradead.org>
> Subject: Re: [bug report] Duplicate IDs for nsid 1 on another drive
>
> On 5/1/23 21:44, Daniel Smith wrote:
>> Hello, I ran into a shoddy manufacturer which duplicates IDs in disks.
>> In this case the device is:
>>
>> VID:DID 10ec:5765 model:TEAM TM8FP6002T firmware:VC2S038D
>>
>> I was able to set NVME_QUIRK_BOGUS_NID, build, and verify it resolved
>> locally, but I'm completely out of my element to submit a proper patch
>> for this.
>>
> if you can share the diff using "git diff" I can help you to get your patch
> submitted ...
>
> -ck

can you please try this and make sure it's working :-


 From 7a9c1e8961b2bb27295dab1d27c0eff44d957dcd Mon Sep 17 00:00:00 2001
From: Chaitanya Kulkarni <kch at nvidia.com>
Date: Tue, 2 May 2023 14:12:04 -0700
Subject: [PATCH] nvme-pci: add bogus nid quirk for Teamgroup MP33

From: Daniel Smith <dansmith at ds.gy>

Add a quirk for Teamgroup MP33 that reports duplicate ids for disk.

Signed-off-by: Daniel Smith <dansmith at ds.gy>
[kch: patch formatting]
Signed-off-by: Chaitanya Kulkarni <kch at nvidia.com>
---
  drivers/nvme/host/pci.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 593f86323e25..7101507940d7 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3433,6 +3433,8 @@ static const struct pci_device_id nvme_id_table[] = {
          .driver_data = NVME_QUIRK_BOGUS_NID, },
      { PCI_DEVICE(0x1d97, 0x2269), /* Lexar NM760 */
          .driver_data = NVME_QUIRK_BOGUS_NID, },
+    { PCI_DEVICE(0x10ec, 0x5765), /* TEAMGROUP MP33 2TB SSD */
+        .driver_data = NVME_QUIRK_BOGUS_NID, },
      { PCI_DEVICE(PCI_VENDOR_ID_AMAZON, 0x0061),
          .driver_data = NVME_QUIRK_DMA_ADDRESS_BITS_48, },
      { PCI_DEVICE(PCI_VENDOR_ID_AMAZON, 0x0065),
-- 
2.40.0

Once I get the conformation I'll send out above patch ...

-ck




More information about the Linux-nvme mailing list