]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
HID: intel-ish-hid: ipc: Disable and reenable ACPI GPE bit
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Tue, 3 Oct 2023 15:53:32 +0000 (08:53 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Oct 2023 19:59:08 +0000 (21:59 +0200)
commit8781fe259dd5a178fdd1069401bbd1437f9491c5
tree8d35071c5efc73d7f7f32f00e3fe26e9cf14e768
parent949ccc91c35bddbc75227b50cf7f477bc394e8b9
HID: intel-ish-hid: ipc: Disable and reenable ACPI GPE bit

[ Upstream commit 8f02139ad9a7e6e5c05712f8c1501eebed8eacfd ]

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: 2e23a70edabe ("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>
drivers/hid/intel-ish-hid/ipc/pci-ish.c