summaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2016-08-03 16:01:30 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-08-31 00:32:10 +0200
commite923e8e79e18fd6be9162f1be6b99a002e9df2cb (patch)
treee45d960ab781a3cbdea053109a8c9510fefaee5e /drivers/acpi
parent750f628be68e8b8e1624d8abd003b9f1fc758ed6 (diff)
downloadblackbird-op-linux-e923e8e79e18fd6be9162f1be6b99a002e9df2cb.tar.gz
blackbird-op-linux-e923e8e79e18fd6be9162f1be6b99a002e9df2cb.zip
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>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/ec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 4ab34d7dd943..79305bed4164 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -468,6 +468,8 @@ static inline void __acpi_ec_enable_event(struct acpi_ec *ec)
{
if (!test_and_set_bit(EC_FLAGS_QUERY_ENABLED, &ec->flags))
ec_log_drv("event unblocked");
+ if (!test_bit(EC_FLAGS_QUERY_PENDING, &ec->flags))
+ advance_transaction(ec);
}
static inline void __acpi_ec_disable_event(struct acpi_ec *ec)
OpenPOWER on IntegriCloud