Commit 2ea1940b authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'pm-5.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management fix from Rafael Wysocki:
 "This makes a recently introduced suspend-to-idle wakeup issue on Dell
  XPS13 9360 go away"

* tag 'pm-5.7-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI: EC: PM: Avoid flushing EC work when EC GPE is inactive
parents 8e2b7f63 607b9df6
......@@ -2016,9 +2016,13 @@ bool acpi_ec_dispatch_gpe(void)
* to allow the caller to process events properly after that.
*/
ret = acpi_dispatch_gpe(NULL, first_ec->gpe);
if (ret == ACPI_INTERRUPT_HANDLED)
if (ret == ACPI_INTERRUPT_HANDLED) {
pm_pr_dbg("EC GPE dispatched\n");
/* Flush the event and query workqueues. */
acpi_ec_flush_work();
}
return false;
}
#endif /* CONFIG_PM_SLEEP */
......
......@@ -980,13 +980,6 @@ static int acpi_s2idle_prepare_late(void)
return 0;
}
static void acpi_s2idle_sync(void)
{
/* The EC driver uses special workqueues that need to be flushed. */
acpi_ec_flush_work();
acpi_os_wait_events_complete(); /* synchronize Notify handling */
}
static bool acpi_s2idle_wake(void)
{
if (!acpi_sci_irq_valid())
......@@ -1018,7 +1011,7 @@ static bool acpi_s2idle_wake(void)
return true;
/*
* Cancel the wakeup and process all pending events in case
* Cancel the SCI wakeup and process all pending events in case
* there are any wakeup ones in there.
*
* Note that if any non-EC GPEs are active at this point, the
......@@ -1026,8 +1019,7 @@ static bool acpi_s2idle_wake(void)
* should be missed by canceling the wakeup here.
*/
pm_system_cancel_wakeup();
acpi_s2idle_sync();
acpi_os_wait_events_complete();
/*
* The SCI is in the "suspended" state now and it cannot produce
......@@ -1060,7 +1052,8 @@ static void acpi_s2idle_restore(void)
* of GPEs.
*/
acpi_os_wait_events_complete(); /* synchronize GPE processing */
acpi_s2idle_sync();
acpi_ec_flush_work(); /* flush the EC driver's workqueues */
acpi_os_wait_events_complete(); /* synchronize Notify handling */
s2idle_wakeup = false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment