Skip to content

Commit e923e8e

Browse files
Lv Zhengrafaeljw
authored andcommitted
ACPI / EC: Fix an issue that SCI_EVT cannot be detected after event is enabled
After enabling the EC event handling, Linux is still in the noirq stage, if there is no triggering source (EC transaction, GPE STS status), advance_transaction() will not be invoked and SCI_EVT cannot be detected. This patch adds one more triggering source after enabling the EC event handling to poll the pending SCI_EVT. Known issues: 1. Still no SCI_EVT triggering source There could still be no SCI_EVT triggering source after handling the first SCI_EVT (polled by this patch if any). Because after handling the first SCI_EVT, Linux could still be in noirq stage and there could still be no further triggering source in this stage. Then the second SCI_EVT indicated during this stage still cannot be detected by the EC driver. With this improvement applied, it is then possible to move acpi_ec_enable_event() out of the noirq stage to fix this issue (if the first SCI_EVT is handled out of the noirq stage, the follow-up SCI_EVTs should be able to trigger IRQs). Signed-off-by: Lv Zheng <lv.zheng@intel.com> Tested-by: Todd E Brandt <todd.e.brandt@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 750f628 commit e923e8e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/acpi/ec.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,8 @@ static inline void __acpi_ec_enable_event(struct acpi_ec *ec)
468468
{
469469
if (!test_and_set_bit(EC_FLAGS_QUERY_ENABLED, &ec->flags))
470470
ec_log_drv("event unblocked");
471+
if (!test_bit(EC_FLAGS_QUERY_PENDING, &ec->flags))
472+
advance_transaction(ec);
471473
}
472474

473475
static inline void __acpi_ec_disable_event(struct acpi_ec *ec)

0 commit comments

Comments
 (0)