diff options
| author | John Polstra <jdp@FreeBSD.org> | 2004-05-06 01:55:21 +0000 |
|---|---|---|
| committer | John Polstra <jdp@FreeBSD.org> | 2004-05-06 01:55:21 +0000 |
| commit | f389fa7e91ce3c51893b8c20818e02e1c4b28af4 (patch) | |
| tree | ebd22b3a53a23846260cbe79f34c2db6913f7bc8 /sys/dev | |
| parent | e70165aea7340dcbec19beedf1bd9be4cdae0035 (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/bge/if_bge.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c index 813e1a491950..47f92fd55b17 100644 --- a/sys/dev/bge/if_bge.c +++ b/sys/dev/bge/if_bge.c @@ -96,6 +96,7 @@ #include <vm/vm.h> /* for vtophys */ #include <vm/pmap.h> /* for vtophys */ +#include <machine/atomic.h> /* for atomic_readandclear_32 */ #include <machine/clock.h> /* for DELAY */ #include <machine/bus_memio.h> #include <machine/bus.h> @@ -2232,11 +2233,14 @@ bge_intr(xsc) { struct bge_softc *sc; struct ifnet *ifp; + u_int32_t statusword; u_int32_t status; sc = xsc; ifp = &sc->arpcom.ac_if; + statusword = + atomic_readandclear_32(&sc->bge_rdata->bge_status_block.bge_status); #ifdef notdef /* Avoid this for now -- checking this register is expensive. */ @@ -2273,13 +2277,7 @@ bge_intr(xsc) BRGPHY_INTRS); } } else { - if ((sc->bge_rdata->bge_status_block.bge_status & - BGE_STATFLAG_UPDATED) && - (sc->bge_rdata->bge_status_block.bge_status & - BGE_STATFLAG_LINKSTATE_CHANGED)) { - sc->bge_rdata->bge_status_block.bge_status &= - ~(BGE_STATFLAG_UPDATED| - BGE_STATFLAG_LINKSTATE_CHANGED); + if (statusword & BGE_STATFLAG_LINKSTATE_CHANGED) { /* * Sometimes PCS encoding errors are detected in * TBI mode (on fiber NICs), and for some reason |
