diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2010-02-21 19:57:06 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2010-02-21 19:57:06 +0000 |
commit | 27804e0518d7c4593b1e1d6adfcab4922dd616f4 (patch) | |
tree | 84c461ad343463c75e6d2171c53488f807b2c3f1 /sys/dev | |
parent | 72c325183ea344a8adf1e57e1b69127fa41f3ec6 (diff) |
Make sure athn_intr() returns 1 if it claims an interrupt and 0 if not,
instead of the other way around. Fixes interrupt accounting.
ok damien@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/ic/athn.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/ic/athn.c b/sys/dev/ic/athn.c index a456d19de1e..a6adeca58f7 100644 --- a/sys/dev/ic/athn.c +++ b/sys/dev/ic/athn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: athn.c,v 1.25 2010/02/16 18:49:31 damien Exp $ */ +/* $OpenBSD: athn.c,v 1.26 2010/02/21 19:57:05 kettenis Exp $ */ /*- * Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr> @@ -783,14 +783,14 @@ athn_intr(void *xsc) if ((ifp->if_flags & (IFF_UP | IFF_RUNNING)) != (IFF_UP | IFF_RUNNING)) - return (1); + return (0); /* Get pending interrupts. */ intr = AR_READ(sc, AR_INTR_ASYNC_CAUSE); if (!(intr & AR_INTR_MAC_IRQ) || intr == AR_INTR_SPURIOUS) { intr = AR_READ(sc, AR_INTR_SYNC_CAUSE); if (intr == AR_INTR_SPURIOUS || (intr & sc->isync) == 0) - return (1); /* Not for us. */ + return (0); /* Not for us. */ } if ((AR_READ(sc, AR_INTR_ASYNC_CAUSE) & AR_INTR_MAC_IRQ) && @@ -800,7 +800,7 @@ athn_intr(void *xsc) intr = 0; sync = AR_READ(sc, AR_INTR_SYNC_CAUSE) & sc->isync; if (intr == 0 && sync == 0) - return (1); /* Not for us. */ + return (0); /* Not for us. */ if (intr != 0) { if (intr & AR_ISR_BCNMISC) { @@ -812,7 +812,7 @@ athn_intr(void *xsc) } intr = AR_READ(sc, AR_ISR_RAC); if (intr == AR_INTR_SPURIOUS) - return (0); + return (1); if (intr & (AR_ISR_RXMINTR | AR_ISR_RXINTM)) athn_rx_intr(sc); @@ -859,7 +859,7 @@ athn_intr(void *xsc) AR_WRITE(sc, AR_INTR_SYNC_CAUSE, sync); (void)AR_READ(sc, AR_INTR_SYNC_CAUSE); } - return (0); + return (1); } /* |