Linux-NVME Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] nvme/pci: Add sleep quirk for Samsung and Toshiba drives
@ 2020-01-21 19:30 Jon Derrick
  2020-01-22 17:25 ` Derrick, Jonathan
  0 siblings, 1 reply; 4+ messages in thread
From: Jon Derrick @ 2020-01-21 19:30 UTC (permalink / raw)
  To: linux-nvme
  Cc: Shyjumon N, Sagi Grimberg, Jens Axboe, Edmund Nadolski,
	Keith Busch, Christoph Hellwig, Jon Derrick

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

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.

Signed-off-by: Jon Derrick <jonathan.derrick@intel.com>
[jonathan.derrick: fix up commit message]
Signed-off-by: Shyjumon N <shyjumon.n@intel.com>
---
 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 d37dcc1b629e..4f7770fe2f41 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -2733,6 +2733,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.20.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] nvme/pci: Add sleep quirk for Samsung and Toshiba drives
  2020-01-21 19:30 [PATCH] nvme/pci: Add sleep quirk for Samsung and Toshiba drives Jon Derrick
@ 2020-01-22 17:25 ` Derrick, Jonathan
  2020-01-30 14:55   ` Christoph Hellwig
  0 siblings, 1 reply; 4+ messages in thread
From: Derrick, Jonathan @ 2020-01-22 17:25 UTC (permalink / raw)
  To: linux-nvme; +Cc: N, Shyjumon, sagi, axboe, Nadolski, Edmund, kbusch, hch

On Tue, 2020-01-21 at 12:30 -0700, Jon Derrick wrote:
> From: shyjumon <shyjumon.n@intel.com>
> 
> 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.
> 
> Signed-off-by: Jon Derrick <jonathan.derrick@intel.com>
> [jonathan.derrick: fix up commit message]
> Signed-off-by: Shyjumon N <shyjumon.n@intel.com>

Sorry the signoff ordering is reversed here. Should be Shyjumon first.

That being said, I wonder if there's something else the driver should
be doing for the whole range of devices and platform combos that seem
to require similar pm quirks.

_______________________________________________
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] nvme/pci: Add sleep quirk for Samsung and Toshiba drives
  2020-01-22 17:25 ` Derrick, Jonathan
@ 2020-01-30 14:55   ` Christoph Hellwig
  2020-02-03 16:19     ` Derrick, Jonathan
  0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2020-01-30 14:55 UTC (permalink / raw)
  To: Derrick, Jonathan
  Cc: axboe, sagi, linux-nvme, N, Shyjumon, Nadolski, Edmund, kbusch, hch

On Wed, Jan 22, 2020 at 05:25:26PM +0000, Derrick, Jonathan wrote:
> That being said, I wonder if there's something else the driver should
> be doing for the whole range of devices and platform combos that seem
> to require similar pm quirks.

Well, any idea of what we could do?  We're trying to follow the spec
here, but apparently drivers only get tested with one or two windows
drivers.  We could try to reverse engineer what they do, and given that
the only one with autonomous is the Intel one, maybe someone from Intel
could help?

_______________________________________________
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] nvme/pci: Add sleep quirk for Samsung and Toshiba drives
  2020-01-30 14:55   ` Christoph Hellwig
@ 2020-02-03 16:19     ` Derrick, Jonathan
  0 siblings, 0 replies; 4+ messages in thread
From: Derrick, Jonathan @ 2020-02-03 16:19 UTC (permalink / raw)
  To: hch; +Cc: axboe, sagi, linux-nvme, N,  Shyjumon, Nadolski, Edmund, kbusch, hch

On Thu, 2020-01-30 at 06:55 -0800, Christoph Hellwig wrote:
> On Wed, Jan 22, 2020 at 05:25:26PM +0000, Derrick, Jonathan wrote:
> > That being said, I wonder if there's something else the driver should
> > be doing for the whole range of devices and platform combos that seem
> > to require similar pm quirks.
> 
> Well, any idea of what we could do?  We're trying to follow the spec
> here, but apparently drivers only get tested with one or two windows
> drivers.  We could try to reverse engineer what they do, and given that
> the only one with autonomous is the Intel one, maybe someone from Intel
> could help?

Actually I was simply thinking of code organization. Right now some PM
quirks exist in pci.c and some in core.c. I can't comment on what other
vendors do and we're simply reactive to these issues in the platform.
_______________________________________________
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-01-21 19:30 [PATCH] nvme/pci: Add sleep quirk for Samsung and Toshiba drives Jon Derrick
2020-01-22 17:25 ` Derrick, Jonathan
2020-01-30 14:55   ` Christoph Hellwig
2020-02-03 16:19     ` Derrick, Jonathan

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