WSL2-Linux-Kernel/drivers/acpi
Rafael J. Wysocki 607b9df630 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: 7b301750f7 ("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>
2020-05-18 13:15:13 +02:00
..
acpica Merge branch 'acpica' 2020-04-06 16:23:31 +02:00
apei x86/mm: split vmalloc_sync_all() 2020-03-21 18:56:06 -07:00
arm64 ACPI/IORT: Remove direct access of dev->iommu_fwspec 2020-03-27 11:12:19 +01:00
dptf ACPI: Update Tiger Lake ACPI device IDs 2020-04-01 13:20:21 +02:00
nfit Merge branch 'for-5.7/libnvdimm' into libnvdimm-for-next 2020-04-02 19:55:17 -07:00
numa ACPI: NUMA: Up-level "map to online node" functionality 2020-02-17 10:49:06 -08:00
pmic
x86 ACPI: Convert to new X86 CPU match macros 2020-03-24 21:30:50 +01:00
Kconfig ACPI: Add new tiny-power-button driver to directly signal init 2020-02-13 23:36:23 +01:00
Makefile ACPI: Add new tiny-power-button driver to directly signal init 2020-02-13 23:36:23 +01:00
ac.c ACPI / AC: Cleanup DMI quirk table 2020-03-04 10:32:50 +01:00
acpi_adxl.c
acpi_amba.c
acpi_apd.c ACPI / APD: Add clock frequency for Hisilicon Hip08-Lite I2C controller 2020-02-03 12:03:18 +01:00
acpi_cmos_rtc.c
acpi_configfs.c
acpi_dbg.c
acpi_extlog.c
acpi_ipmi.c
acpi_lpat.c
acpi_lpit.c remove ioremap_nocache and devm_ioremap_nocache 2020-01-06 09:45:59 +01:00
acpi_lpss.c ACPI: Convert to new X86 CPU match macros 2020-03-24 21:30:50 +01:00
acpi_memhotplug.c
acpi_pad.c
acpi_platform.c
acpi_pnp.c
acpi_processor.c ACPI: processor: Export acpi_processor_evaluate_cst() 2019-12-27 11:02:07 +01:00
acpi_tad.c
acpi_video.c ACPI: video: remove redundant assignments to variable result 2020-03-04 10:43:04 +01:00
acpi_watchdog.c ACPI: watchdog: Fix gas->access_width usage 2020-02-13 23:51:30 +01:00
battery.c ACPI / battery: Cleanup Lenovo Ideapad Miix 320 DMI table entry 2020-03-04 10:32:50 +01:00
bgrt.c
blacklist.c
bus.c ACPI: bus: Fix NULL pointer check in acpi_bus_get_private_data() 2019-11-29 11:42:10 +01:00
button.c ACPI: button: Drop no longer necessary Asus T200TA lid_init_state quirk 2020-04-20 10:37:15 +02:00
cm_sbs.c
container.c
cppc_acpi.c ACPI: CPPC: clean up acpi_get_psd_map() 2020-03-28 13:25:41 +01:00
custom_method.c
debugfs.c
device_pm.c PM: ACPI: Output correct message on target power state 2020-04-27 10:33:40 +02:00
device_sysfs.c
dock.c
ec.c ACPI: EC: PM: Avoid flushing EC work when EC GPE is inactive 2020-05-18 13:15:13 +02:00
ec_sys.c
event.c
evged.c
fan.c ACPI: fan: Use scnprintf() for avoiding potential buffer overflow 2020-03-14 11:11:58 +01:00
glue.c
hed.c
internal.h ACPI: EC: PM: Avoid premature returns from acpi_s2idle_wake() 2020-05-11 10:11:38 +02:00
ioapic.c
irq.c
nvs.c
osi.c
osl.c ACPI: OSL: Add missing __acquires/__releases annotations 2020-03-04 10:40:48 +01:00
pci_irq.c
pci_link.c ACPI/PCI: pci_link: use extended_irq union member when setting ext-irq shareable 2020-04-20 10:36:22 +02:00
pci_mcfg.c
pci_root.c pci-v5.7-changes 2020-04-03 14:25:02 -07:00
pci_slot.c
power.c
pptt.c ACPI: PPTT: Consistently use unsigned int as parameter type 2020-01-07 11:46:36 +01:00
proc.c ACPI: list_for_each_safe() -> list_for_each_entry_safe() 2020-03-04 10:48:00 +01:00
processor_core.c
processor_driver.c
processor_idle.c ACPI: processor: Export acpi_processor_evaluate_cst() 2019-12-27 11:02:07 +01:00
processor_pdc.c
processor_perflib.c
processor_thermal.c
processor_throttling.c x86: ACPI: fix CPU hotplug deadlock 2020-04-04 16:28:24 +02:00
property.c
reboot.c
resource.c
sbs.c
sbshc.c
sbshc.h
scan.c treewide: remove redundant IS_ERR() before error code check 2020-02-04 03:05:27 +00:00
sleep.c ACPI: EC: PM: Avoid flushing EC work when EC GPE is inactive 2020-05-18 13:15:13 +02:00
sleep.h ACPI: PM: Add acpi_[un]register_wakeup_handler() 2020-04-04 19:45:18 +02:00
spcr.c
sysfs.c
tables.c ACPICA: Add NHLT table signature 2020-03-30 14:52:33 +02:00
thermal.c ACPI: thermal: switch to use <linux/units.h> helpers 2020-01-31 10:30:39 -08:00
tiny-power-button.c ACPI: Add new tiny-power-button driver to directly signal init 2020-02-13 23:36:23 +01:00
utils.c
video_detect.c ACPI: video: Use native backlight on Acer Aspire 5783z 2020-04-01 11:18:31 +02:00
wakeup.c ACPI: PM: Add acpi_[un]register_wakeup_handler() 2020-04-04 19:45:18 +02:00