Page MenuHomeFreeBSD

acpi_ec: Re-arm EC event reporting after resume
Needs ReviewPublic

Authored by garga on Tue, Sep 29, 3:12 PM.
Tags
None
Referenced Files
F175201796: D60131.id188007.diff
Fri, Oct 9, 1:46 AM
Unknown Object (File)
Tue, Oct 6, 1:19 AM
Unknown Object (File)
Tue, Oct 6, 12:20 AM
Unknown Object (File)
Mon, Oct 5, 10:52 PM
Unknown Object (File)
Sat, Oct 3, 7:51 PM
Unknown Object (File)
Sat, Oct 3, 6:26 PM
Unknown Object (File)
Sat, Oct 3, 3:41 AM
Unknown Object (File)
Sat, Oct 3, 3:36 AM

Details

Summary

Some embedded controllers, such as the Lenovo H8 EC found in ThinkPad
E14 (TP-R1E) laptops, stop reporting SCI events after a suspend/resume
cycle. The EC still accepts reads/writes and asserts its wake GPE, but
new runtime events are neither queued nor signalled: the EC never sets
SCI_EVT again, so the EC GPE never fires and events like lid open/close,
AC plug events, and hotkeys are silently lost for the rest of the boot.

Experimentation on the affected hardware shows that performing a burst
enable/disable handshake after resume re-arms the EC event engine:
afterwards, pending events are delivered and new events are queued and
signalled normally again.

Do that handshake from the resume handler, while still in polled mode
(ec_suspending is still TRUE, and the EC GPE is not yet re-enabled).
The handshake is part of the ACPI EC protocol and is harmless for ECs
that do not need it.

Assisted-by: Opencode (GLM-5.3-Flash)
PR: 286974

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 77457
Build 74340: arc lint + arc unit