]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI: EC: PM: Avoid flushing EC work when EC GPE is inactive
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 15 May 2020 10:58:19 +0000 (12:58 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 18 May 2020 11:15:13 +0000 (13:15 +0200)
commit3a6bde8046b29e4c1dcd4971724df69341aef3f5
tree3e4f9a72cb98ea6f8b96f723f0e0fdb53d3f9809
parentca92fa3f12680f04b5f2e3a0c7b4d682fb940556
ACPI: EC: PM: Avoid flushing EC work when EC GPE is inactive

Flushing the EC work while suspended to idle when the EC GPE status
is not set causes some EC wakeup events (notably power button and
lid ones) to be missed after a series of spurious wakeups on the Dell
XPS13 9360 in my office.

If that happens, the machine cannot be woken up from suspend-to-idle
by the power button or lid status change and it needs to be woken up
in some other way (eg. by a key press).

Flushing the EC work only after successful dispatching the EC GPE,
which means that its status has been set, avoids the issue, so change
the code in question accordingly.

Fixes: ca92fa3f1268 ("ACPI: EC: PM: Avoid premature returns from acpi_s2idle_wake()")
Cc: 5.4+ <stable@vger.kernel.org> # 5.4+
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Chris Chiu <chiu@endlessm.com>
drivers/acpi/ec.c
drivers/acpi/sleep.c