aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/sleep.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2009-09-08 17:16:24 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-09-09 17:19:24 -0400
commit0baed8da1ed91b664759f6c7f955b3a804457389 (patch)
tree673cb494cb7e98df71c33e16ab304a5618e263fe /drivers/acpi/sleep.c
parent9b83ccd2f14f647936dcfbf4a9a20c501007dd69 (diff)
PCI / ACPI PM: Propagate wake-up enable for devices w/o ACPI support
Some PCI devices (not PCI Express), like PCI add-on cards, can generate PME#, but they don't have any special platform wake-up support. For this reason, even if they generate PME# to wake up the system from a sleep state, wake-up events are not generated by the platform. It turns out that, at least on some systems, PCI bridges and the PCI host bridge have ACPI GPEs associated with them that, if enabled to generate wake-up events, allow the system to wake up if one of the add-on devices asserts PME# while the system is in a sleep state. Following this observation, if a PCI device without direct ACPI wake-up support is prepared to wake up the system during a transition into a sleep state (eg. suspend to RAM), try to configure the bridges on the path from the device to the root bridge to wake-up the system. Reviewed-by: Matthew Garrett <mjg59@srcf.ucam.org> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/acpi/sleep.c')
-rw-r--r--drivers/acpi/sleep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index ab889becd3f3..feece693d773 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -691,7 +691,7 @@ int acpi_pm_device_sleep_wake(struct device *dev, bool enable)
691 struct acpi_device *adev; 691 struct acpi_device *adev;
692 int error; 692 int error;
693 693
694 if (!device_may_wakeup(dev)) 694 if (!device_can_wakeup(dev))
695 return -EINVAL; 695 return -EINVAL;
696 696
697 handle = DEVICE_ACPI_HANDLE(dev); 697 handle = DEVICE_ACPI_HANDLE(dev);