aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/ec.c
diff options
context:
space:
mode:
authorFeng Tang <feng.tang@intel.com>2012-10-22 19:30:12 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2012-11-14 18:15:59 -0500
commita3cd8d2789c2e265e09377f260e7d2ac9cec81bb (patch)
tree14f89e7600131fcfdf7fc3ea3d436b8e51efa09b /drivers/acpi/ec.c
parentb76b51ba0cef13980813373a548a12206e3cd3c9 (diff)
ACPI / EC: Don't count a SCI interrupt as a false one
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@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/ec.c')
-rw-r--r--drivers/acpi/ec.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 8f8b644bba8d..354007d490d1 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -198,9 +198,13 @@ static void advance_transaction(struct acpi_ec *ec, u8 status)
198 t->done = true; 198 t->done = true;
199 goto unlock; 199 goto unlock;
200err: 200err:
201 /* false interrupt, state didn't change */ 201 /*
202 if (in_interrupt()) 202 * If SCI bit is set, then don't think it's a false IRQ
203 * otherwise will take a not handled IRQ as a false one.
204 */
205 if (in_interrupt() && !(status & ACPI_EC_FLAG_SCI))
203 ++t->irq_count; 206 ++t->irq_count;
207
204unlock: 208unlock:
205 spin_unlock_irqrestore(&ec->lock, flags); 209 spin_unlock_irqrestore(&ec->lock, flags);
206} 210}