Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a3cd8d27 authored by Feng Tang's avatar Feng Tang Committed by Rafael J. Wysocki
Browse files

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: default avatarFeng Tang <feng.tang@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent b76b51ba
Loading
Loading
Loading
Loading
+6 −2
Original line number Original line Diff line number Diff line
@@ -198,9 +198,13 @@ static void advance_transaction(struct acpi_ec *ec, u8 status)
		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->lock, flags);
	spin_unlock_irqrestore(&ec->lock, flags);
}
}