linux-stable/drivers/hid/intel-ish-hid
Srinivas Pandruvada cdcc04e844 HID: intel-ish-hid: ipc: Disable and reenable ACPI GPE bit
[ Upstream commit 8f02139ad9 ]

The EHL (Elkhart Lake) based platforms provide a OOB (Out of band)
service, which allows to wakup device when the system is in S5 (Soft-Off
state). This OOB service can be enabled/disabled from BIOS settings. When
enabled, the ISH device gets PME wake capability. To enable PME wakeup,
driver also needs to enable ACPI GPE bit.

On resume, BIOS will clear the wakeup bit. So driver need to re-enable it
in resume function to keep the next wakeup capability. But this BIOS
clearing of wakeup bit doesn't decrement internal OS GPE reference count,
so this reenabling on every resume will cause reference count to overflow.

So first disable and reenable ACPI GPE bit using acpi_disable_gpe().

Fixes: 2e23a70eda ("HID: intel-ish-hid: ipc: finish power flow for EHL OOB")
Reported-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Closes: https://lore.kernel.org/lkml/CAAd53p4=oLYiH2YbVSmrPNj1zpMcfp=Wxbasb5vhMXOWCArLCg@mail.gmail.com/T/
Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-10-10 22:00:44 +02:00
..
ipc HID: intel-ish-hid: ipc: Disable and reenable ACPI GPE bit 2023-10-10 22:00:44 +02:00
ishtp HID: intel-ish-hid: Fix kernel panic during warm reset 2023-04-20 12:35:13 +02:00
Kconfig HID: intel-ish-hid: Set ISH driver depends on x86 2021-06-14 15:55:09 +02:00
Makefile treewide: prefix header search paths with $(srctree)/ 2019-05-18 11:49:57 +09:00
ishtp-fw-loader.c HID: intel-ish-hid: Use dma_alloc_coherent for firmware update 2022-03-14 10:39:04 +01:00
ishtp-hid-client.c ID: intel-ish-hid: hid-client: drop unexpected word "the" in the comments 2022-07-21 11:56:10 +02:00
ishtp-hid.c HID: intel-ish-hid: Fix potential copy/paste error 2021-04-07 17:56:34 +02:00
ishtp-hid.h HID: ishtp-hid-clientHID: ishtp-hid-client: Fix comment typo 2022-08-25 11:35:44 +02:00