Merge tag 'acpi-5.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 5 Apr 2019 00:48:11 +0000 (14:48 -1000)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 5 Apr 2019 00:48:11 +0000 (14:48 -1000)
Pull ACPI fix from Rafael Wysocki:
 "Prevent stale GPE events from triggering spurious system wakeups from
  suspend-to-idle (Furquan Shaikh)"

* tag 'acpi-5.1-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPICA: Clear status of GPEs before enabling them

drivers/acpi/acpica/evgpe.c

index 62d3aa7..5e9d734 100644 (file)
@@ -81,8 +81,12 @@ acpi_status acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info)
 
        ACPI_FUNCTION_TRACE(ev_enable_gpe);
 
-       /* Enable the requested GPE */
+       /* Clear the GPE status */
+       status = acpi_hw_clear_gpe(gpe_event_info);
+       if (ACPI_FAILURE(status))
+               return_ACPI_STATUS(status);
 
+       /* Enable the requested GPE */
        status = acpi_hw_low_set_gpe(gpe_event_info, ACPI_GPE_ENABLE);
        return_ACPI_STATUS(status);
 }