[PATCH 3.2 33/94] ACPI / EC: Don't count a SCI interrupt as a false one
From: Ben Hutchings
Date: Mon Aug 04 2014 - 12:52:17 EST
3.2.62-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Feng Tang <feng.tang@xxxxxxxxx>
commit a3cd8d2789c2e265e09377f260e7d2ac9cec81bb upstream.
Currently when advance_transaction() is called in EC interrupt handler,
if there is nothing driver can do with the interrupt, it will be taken
as a false one.
But this is not always true, as there may be a SCI EC interrupt fired
during normal read/write operation, which should not be counted as a
false one. This patch fixes the problem.
Signed-off-by: Feng Tang <feng.tang@xxxxxxxxx>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
Signed-off-by: Ben Hutchings <ben@xxxxxxxxxxxxxxx>
---
drivers/acpi/ec.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -205,9 +205,13 @@ static void advance_transaction(struct a
t->done = true;
goto unlock;
err:
- /* false interrupt, state didn't change */
- if (in_interrupt())
+ /*
+ * If SCI bit is set, then don't think it's a false IRQ
+ * otherwise will take a not handled IRQ as a false one.
+ */
+ if (in_interrupt() && !(status & ACPI_EC_FLAG_SCI))
++t->irq_count;
+
unlock:
spin_unlock_irqrestore(&ec->curr_lock, flags);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/