OSDN Git Service

ACPI / PM: Always enable wakeup GPEs when enabling device wakeup
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 22 Jul 2014 23:00:53 +0000 (01:00 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 22 Jul 2014 23:00:53 +0000 (01:00 +0200)
commitf35cec255557d1037ff0d772edfd6e7b1e92cdc0
tree2ee56c1eee38bee3aef538edeca8e97d45531100
parentc072530f391e33bd22ed0638c08f07528f154493
ACPI / PM: Always enable wakeup GPEs when enabling device wakeup

Wakeup GPEs are currently only enabled when setting up devices for
remote wakeup at run time.  During system-wide transitions they are
enabled by ACPICA at the very last stage of suspend (before asking
the BIOS to take over).  Of course, that only works for system
sleep states supported by ACPI, so in particular it doesn't work
for the "freeze" sleep state.

For this reason, modify the ACPI core device PM code to enable wakeup
GPEs for devices when setting them up for wakeup regardless of whether
that is remote wakeup at runtime or system wakeup.  That allows the
same device wakeup setup routine to be used for both runtime PM and
system-wide PM and makes it possible to reduce code size quite a bit.

This make ACPI-based PCI Wake-on-LAN work with the "freeze" sleep
state on my venerable Toshiba Portege R500 and should help other
systems too.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/device_pm.c
include/acpi/acpi_bus.h