[PATCH v2] nvme: Look for StorageD3Enable on companion ACPI device instead

Bjorn Helgaas bhelgaas at google.com
Thu May 27 08:52:43 PDT 2021


On Thu, May 27, 2021 at 9:44 AM Limonciello, Mario
<mario.limonciello at amd.com> wrote:
> On 5/27/2021 09:35, Christoph Hellwig wrote:
> > Adding Raul who has been asking for something like this as well.
>
> > I'd also really like to move nvme_acpi_storage_d3 out of the NVMe
> > driver.  The Microsoft document that the original document references
> > makes it very clear that this is not NVMe specific, but also covers
> > at least AHCI.  On top of that the platform simply can't know what kind
> > of PCIe device is in any given slot.  Last but not least this will also
> > allow us to add quirks for devices that fail to properly mark this
> > misfeature in the ACPI tables.
>
> +Bjorn
>
> Back when this feature was first submitted, that was actually the
> initial way that it was done, but Bjorn had preferred to see it move
> into the NVME driver directly:
>
> https://lore.kernel.org/linux-nvme/20200625173053.GA2694537@bjorn-Precision-5520/
>
> Bjorn, are you OK with this coming "back" to PCI based on Christoph's
> comments?

My point was that the PCI core can do nothing with this information,
so it doesn't seem like putting it in PCI doesn't really gain
anything.  The Microsoft document you reference ([1]) doesn't mention
PCI or PCIe.  As far as I know, there's no PCI spec that mentions
"StorageD3Enable".

I agree that [1] doesn't seem to be NVMe-specific, since it also
mentions SATA, so it might make sense to look for "StorageD3Enable"
somewhere other than the NVMe driver.  I'm just not convinced the PCI
core is the best place.  I have the impression that it's possible to
have non-PCI SATA or AHCI devices (correct me if I'm wrong), and
"StorageD3Enable" could apply to them as well.

[1] https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/power-management-for-storage-hardware-devices-intro



More information about the Linux-nvme mailing list