ACPI / scan: No implicit wake notification for buttons
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 14 Jul 2014 20:41:41 +0000 (22:41 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 23 Jul 2014 21:13:19 +0000 (23:13 +0200)
commitbd9b2f9aff26c185c1f8e0cd08a850ee4ace391a
treed566da1fdad50aad82a8538e626827c1fe44ae21
parent9c14cc44575ab7faae6bcb5821e6cad5f0d8238d
ACPI / scan: No implicit wake notification for buttons

The ACPI device enumeration code in Linux assumes that buttons always
are wakeup devices, so it calls acpi_setup_gpe_for_wake() for them
which leads to undesirable side effects.  Namely, that function sets
up implicit device wake notification mechanism for a given GPE if
there is no handler method in the ACPI namespace, which from the
ACPICA's perspective means that there always is a way to handle
that GPE if enabled.  However, we don't handle wake notify events
for buttons, so if there are no handler methods for their GPEs in
the namespace, enabling a button GPE at run time leads to a GPE
storm in some cases (the GPE triggers, ACPICA carries out the
implicit wake notification for it which isn't handled, so the
GPE triggers again and so on).

To prevent that from happening use acpi_mark_gpe_for_wake()
instead of acpi_setup_gpe_for_wake() for buttons which will cause
ACPICA to only enable button GPEs if there are handler methods for
the in the namespace.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/scan.c
This page took 0.025799 seconds and 5 git commands to generate.