linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1] nvme-pci: Move enumeration by class to be last in the table
@ 2020-02-24  9:38 Andy Shevchenko
  2020-02-24 10:55 ` Chaitanya Kulkarni
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Andy Shevchenko @ 2020-02-24  9:38 UTC (permalink / raw)
  To: Keith Busch, Jens Axboe, linux-nvme, Christoph Hellwig, Sagi Grimberg
  Cc: Benjamin Herrenschmidt, 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 <benh@kernel.crashing.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/nvme/host/pci.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index ace4dd9e953c..4fcca6b4f8a2 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -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);
-- 
2.25.0


_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

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

* Re: [PATCH v1] nvme-pci: Move enumeration by class to be last in the table
  2020-02-24  9:38 [PATCH v1] nvme-pci: Move enumeration by class to be last in the table Andy Shevchenko
@ 2020-02-24 10:55 ` Chaitanya Kulkarni
  2020-02-24 17:13 ` Christoph Hellwig
  2020-02-25 20:27 ` Sagi Grimberg
  2 siblings, 0 replies; 4+ messages in thread
From: Chaitanya Kulkarni @ 2020-02-24 10:55 UTC (permalink / raw)
  To: Andy Shevchenko, Keith Busch, Jens Axboe, linux-nvme,
	Christoph Hellwig, Sagi Grimberg
  Cc: Benjamin Herrenschmidt

Looks good.

Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>

On 2/24/20 1:55 AM, Andy Shevchenko wrote:
> 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 <benh@kernel.crashing.org>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>



_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

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

* Re: [PATCH v1] nvme-pci: Move enumeration by class to be last in the table
  2020-02-24  9:38 [PATCH v1] nvme-pci: Move enumeration by class to be last in the table Andy Shevchenko
  2020-02-24 10:55 ` Chaitanya Kulkarni
@ 2020-02-24 17:13 ` Christoph Hellwig
  2020-02-25 20:27 ` Sagi Grimberg
  2 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2020-02-24 17:13 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: Sagi Grimberg, Benjamin Herrenschmidt, linux-nvme, Jens Axboe,
	Keith Busch, Christoph Hellwig

On Mon, Feb 24, 2020 at 11:38:23AM +0200, Andy Shevchenko wrote:
> 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:

Reviewed-by: Christoph Hellwig <hch@lst.de>

_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

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

* Re: [PATCH v1] nvme-pci: Move enumeration by class to be last in the table
  2020-02-24  9:38 [PATCH v1] nvme-pci: Move enumeration by class to be last in the table Andy Shevchenko
  2020-02-24 10:55 ` Chaitanya Kulkarni
  2020-02-24 17:13 ` Christoph Hellwig
@ 2020-02-25 20:27 ` Sagi Grimberg
  2 siblings, 0 replies; 4+ messages in thread
From: Sagi Grimberg @ 2020-02-25 20:27 UTC (permalink / raw)
  To: Andy Shevchenko, Keith Busch, Jens Axboe, linux-nvme, Christoph Hellwig
  Cc: Benjamin Herrenschmidt

Reviewed-by: Sagi Grimberg <sagi@grimberg.me>

_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

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

end of thread, other threads:[~2020-02-25 20:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-24  9:38 [PATCH v1] nvme-pci: Move enumeration by class to be last in the table Andy Shevchenko
2020-02-24 10:55 ` Chaitanya Kulkarni
2020-02-24 17:13 ` Christoph Hellwig
2020-02-25 20:27 ` Sagi Grimberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).