Skip to contentSkip to conversation

nvme-pci: Move enumeration by class to be last in the table

PATCH Superseded Andy Shevchenko 4 participants 4 messages Feb 24, 2020 – Feb 25, 2020 NVMe

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvme-pci: Move enumeration by class to be last in the table

It's unusual that we have enumeration by class in the middle of the table. It might potentially be problematic in the future if we add another entry after it.

So, move class matching entry to be the last in the ID table.

While here, group Apple devices together with an additional comment line.

Cc Benjamin Herrenschmidt <[email protected]>
---
 drivers/nvme/host/pci.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/nvme/host/pci.c +4 -1
index ace4dd9e953c..4fcca6b4f8a2 100644
@@ -3120,7 +3120,8 @@ static const struct pci_device_id nvme_id_table[] = {
 	{ PCI_DEVICE(0x1cc1, 0x8201),   /* ADATA SX8200PNP 512GB */
 		.driver_data = NVME_QUIRK_NO_DEEPEST_PS |
 				NVME_QUIRK_IGNORE_DEV_SUBNQN, },
-	{ PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_EXPRESS, 0xffffff) },
+
+	/* Apple devices */
 	{ PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2001),
 		.driver_data = NVME_QUIRK_SINGLE_VECTOR },
 	{ PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2003) },
@@ -3128,6 +3129,8 @@ static const struct pci_device_id nvme_id_table[] = {
 		.driver_data = NVME_QUIRK_SINGLE_VECTOR |
 				NVME_QUIRK_128_BYTES_SQES |
 				NVME_QUIRK_SHARED_TAGS },
+
+	{ PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_EXPRESS, 0xffffff) },
 	{ 0, }
 };
 MODULE_DEVICE_TABLE(pci, nvme_id_table);
Signature · 7 lines
2.25.0


_______________________________________________
linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme
Reviewed-by on v1 1/1
#1 lore raw

Looks good.

Quoted 10 lines · Andy Shevchenko

It's unusual that we have enumeration by class in the middle of the table. It might potentially be problematic in the future if we add another entry after it.

So, move class matching entry to be the last in the ID table.

While here, group Apple devices together with an additional comment line.

Cc Benjamin Herrenschmidt <[email protected]>

_______________________________________________
linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme

maintainer Reviewed-by on v1 1/1
#2 lore raw
In reply to Andy Shevchenko
Quoted 7 lines · Andy Shevchenko

It's unusual that we have enumeration by class in the middle of the table. It might potentially be problematic in the future if we add another entry after it.

So, move class matching entry to be the last in the ID table.

While here, group Apple devices together with an additional comment line.

Looks good:

_______________________________________________
linux-nvme mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-nvme