|
@@ -486,8 +486,11 @@ static inline void __acpi_ec_enable_event(struct acpi_ec *ec)
|
|
{
|
|
{
|
|
if (!test_and_set_bit(EC_FLAGS_QUERY_ENABLED, &ec->flags))
|
|
if (!test_and_set_bit(EC_FLAGS_QUERY_ENABLED, &ec->flags))
|
|
ec_log_drv("event unblocked");
|
|
ec_log_drv("event unblocked");
|
|
- if (!test_bit(EC_FLAGS_QUERY_PENDING, &ec->flags))
|
|
|
|
- advance_transaction(ec);
|
|
|
|
|
|
+ /*
|
|
|
|
+ * Unconditionally invoke this once after enabling the event
|
|
|
|
+ * handling mechanism to detect the pending events.
|
|
|
|
+ */
|
|
|
|
+ advance_transaction(ec);
|
|
}
|
|
}
|
|
|
|
|
|
static inline void __acpi_ec_disable_event(struct acpi_ec *ec)
|
|
static inline void __acpi_ec_disable_event(struct acpi_ec *ec)
|
|
@@ -1456,11 +1459,10 @@ static int ec_install_handlers(struct acpi_ec *ec, bool handle_events)
|
|
if (test_bit(EC_FLAGS_STARTED, &ec->flags) &&
|
|
if (test_bit(EC_FLAGS_STARTED, &ec->flags) &&
|
|
ec->reference_count >= 1)
|
|
ec->reference_count >= 1)
|
|
acpi_ec_enable_gpe(ec, true);
|
|
acpi_ec_enable_gpe(ec, true);
|
|
-
|
|
|
|
- /* EC is fully operational, allow queries */
|
|
|
|
- acpi_ec_enable_event(ec);
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ /* EC is fully operational, allow queries */
|
|
|
|
+ acpi_ec_enable_event(ec);
|
|
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|