diff options
author | Feng Tang <feng.tang@intel.com> | 2012-10-23 01:30:12 +0200 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2014-08-06 18:07:35 +0100 |
commit | d1b4412416361dcb90585b366096dfa801da45a7 (patch) | |
tree | bdb9179473e36a57b09820c7bae2498bd5230eaf /drivers/acpi/ec.c | |
parent | 4beb3dab5a4b7789cb765a7ff90bbdb188f35317 (diff) | |
download | kernel_samsung_smdk4412-d1b4412416361dcb90585b366096dfa801da45a7.zip kernel_samsung_smdk4412-d1b4412416361dcb90585b366096dfa801da45a7.tar.gz kernel_samsung_smdk4412-d1b4412416361dcb90585b366096dfa801da45a7.tar.bz2 |
ACPI / EC: Don't count a SCI interrupt as a false one
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@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'drivers/acpi/ec.c')
-rw-r--r-- | drivers/acpi/ec.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 14111a4..f553c1c 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -205,9 +205,13 @@ static void advance_transaction(struct acpi_ec *ec) 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); } |