1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-09 13:42:56 +00:00

[ig4] Ignore stray interrupts

This commit is contained in:
Vladimir Kondratyev 2019-11-03 20:46:20 +00:00
parent 733d657a74
commit 0a6b1b56d9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=354297

View File

@ -685,9 +685,12 @@ ig4iic_intr(void *cookie)
ig4iic_softc_t *sc = cookie;
mtx_lock(&sc->io_lock);
set_intr_mask(sc, 0);
reg_read(sc, IG4_REG_CLR_INTR);
wakeup(sc);
/* Ignore stray interrupts */
if (sc->intr_mask != 0 && reg_read(sc, IG4_REG_INTR_STAT) != 0) {
set_intr_mask(sc, 0);
reg_read(sc, IG4_REG_CLR_INTR);
wakeup(sc);
}
mtx_unlock(&sc->io_lock);
}