]> git.baikalelectronics.ru Git - kernel.git/commit
ACPICA: Clear status of GPEs before enabling them
authorFurquan Shaikh <furquan@google.com>
Wed, 20 Mar 2019 22:28:44 +0000 (15:28 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 28 Mar 2019 09:27:02 +0000 (10:27 +0100)
commit7d90011797f3af8ee21bb7ae33d7dd7d2b0f0558
treeb8cd9abfe9916a87ad569f24afcaabfe2d6a9efa
parentb85d83bae525031a6bd85f15b7d05f521f7900d2
ACPICA: Clear status of GPEs before enabling them

Commit 25f09f14025e ("ACPICA: Events: Stop unconditionally clearing
ACPI IRQs during suspend/resume") was added to stop clearing event
status bits unconditionally in the system-wide suspend and resume
paths. This was done because of an issue with a laptop lid appaering
to be closed even when it was used to wake up the system from suspend
(see https://bugzilla.kernel.org/show_bug.cgi?id=196249), which
happened because event status bits were cleared unconditionally on
system resume. Though this change fixed the issue in the resume path,
it introduced regressions in a few suspend paths.

First regression was reported and fixed in the S5 entry path by commit
b5e093e2d031 ("ACPICA: Clear status of all events when entering S5").
Next regression was reported and fixed for all legacy sleep paths by
commit 89e9587b1d57 ("ACPICA: Clear status of all events when entering
sleep states").  However, there still is a suspend-to-idle regression,
since suspend-to-idle does not follow the legacy sleep paths.

In the suspend-to-idle case, wakeup is enabled as part of device
suspend.  If the status bits of wakeup GPEs are set when they are
enabled, it causes a premature system wakeup to occur.

To address that problem, partially revert commit 25f09f14025e to
restore GPE status bits clearing before the GPE is enabled in
acpi_ev_enable_gpe().

Fixes: 25f09f14025e ("ACPICA: Events: Stop unconditionally clearing ACPI IRQs during suspend/resume")
Signed-off-by: Furquan Shaikh <furquan@google.com>
Cc: 4.17+ <stable@vger.kernel.org> # 4.17+
[ rjw: Subject & changelog ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpica/evgpe.c