diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2009-11-29 10:35:54 -0500 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2009-12-16 16:37:49 -0500 |
commit | dc1a94ae1749d14c55f8b54e9d92bd89df82d51a (patch) | |
tree | 6a5df75770f1ddf65d70a694fb83d00b8ec986c2 /drivers/pci/pci-acpi.c | |
parent | 15293df82bd1c15196e7cb336130c243e9a41806 (diff) |
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: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/pci-acpi.c')
-rw-r--r-- | drivers/pci/pci-acpi.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c index cc617ddd33d0..7e2829538a4c 100644 --- a/drivers/pci/pci-acpi.c +++ b/drivers/pci/pci-acpi.c | |||
@@ -112,11 +112,7 @@ static bool acpi_pci_can_wakeup(struct pci_dev *dev) | |||
112 | static void acpi_pci_propagate_wakeup_enable(struct pci_bus *bus, bool enable) | 112 | static void acpi_pci_propagate_wakeup_enable(struct pci_bus *bus, bool enable) |
113 | { | 113 | { |
114 | while (bus->parent) { | 114 | while (bus->parent) { |
115 | struct pci_dev *bridge = bus->self; | 115 | if (!acpi_pm_device_sleep_wake(&bus->self->dev, enable)) |
116 | int ret; | ||
117 | |||
118 | ret = acpi_pm_device_sleep_wake(&bridge->dev, enable); | ||
119 | if (!ret || pci_is_pcie(bridge)) | ||
120 | return; | 116 | return; |
121 | bus = bus->parent; | 117 | bus = bus->parent; |
122 | } | 118 | } |
@@ -131,9 +127,7 @@ static int acpi_pci_sleep_wake(struct pci_dev *dev, bool enable) | |||
131 | if (acpi_pci_can_wakeup(dev)) | 127 | if (acpi_pci_can_wakeup(dev)) |
132 | return acpi_pm_device_sleep_wake(&dev->dev, enable); | 128 | return acpi_pm_device_sleep_wake(&dev->dev, enable); |
133 | 129 | ||
134 | if (!pci_is_pcie(dev)) | 130 | acpi_pci_propagate_wakeup_enable(dev->bus, enable); |
135 | acpi_pci_propagate_wakeup_enable(dev->bus, enable); | ||
136 | |||
137 | return 0; | 131 | return 0; |
138 | } | 132 | } |
139 | 133 | ||