[PATCH] nvme-pci: simple suspend quirk for vmd devices
Keith Busch
kbusch at kernel.org
Thu Feb 10 07:22:33 PST 2022
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 at kernel.org>
Signed-off-by: Keith Busch <kbusch at 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
More information about the Linux-nvme
mailing list