public inbox for linux-nvme@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] nvme: move the Samsung X5 quirk entry to the core quirks
@ 2022-06-17  8:32 Christoph Hellwig
  2022-06-17 14:53 ` Pankaj Raghav
  2022-06-17 15:00 ` Jason A. Donenfeld
  0 siblings, 2 replies; 3+ messages in thread
From: Christoph Hellwig @ 2022-06-17  8:32 UTC (permalink / raw)
  To: kbusch; +Cc: sagi, monish.kumar.r, Jason, linux-nvme

This device shares the PCI ID with the Samsung 970 Evo Plus that
does not need or want the quirks.  Move the the quirk entry to the
core table based on the model number instead.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/nvme/host/core.c | 14 ++++++++++++++
 drivers/nvme/host/pci.c  |  4 ----
 2 files changed, 14 insertions(+), 4 deletions(-)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 24165daee3c8f0..bfc5568a447a20 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -2546,6 +2546,20 @@ static const struct nvme_core_quirk_entry core_quirks[] = {
 		.vid = 0x1e0f,
 		.mn = "KCD6XVUL6T40",
 		.quirks = NVME_QUIRK_NO_APST,
+	},
+	{
+		/*
+		 * The external Samsung X5 SSD fails initialization without a
+		 * delay before checking if it is ready and has a whole set of
+		 * other problems.  To make this even more interesting, it
+		 * shares the PCI ID with internal Samsung 970 Evo Plus that
+		 * does not need or want these quirks.
+		 */
+		.vid = 0x144d,
+		.mn = "Samsung Portable SSD X5",
+		.quirks = NVME_QUIRK_DELAY_BEFORE_CHK_RDY |
+			  NVME_QUIRK_NO_DEEPEST_PS |
+			  NVME_QUIRK_IGNORE_DEV_SUBNQN,
 	}
 };
 
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 48f4f6eb877bcc..d05ee8fb23e084 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3483,10 +3483,6 @@ static const struct pci_device_id nvme_id_table[] = {
 				NVME_QUIRK_128_BYTES_SQES |
 				NVME_QUIRK_SHARED_TAGS |
 				NVME_QUIRK_SKIP_CID_GEN },
-	{ PCI_DEVICE(0x144d, 0xa808),   /* Samsung X5 */
-		.driver_data =  NVME_QUIRK_DELAY_BEFORE_CHK_RDY|
-				NVME_QUIRK_NO_DEEPEST_PS |
-				NVME_QUIRK_IGNORE_DEV_SUBNQN, },
 	{ PCI_DEVICE_CLASS(PCI_CLASS_STORAGE_EXPRESS, 0xffffff) },
 	{ 0, }
 };
-- 
2.30.2



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

* Re: [PATCH] nvme: move the Samsung X5 quirk entry to the core quirks
  2022-06-17  8:32 [PATCH] nvme: move the Samsung X5 quirk entry to the core quirks Christoph Hellwig
@ 2022-06-17 14:53 ` Pankaj Raghav
  2022-06-17 15:00 ` Jason A. Donenfeld
  1 sibling, 0 replies; 3+ messages in thread
From: Pankaj Raghav @ 2022-06-17 14:53 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: kbusch, sagi, monish.kumar.r, Jason, linux-nvme

On Fri, Jun 17, 2022 at 10:32:06AM +0200, Christoph Hellwig wrote:
> This device shares the PCI ID with the Samsung 970 Evo Plus that
> does not need or want the quirks.  Move the the quirk entry to the
> core table based on the model number instead.
> 
Can you add the thread that has the report in the commit log for
traceability?
https://lore.kernel.org/lkml/CAHmME9pwz4q0m-pSUy7ReWu4nNzxySNcYZrqyDZiTuGxHN=1NQ@mail.gmail.com/
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
Reviewed-by: Pankaj Raghav <p.raghav@samsung.com>


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

* Re: [PATCH] nvme: move the Samsung X5 quirk entry to the core quirks
  2022-06-17  8:32 [PATCH] nvme: move the Samsung X5 quirk entry to the core quirks Christoph Hellwig
  2022-06-17 14:53 ` Pankaj Raghav
@ 2022-06-17 15:00 ` Jason A. Donenfeld
  1 sibling, 0 replies; 3+ messages in thread
From: Jason A. Donenfeld @ 2022-06-17 15:00 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Keith Busch, Sagi Grimberg, monish.kumar.r,
	open list:NVM EXPRESS DRIVER

Hi Christoph,

You might want a Fixes and a Cc: stable@ on there.

Jason


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

end of thread, other threads:[~2022-06-17 15:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-17  8:32 [PATCH] nvme: move the Samsung X5 quirk entry to the core quirks Christoph Hellwig
2022-06-17 14:53 ` Pankaj Raghav
2022-06-17 15:00 ` Jason A. Donenfeld

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox