Skip to content

Commit

Permalink
ACPI / EC: Don't count a SCI interrupt as a false one
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Feng Tang authored and Rafael J. Wysocki committed Nov 14, 2012
1 parent b76b51b commit a3cd8d2
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/acpi/ec.c
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,13 @@ static void advance_transaction(struct acpi_ec *ec, u8 status)
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->lock, flags);
}
Expand Down

0 comments on commit a3cd8d2

Please sign in to comment.