]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nvme-pci: look for StorageD3Enable on companion ACPI device instead
authorMario Limonciello <mario.limonciello@amd.com>
Fri, 28 May 2021 16:02:34 +0000 (11:02 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 14:59:40 +0000 (16:59 +0200)
commit19f1aa9d3a52e632dbc6b21a2cb78b8308a9448e
treec9d705c4531201b798809abb3d53568a07daa0b3
parenta31f9aa6858bf5ffd264fb89230f7ea7a4492ff5
nvme-pci: look for StorageD3Enable on companion ACPI device instead

[ Upstream commit e21e0243e7b0f1c2a21d21f4d115f7b37175772a ]

The documentation around the StorageD3Enable property hints that it
should be made on the PCI device.  This is where newer AMD systems set
the property and it's required for S0i3 support.

So rather than look for nodes of the root port only present on Intel
systems, switch to the companion ACPI device for all systems.
David Box from Intel indicated this should work on Intel as well.

Link: https://lore.kernel.org/linux-nvme/YK6gmAWqaRmvpJXb@google.com/T/#m900552229fa455867ee29c33b854845fce80ba70
Link: https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/power-management-for-storage-hardware-devices-intro
Fixes: df4f9bc4fb9c ("nvme-pci: add support for ACPI StorageD3Enable property")
Suggested-by: Liang Prike <Prike.Liang@amd.com>
Acked-by: Raul E Rangel <rrangel@chromium.org>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: David E. Box <david.e.box@linux.intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/host/pci.c