Linux-NVME Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH v2] nvme/pci: Add sleep quirk for Samsung and Toshiba drives
@ 2020-02-06 20:17 Jon Derrick
  2020-02-12  0:02 ` Keith Busch
  2020-02-19 15:10 ` Christoph Hellwig
  0 siblings, 2 replies; 4+ messages in thread
From: Jon Derrick @ 2020-02-06 20:17 UTC (permalink / raw)
  To: linux-nvme
  Cc: Shyjumon N, Sagi Grimberg, Jens Axboe, Edmund Nadolski,
	Keith Busch, Christoph Hellwig, Jon Derrick

From: Shyjumon N <shyjumon.n@intel.com>

The Samsung SSD SM981/PM981 and Toshiba SSD KBG40ZNT256G on the Lenovo
C640 platform experience runtime resume issues when the SSDs are kept in
sleep/suspend mode for long time.

This patch applies the 'Simple Suspend' quirk to these configurations.
With this patch, the issue had not been observed in a 1+ day test.

Reviewed-by: Jon Derrick <jonathan.derrick@intel.com>
Signed-off-by: Shyjumon N <shyjumon.n@intel.com>
---
V2: Rebased
Added my reviewed-by

 drivers/nvme/host/pci.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 610f380352de..46fa1acf3aee 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -2726,6 +2726,18 @@ static unsigned long check_vendor_combination_bug(struct pci_dev *pdev)
 		    (dmi_match(DMI_BOARD_NAME, "PRIME B350M-A") ||
 		     dmi_match(DMI_BOARD_NAME, "PRIME Z370-A")))
 			return NVME_QUIRK_NO_APST;
+	} else if ((pdev->vendor == 0x144d && (pdev->device == 0xa801 ||
+		    pdev->device == 0xa808 || pdev->device == 0xa809)) ||
+		   (pdev->vendor == 0x1e0f && pdev->device == 0x0001)) {
+		/*
+		 * Forcing to use host managed nvme power settings for
+		 * lowest idle power with quick resume latency on
+		 * Samsung and Toshiba SSDs based on suspend behavior
+		 * on Coffee Lake board for LENOVO C640
+		 */
+		if ((dmi_match(DMI_BOARD_VENDOR, "LENOVO")) &&
+		     dmi_match(DMI_BOARD_NAME, "LNVNB161216"))
+			return NVME_QUIRK_SIMPLE_SUSPEND;
 	}
 
 	return 0;
-- 
2.24.1


_______________________________________________
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 v2] nvme/pci: Add sleep quirk for Samsung and Toshiba drives
  2020-02-06 20:17 [PATCH v2] nvme/pci: Add sleep quirk for Samsung and Toshiba drives Jon Derrick
@ 2020-02-12  0:02 ` Keith Busch
  2020-02-19 15:10 ` Christoph Hellwig
  1 sibling, 0 replies; 4+ messages in thread
From: Keith Busch @ 2020-02-12  0:02 UTC (permalink / raw)
  To: Jon Derrick
  Cc: Shyjumon N, Sagi Grimberg, linux-nvme, Jens Axboe,
	Edmund Nadolski, Christoph Hellwig

On Thu, Feb 06, 2020 at 01:17:25PM -0700, Jon Derrick wrote:
> From: Shyjumon N <shyjumon.n@intel.com>
> 
> The Samsung SSD SM981/PM981 and Toshiba SSD KBG40ZNT256G on the Lenovo
> C640 platform experience runtime resume issues when the SSDs are kept in
> sleep/suspend mode for long time.
> 
> This patch applies the 'Simple Suspend' quirk to these configurations.
> With this patch, the issue had not been observed in a 1+ day test.
> 
> Reviewed-by: Jon Derrick <jonathan.derrick@intel.com>
> Signed-off-by: Shyjumon N <shyjumon.n@intel.com>

I'm not seeing a better option, but I'll just wait another day before
applying.

_______________________________________________
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 v2] nvme/pci: Add sleep quirk for Samsung and Toshiba drives
  2020-02-06 20:17 [PATCH v2] nvme/pci: Add sleep quirk for Samsung and Toshiba drives Jon Derrick
  2020-02-12  0:02 ` Keith Busch
@ 2020-02-19 15:10 ` Christoph Hellwig
  2020-02-19 15:43   ` Keith Busch
  1 sibling, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2020-02-19 15:10 UTC (permalink / raw)
  To: Jon Derrick
  Cc: Shyjumon N, Sagi Grimberg, linux-nvme, Jens Axboe,
	Edmund Nadolski, Keith Busch, Christoph Hellwig

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 v2] nvme/pci: Add sleep quirk for Samsung and Toshiba drives
  2020-02-19 15:10 ` Christoph Hellwig
@ 2020-02-19 15:43   ` Keith Busch
  0 siblings, 0 replies; 4+ messages in thread
From: Keith Busch @ 2020-02-19 15:43 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Shyjumon N, Sagi Grimberg, linux-nvme, Jens Axboe,
	Edmund Nadolski, Jon Derrick

Patch applied, started a new nvme-5.6-rc3 branch.

_______________________________________________
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, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-06 20:17 [PATCH v2] nvme/pci: Add sleep quirk for Samsung and Toshiba drives Jon Derrick
2020-02-12  0:02 ` Keith Busch
2020-02-19 15:10 ` Christoph Hellwig
2020-02-19 15:43   ` Keith Busch

Linux-NVME Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-nvme/0 linux-nvme/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-nvme linux-nvme/ https://lore.kernel.org/linux-nvme \
		linux-nvme@lists.infradead.org
	public-inbox-index linux-nvme

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-nvme


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git