]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
committerJiri Kosina <jkosina@suse.cz>
Thu, 5 Oct 2023 10:50:35 +0000 (12:50 +0200)
commit8f02139ad9a7e6e5c05712f8c1501eebed8eacfd
tree4c731245a137672b7ea3483e4a74bd9332a3f046
parentb328dd02e19cb9d3b35de4322f5363516a20ac8c
HID: intel-ish-hid: ipc: Disable and reenable ACPI GPE bit

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>
drivers/hid/intel-ish-hid/ipc/pci-ish.c