From: Keith Busch <kbusch@kernel.org>
To: linux-nvme@lists.infradead.org
Cc: hch@lst.de, Keith Busch <kbusch@kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>
Subject: [PATCH] nvme-pci: simple suspend quirk for vmd devices
Date: Thu, 10 Feb 2022 07:22:33 -0800 [thread overview]
Message-ID: <20220210152233.1657933-1-kbusch@kernel.org> (raw)
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
next reply other threads:[~2022-02-10 15:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-10 15:22 Keith Busch [this message]
2022-02-10 18:22 ` [PATCH] nvme-pci: simple suspend quirk for vmd devices Christoph Hellwig
2022-02-16 8:43 ` Christoph Hellwig
2022-02-16 12:45 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220210152233.1657933-1-kbusch@kernel.org \
--to=kbusch@kernel.org \
--cc=hch@lst.de \
--cc=linux-nvme@lists.infradead.org \
--cc=rafael@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.