From: Christoph Hellwig <hch@lst.de>
To: Keith Busch <kbusch@kernel.org>
Cc: linux-nvme@lists.infradead.org, hch@lst.de,
"Rafael J. Wysocki" <rafael@kernel.org>
Subject: Re: [PATCH] nvme-pci: simple suspend quirk for vmd devices
Date: Wed, 16 Feb 2022 09:43:13 +0100 [thread overview]
Message-ID: <20220216084313.GA11360@lst.de> (raw)
In-Reply-To: <20220210152233.1657933-1-kbusch@kernel.org>
On Thu, Feb 10, 2022 at 07:22:33AM -0800, Keith Busch wrote:
> 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>
Rafael, can you try this on the affected platform?
(not for merge as-is)
diff --git a/arch/x86/pci/common.c b/arch/x86/pci/common.c
index 9e1e6b8d88763..49f4e54da919d 100644
--- a/arch/x86/pci/common.c
+++ b/arch/x86/pci/common.c
@@ -723,4 +723,5 @@ struct pci_dev *pci_real_dma_dev(struct pci_dev *dev)
return dev;
}
+EXPORT_SYMBOL_GPL(pci_real_dma_dev);
#endif
diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
index 6a99ed6809158..6edc8c514cbc8 100644
--- a/drivers/nvme/host/pci.c
+++ b/drivers/nvme/host/pci.c
@@ -3086,7 +3086,7 @@ static int nvme_probe(struct pci_dev *pdev, const struct pci_device_id *id)
quirks |= check_vendor_combination_bug(pdev);
- if (!noacpi && acpi_storage_d3(&pdev->dev)) {
+ if (!noacpi && acpi_storage_d3(&pci_real_dma_dev(pdev)->dev)) {
/*
* Some systems use a bios work around to ask for D3 on
* platforms that support kernel managed suspend.
next prev parent reply other threads:[~2022-02-16 8:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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=20220216084313.GA11360@lst.de \
--to=hch@lst.de \
--cc=kbusch@kernel.org \
--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.