]> git.baikalelectronics.ru Git - kernel.git/commit
PCI: ACPI: PM: Power up devices in D3cold before scanning them
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 4 Apr 2022 15:25:04 +0000 (17:25 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 13 Apr 2022 15:26:22 +0000 (17:26 +0200)
commit160b6592c69cb15763e01e90227a659dac5371af
tree07adbf677bfe632b787bce27b74278cc481ce6fc
parenta02ac35161177ae5d7e336be6d3e30299ebc0efe
PCI: ACPI: PM: Power up devices in D3cold before scanning them

The initial configuration of ACPI power resources on some systems
implies that some PCI devices on them are initially in D3cold.

In some cases, especially for PCIe Root Ports, this is a "logical"
D3cold, meaning that the configuration space of the device is
accessible, but some of its functionality may be missing, but it
very well may be real D3cold, in which case the device will not
be accessible at all.  However, the PCI bus type driver will need
to access its configuration space in order to enumerate it.

To prevent possible device enumeration failures that may ensue as
a result of ACPI power resources being initially in the "off"
state, power up all children of the host bridge ACPI device object
that hold valid _ADR objects (which indicates that they will be
enumerated by the PCI bus type driver) and do that to all children
of the ACPI device objects corresponding to PCI bridges (including
PCIe ports).

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
drivers/acpi/pci_root.c
drivers/pci/pci-acpi.c