From: Jianlin Lv <iecedge@gmail.com>
To: kbusch@kernel.org, axboe@kernel.dk, hch@lst.de, sagi@grimberg.me
Cc: linux-nvme@lists.infradead.org, linux-kernel@vger.kernel.org,
jianlv@ebay.com, iecedge@gmail.com
Subject: [PATCH] nvme-pci: Remove NVME_QUIRK_BOGUS_NID for device vendors
Date: Sat, 8 Mar 2025 22:11:02 +0800 [thread overview]
Message-ID: <20250308141102.34101-1-iecedge@gmail.com> (raw)
After commit ac522fc6c316 ("nvme: don't reject probe due to duplicate IDs
for single-ported PCIe devices") merged, vendors no longer need to use
quirks in the PCI ID entry to work around the issue of duplicate IDs.
The NVME_QUIRK_BOGUS_NID flag changes the format of device attribute file
names under /dev/disk/by-id/.
For example, /dev/disk/by-id/nvme-eui.xxx -> /dev/disk/by-id/nvme-nvme.xxx.
Considering that naming formats need to have high stability and
recognizability, it is more prudent to make changes only for rare,
sporadic cases rather than implementing comprehensive changes. Therefore,
this patch remove default setting of NVME_QUIRK_BOGUS_NID flag for vendors,
and the flag is added dynamically only when duplicate IDs is detected,
as implemented in ac522fc6c3165f.
Signed-off-by: Jianlin Lv <iecedge@gmail.com>
---
drivers/nvme/host/pci.c | 63 +++++------------------------------------
1 file changed, 7 insertions(+), 56 deletions(-)
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 640590b21728..9ae73224d4d7 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3592,8 +3592,7 @@ static const struct pci_device_id nvme_id_table[] = {
NVME_QUIRK_DEALLOCATE_ZEROES, },
{ PCI_VDEVICE(INTEL, 0x0a54), /* Intel P4500/P4600 */
.driver_data = NVME_QUIRK_STRIPE_SIZE |
- NVME_QUIRK_IGNORE_DEV_SUBNQN |
- NVME_QUIRK_BOGUS_NID, },
+ NVME_QUIRK_IGNORE_DEV_SUBNQN, },
{ PCI_VDEVICE(INTEL, 0x0a55), /* Dell Express Flash P4600 */
.driver_data = NVME_QUIRK_STRIPE_SIZE, },
{ PCI_VDEVICE(INTEL, 0xf1a5), /* Intel 600P/P3100 */
@@ -3612,11 +3611,9 @@ static const struct pci_device_id nvme_id_table[] = {
{ PCI_DEVICE(0x1217, 0x8760), /* O2 Micro 64GB Steam Deck */
.driver_data = NVME_QUIRK_DMAPOOL_ALIGN_512, },
{ PCI_DEVICE(0x126f, 0x2262), /* Silicon Motion generic */
- .driver_data = NVME_QUIRK_NO_DEEPEST_PS |
- NVME_QUIRK_BOGUS_NID, },
+ .driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
{ PCI_DEVICE(0x126f, 0x2263), /* Silicon Motion unidentified */
- .driver_data = NVME_QUIRK_NO_NS_DESC_LIST |
- NVME_QUIRK_BOGUS_NID, },
+ .driver_data = NVME_QUIRK_NO_NS_DESC_LIST, },
{ PCI_DEVICE(0x1bb1, 0x0100), /* Seagate Nytro Flash Storage */
.driver_data = NVME_QUIRK_DELAY_BEFORE_CHK_RDY |
NVME_QUIRK_NO_NS_DESC_LIST, },
@@ -3634,11 +3631,8 @@ static const struct pci_device_id nvme_id_table[] = {
NVME_QUIRK_IGNORE_DEV_SUBNQN, },
{ PCI_DEVICE(0x15b7, 0x5008), /* Sandisk SN530 */
.driver_data = NVME_QUIRK_BROKEN_MSI },
- { PCI_DEVICE(0x1987, 0x5012), /* Phison E12 */
- .driver_data = NVME_QUIRK_BOGUS_NID, },
{ PCI_DEVICE(0x1987, 0x5016), /* Phison E16 */
- .driver_data = NVME_QUIRK_IGNORE_DEV_SUBNQN |
- NVME_QUIRK_BOGUS_NID, },
+ .driver_data = NVME_QUIRK_IGNORE_DEV_SUBNQN, },
{ PCI_DEVICE(0x1987, 0x5019), /* phison E19 */
.driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
{ PCI_DEVICE(0x1987, 0x5021), /* Phison E21 */
@@ -3646,24 +3640,15 @@ static const struct pci_device_id nvme_id_table[] = {
{ PCI_DEVICE(0x1b4b, 0x1092), /* Lexar 256 GB SSD */
.driver_data = NVME_QUIRK_NO_NS_DESC_LIST |
NVME_QUIRK_IGNORE_DEV_SUBNQN, },
- { PCI_DEVICE(0x1cc1, 0x33f8), /* ADATA IM2P33F8ABR1 1 TB */
- .driver_data = NVME_QUIRK_BOGUS_NID, },
{ PCI_DEVICE(0x10ec, 0x5762), /* ADATA SX6000LNP */
- .driver_data = NVME_QUIRK_IGNORE_DEV_SUBNQN |
- NVME_QUIRK_BOGUS_NID, },
- { PCI_DEVICE(0x10ec, 0x5763), /* ADATA SX6000PNP */
- .driver_data = NVME_QUIRK_BOGUS_NID, },
+ .driver_data = NVME_QUIRK_IGNORE_DEV_SUBNQN, },
{ PCI_DEVICE(0x1cc1, 0x8201), /* ADATA SX8200PNP 512GB */
.driver_data = 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(0x1344, 0x6001), /* Micron Nitro NVMe */
- .driver_data = NVME_QUIRK_BOGUS_NID, },
{ PCI_DEVICE(0x1c5c, 0x1504), /* SK Hynix PC400 */
.driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
- { PCI_DEVICE(0x1c5c, 0x174a), /* SK Hynix P31 SSD */
- .driver_data = NVME_QUIRK_BOGUS_NID, },
{ PCI_DEVICE(0x1c5c, 0x1D59), /* SK Hynix BC901 */
.driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
{ PCI_DEVICE(0x15b7, 0x2001), /* Sandisk Skyhawk */
@@ -3671,12 +3656,9 @@ static const struct pci_device_id nvme_id_table[] = {
{ PCI_DEVICE(0x1d97, 0x2263), /* SPCC */
.driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
{ PCI_DEVICE(0x144d, 0xa80b), /* Samsung PM9B1 256G and 512G */
- .driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES |
- NVME_QUIRK_BOGUS_NID, },
+ .driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
{ PCI_DEVICE(0x144d, 0xa809), /* Samsung MZALQ256HBJD 256G */
.driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
- { PCI_DEVICE(0x144d, 0xa802), /* Samsung SM953 */
- .driver_data = NVME_QUIRK_BOGUS_NID, },
{ PCI_DEVICE(0x1cc4, 0x6303), /* UMIS RPJTJ512MGE1QDY 512G */
.driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
{ PCI_DEVICE(0x1cc4, 0x6302), /* UMIS RPJTJ256MGE1QDY 256G */
@@ -3697,43 +3679,12 @@ static const struct pci_device_id nvme_id_table[] = {
.driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
{ PCI_DEVICE(0x2646, 0x501E), /* KINGSTON OM3PGP4xxxxQ OS21011 NVMe SSD */
.driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
- { PCI_DEVICE(0x1f40, 0x1202), /* Netac Technologies Co. NV3000 NVMe SSD */
- .driver_data = NVME_QUIRK_BOGUS_NID, },
- { PCI_DEVICE(0x1f40, 0x5236), /* Netac Technologies Co. NV7000 NVMe SSD */
- .driver_data = NVME_QUIRK_BOGUS_NID, },
- { PCI_DEVICE(0x1e4B, 0x1001), /* MAXIO MAP1001 */
- .driver_data = NVME_QUIRK_BOGUS_NID, },
- { PCI_DEVICE(0x1e4B, 0x1002), /* MAXIO MAP1002 */
- .driver_data = NVME_QUIRK_BOGUS_NID, },
- { PCI_DEVICE(0x1e4B, 0x1202), /* MAXIO MAP1202 */
- .driver_data = NVME_QUIRK_BOGUS_NID, },
- { PCI_DEVICE(0x1e4B, 0x1602), /* MAXIO MAP1602 */
- .driver_data = NVME_QUIRK_BOGUS_NID, },
- { PCI_DEVICE(0x1cc1, 0x5350), /* ADATA XPG GAMMIX S50 */
- .driver_data = NVME_QUIRK_BOGUS_NID, },
- { PCI_DEVICE(0x1dbe, 0x5216), /* Acer/INNOGRIT FA100/5216 NVMe SSD */
- .driver_data = NVME_QUIRK_BOGUS_NID, },
- { PCI_DEVICE(0x1dbe, 0x5236), /* ADATA XPG GAMMIX S70 */
- .driver_data = NVME_QUIRK_BOGUS_NID, },
{ PCI_DEVICE(0x1e49, 0x0021), /* ZHITAI TiPro5000 NVMe SSD */
.driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
{ PCI_DEVICE(0x1e49, 0x0041), /* ZHITAI TiPro7000 NVMe SSD */
.driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
- { PCI_DEVICE(0xc0a9, 0x540a), /* Crucial P2 */
- .driver_data = NVME_QUIRK_BOGUS_NID, },
- { PCI_DEVICE(0x1d97, 0x2263), /* Lexar NM610 */
- .driver_data = NVME_QUIRK_BOGUS_NID, },
- { PCI_DEVICE(0x1d97, 0x1d97), /* Lexar NM620 */
- .driver_data = NVME_QUIRK_BOGUS_NID, },
{ PCI_DEVICE(0x1d97, 0x2269), /* Lexar NM760 */
- .driver_data = NVME_QUIRK_BOGUS_NID |
- NVME_QUIRK_IGNORE_DEV_SUBNQN, },
- { PCI_DEVICE(0x10ec, 0x5763), /* TEAMGROUP T-FORCE CARDEA ZERO Z330 SSD */
- .driver_data = NVME_QUIRK_BOGUS_NID, },
- { PCI_DEVICE(0x1e4b, 0x1602), /* HS-SSD-FUTURE 2048G */
- .driver_data = NVME_QUIRK_BOGUS_NID, },
- { PCI_DEVICE(0x10ec, 0x5765), /* TEAMGROUP MP33 2TB SSD */
- .driver_data = NVME_QUIRK_BOGUS_NID, },
+ .driver_data = 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.34.1
next reply other threads:[~2025-03-08 14:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-08 14:11 Jianlin Lv [this message]
2025-03-10 16:58 ` [PATCH] nvme-pci: Remove NVME_QUIRK_BOGUS_NID for device vendors Keith Busch
2025-03-11 7:53 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250308141102.34101-1-iecedge@gmail.com \
--to=iecedge@gmail.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=jianlv@ebay.com \
--cc=kbusch@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox