diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2006-05-07 03:56:26 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2006-05-07 03:56:26 +0000 |
commit | c1836835aae8fc52cfd2674aa4ab57786592f5b7 (patch) | |
tree | 992bcba4d3547f383f1ca4688abadf3d156fa5c9 /sys/dev/ic | |
parent | 73309b31f5ea86029002fe08c9120fa689cf1634 (diff) |
- Return if there is nothing to do in the interrupt handler.
- Check for IFF_RUNNING in the interrupt loop.
Diffstat (limited to 'sys/dev/ic')
-rw-r--r-- | sys/dev/ic/dc.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sys/dev/ic/dc.c b/sys/dev/ic/dc.c index ecbfdb9591a..a50371210fa 100644 --- a/sys/dev/ic/dc.c +++ b/sys/dev/ic/dc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dc.c,v 1.93 2006/04/23 19:44:31 kettenis Exp $ */ +/* $OpenBSD: dc.c,v 1.94 2006/05/07 03:56:25 brad Exp $ */ /* * Copyright (c) 1997, 1998, 1999 @@ -2542,6 +2542,9 @@ dc_intr(arg) ifp = &sc->sc_arpcom.ac_if; + if ((CSR_READ_4(sc, DC_ISR) & DC_INTRS) == 0) + return (claimed); + /* Suppress unwanted interrupts */ if (!(ifp->if_flags & IFF_UP)) { if (CSR_READ_4(sc, DC_ISR) & DC_INTRS) @@ -2552,8 +2555,9 @@ dc_intr(arg) /* Disable interrupts. */ CSR_WRITE_4(sc, DC_IMR, 0x00000000); - while(((status = CSR_READ_4(sc, DC_ISR)) & DC_INTRS) && - status != 0xFFFFFFFF) { + while (((status = CSR_READ_4(sc, DC_ISR)) & DC_INTRS) && + status != 0xFFFFFFFF && + (ifp->if_flags & IFF_RUNNING)) { claimed = 1; CSR_WRITE_4(sc, DC_ISR, status); |