stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 5.4] nvme-pci: Move enumeration by class to be last in the table
@ 2023-02-08  3:08 Gwendal Grignou
  2023-02-14  8:41 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Gwendal Grignou @ 2023-02-08  3:08 UTC (permalink / raw)
  To: andriy.shevchenko, gregkh
  Cc: stable, Keith Busch, Sagi Grimberg, Chaitanya Kulkarni,
	Christoph Hellwig, Gwendal Grignou

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

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.

[ Upstream commit 0b85f59d30b91bd2b93ea7ef0816a4b7e7039e8c ]

Without this change, quirks set in driver_data added after the catch-all
are ignored.

Cc: <stable@vger.kernel.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
---
 drivers/nvme/host/pci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 5d62d1042c0e6..a58711c488509 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3199,7 +3199,6 @@ static const struct pci_device_id nvme_id_table[] = {
 				NVME_QUIRK_IGNORE_DEV_SUBNQN, },
 	{ PCI_DEVICE(0x1c5c, 0x1504),   /* SK Hynix PC400 */
 		.driver_data = NVME_QUIRK_DISABLE_WRITE_ZEROES, },
-	{ PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_EXPRESS, 0xffffff) },
 	{ PCI_DEVICE(0x2646, 0x2263),   /* KINGSTON A2000 NVMe SSD  */
 		.driver_data = NVME_QUIRK_NO_DEEPEST_PS, },
 	{ PCI_DEVICE(PCI_VENDOR_ID_APPLE, 0x2001),
@@ -3209,6 +3208,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.39.1.519.gcb327c4b5f-goog


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

* Re: [PATCH 5.4] nvme-pci: Move enumeration by class to be last in the table
  2023-02-08  3:08 [PATCH 5.4] nvme-pci: Move enumeration by class to be last in the table Gwendal Grignou
@ 2023-02-14  8:41 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2023-02-14  8:41 UTC (permalink / raw)
  To: Gwendal Grignou
  Cc: andriy.shevchenko, stable, Keith Busch, Sagi Grimberg,
	Chaitanya Kulkarni, Christoph Hellwig

On Tue, Feb 07, 2023 at 07:08:24PM -0800, Gwendal Grignou wrote:
> From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> 
> 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.
> 
> [ Upstream commit 0b85f59d30b91bd2b93ea7ef0816a4b7e7039e8c ]
> 
> Without this change, quirks set in driver_data added after the catch-all
> are ignored.
> 
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Reviewed-by: Keith Busch <kbusch@kernel.org>
> Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
> Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
> ---
>  drivers/nvme/host/pci.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Now queued up, thanks.

greg k-h

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

end of thread, other threads:[~2023-02-14  8:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-08  3:08 [PATCH 5.4] nvme-pci: Move enumeration by class to be last in the table Gwendal Grignou
2023-02-14  8:41 ` Greg KH

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).