Workaround possible spurious interrupts in marvell yukon.
This comes from a similar patch in FreeBSD r234666 but does the check and acknowledge in the case where we don't have any other interrupts. Since the interrupt isn't used it is never unmasked and therefore the check against the interrupt mask will always fail if the TWSI IRQ is the only interrupt that happened. In that case an interrupt storm would be triggered that lasts until any other valid interrupt comes along, is handled and both are acknowledged. This may help with #8454 on some cards that exhibit the spurious TWSI IRQs.
This commit is contained in:
parent
e719d2bf5c
commit
3af5af9481
@ -47,6 +47,11 @@ HAIKU_CHECK_DISABLE_INTERRUPTS(device_t dev)
|
||||
if (status == 0 || status == 0xffffffff ||
|
||||
(sc->msk_pflags & MSK_FLAG_SUSPEND) != 0 ||
|
||||
(status & sc->msk_intrmask) == 0) {
|
||||
|
||||
/* Clear possibly spurious TWSI IRQ, see FreeBSD r234666. */
|
||||
if ((status & Y2_IS_TWSI_RDY) != 0)
|
||||
CSR_WRITE_4(sc, B2_I2C_IRQ, 1);
|
||||
|
||||
CSR_WRITE_4(sc, B0_Y2_SP_ICR, 2);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user