Commit dc1a94ae authored by Rafael J. Wysocki's avatar Rafael J. Wysocki Committed by Jesse Barnes

PCI/PM: Propagate wake-up enable for PCIe devices too

Having read the PM part of the PCIe 2.0 specification more carefully
I think that it was a mistake to restrict the wake-up enable
propagation to non-PCIe devices, because if we do not request
control of the root ports' PME registers via OSC, PCIe PME is
supposed to be handled by the platform, just like the non-PCIe PME.
Even if we do that, the wake-up propagation is done to allow the
devices to wake up the system from sleep states which involves the
platform anyway, so it won't hurt.
Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent 15293df8
...@@ -112,11 +112,7 @@ static bool acpi_pci_can_wakeup(struct pci_dev *dev) ...@@ -112,11 +112,7 @@ static bool acpi_pci_can_wakeup(struct pci_dev *dev)
static void acpi_pci_propagate_wakeup_enable(struct pci_bus *bus, bool enable) static void acpi_pci_propagate_wakeup_enable(struct pci_bus *bus, bool enable)
{ {
while (bus->parent) { while (bus->parent) {
struct pci_dev *bridge = bus->self; if (!acpi_pm_device_sleep_wake(&bus->self->dev, enable))
int ret;
ret = acpi_pm_device_sleep_wake(&bridge->dev, enable);
if (!ret || pci_is_pcie(bridge))
return; return;
bus = bus->parent; bus = bus->parent;
} }
...@@ -131,9 +127,7 @@ static int acpi_pci_sleep_wake(struct pci_dev *dev, bool enable) ...@@ -131,9 +127,7 @@ static int acpi_pci_sleep_wake(struct pci_dev *dev, bool enable)
if (acpi_pci_can_wakeup(dev)) if (acpi_pci_can_wakeup(dev))
return acpi_pm_device_sleep_wake(&dev->dev, enable); return acpi_pm_device_sleep_wake(&dev->dev, enable);
if (!pci_is_pcie(dev)) acpi_pci_propagate_wakeup_enable(dev->bus, enable);
acpi_pci_propagate_wakeup_enable(dev->bus, enable);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment