summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/sleep.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-07-19 21:43:12 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-07-20 10:44:24 -0400
commit880a66275ef4d1e08e5d4dcf4cec768de18c68ef (patch)
treea627b30bec5389d5dc3ac77a964f82108f7fc6ba /drivers/acpi/sleep.c
parent6ed860052906146cb2d9c71e7dc092053bc7f442 (diff)
ACPI / PM / EC: Flush all EC work in acpi_freeze_sync()
Commit eed4d47efe95 (ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle) introduced acpi_freeze_sync() whose purpose is to flush all of the processing of possible wakeup events signaled via the ACPI SCI. However, it doesn't flush the query workqueue used by the EC driver, so the events generated by the EC may not be processed timely which leads to issues (increased overhead at least, lost events possibly). To fix that introduce acpi_ec_flush_work() that will flush all of the outstanding EC work and call it from acpi_freeze_sync(). Fixes: eed4d47efe95 (ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle) Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/sleep.c')
-rw-r--r--drivers/acpi/sleep.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index be17664736b2..fa8243c5c062 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -777,11 +777,11 @@ static void acpi_freeze_sync(void)
777 /* 777 /*
778 * Process all pending events in case there are any wakeup ones. 778 * Process all pending events in case there are any wakeup ones.
779 * 779 *
780 * The EC driver uses the system workqueue, so that one needs to be 780 * The EC driver uses the system workqueue and an additional special
781 * flushed too. 781 * one, so those need to be flushed too.
782 */ 782 */
783 acpi_ec_flush_work();
783 acpi_os_wait_events_complete(); 784 acpi_os_wait_events_complete();
784 flush_scheduled_work();
785 s2idle_wakeup = false; 785 s2idle_wakeup = false;
786} 786}
787 787