Commit d1b44124 authored by Feng Tang's avatar Feng Tang Committed by Ben Hutchings

ACPI / EC: Don't count a SCI interrupt as a false one

commit a3cd8d27 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: default avatarFeng Tang <feng.tang@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 4beb3dab
...@@ -205,9 +205,13 @@ static void advance_transaction(struct acpi_ec *ec) ...@@ -205,9 +205,13 @@ static void advance_transaction(struct acpi_ec *ec)
t->done = true; t->done = true;
goto unlock; goto unlock;
err: 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; ++t->irq_count;
unlock: unlock:
spin_unlock_irqrestore(&ec->curr_lock, flags); spin_unlock_irqrestore(&ec->curr_lock, flags);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment