All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvme-pci: simple suspend quirk for vmd devices
@ 2022-02-10 15:22 Keith Busch
  2022-02-10 18:22 ` Christoph Hellwig
  2022-02-16  8:43 ` Christoph Hellwig
  0 siblings, 2 replies; 4+ messages in thread
From: Keith Busch @ 2022-02-10 15:22 UTC (permalink / raw)
  To: linux-nvme; +Cc: hch, Keith Busch, Rafael J. Wysocki

Bug reports from users tell us platfroms with vmd enabled regressed
power when using nvme power management on s2idle. We can't get the
StorageD3Enable property on such devices so the driver used the wrong
suspend method. Add a simple suspend quirk for the domain since that is
the safest option.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=215467
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Signed-off-by: Keith Busch <kbusch@kernel.org>
---
 drivers/nvme/host/pci.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 6a99ed680915..6fa66d5d924e 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3094,6 +3094,12 @@ static int nvme_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 		dev_info(&pdev->dev,
 			 "platform quirk: setting simple suspend\n");
 		quirks |= NVME_QUIRK_SIMPLE_SUSPEND;
+	} else if (pci_domain_nr(pdev->bus) > 0xffff) {
+		/*
+		 * ACPI device properties are not reliable within VMD domains,
+		 * so assume the worst.
+		 */
+		quirks |= NVME_QUIRK_SIMPLE_SUSPEND;
 	}
 
 	/*
-- 
2.25.4



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

end of thread, other threads:[~2022-02-16 12:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-10 15:22 [PATCH] nvme-pci: simple suspend quirk for vmd devices Keith Busch
2022-02-10 18:22 ` Christoph Hellwig
2022-02-16  8:43 ` Christoph Hellwig
2022-02-16 12:45   ` Rafael J. Wysocki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.