summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/evxface.c
diff options
context:
space:
mode:
authorErik Schmauss <erik.schmauss@intel.com>2018-03-14 16:12:59 -0700
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-03-18 18:52:00 +0100
commit87cd826b5979d91d4f2ba189e0652820f2da417f (patch)
treebf6d9d3f5edf4eb692af63289b2fbf6724465f8e /drivers/acpi/acpica/evxface.c
parent8d5934952f26c25431dbc21aa8ae7614bb8f88c3 (diff)
downloadop-kernel-dev-87cd826b5979d91d4f2ba189e0652820f2da417f.zip
op-kernel-dev-87cd826b5979d91d4f2ba189e0652820f2da417f.tar.gz
ACPICA: Events: Dispatch GPEs after enabling for the first time
After being enabled for the first time, the GPEs may have STS bits already set. Setting EN bits is not sufficient to trigger the GPEs again, so this patch polls GPEs after enabling them for the first time. This is a cleaner version on top of the "GPE clear" fix generated according to Mika's report and Rafael's original Linux based fix. Based on Linux commit originated from Rafael J. Wysocki, fixed by Lv Zheng. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/evxface.c')
-rw-r--r--drivers/acpi/acpica/evxface.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/evxface.c b/drivers/acpi/acpica/evxface.c
index 9b3c01b..b6e462f 100644
--- a/drivers/acpi/acpica/evxface.c
+++ b/drivers/acpi/acpica/evxface.c
@@ -1006,6 +1006,15 @@ acpi_remove_gpe_handler(acpi_handle gpe_device,
(ACPI_GPE_DISPATCH_TYPE(handler->original_flags) ==
ACPI_GPE_DISPATCH_NOTIFY)) && handler->originally_enabled) {
(void)acpi_ev_add_gpe_reference(gpe_event_info);
+ if (ACPI_GPE_IS_POLLING_NEEDED(gpe_event_info)) {
+
+ /* Poll edge triggered GPEs to handle existing events */
+
+ acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
+ (void)acpi_ev_detect_gpe(gpe_device, gpe_event_info,
+ gpe_number);
+ flags = acpi_os_acquire_lock(acpi_gbl_gpe_lock);
+ }
}
acpi_os_release_lock(acpi_gbl_gpe_lock, flags);
OpenPOWER on IntegriCloud