From 3fe83829bf4a5ee48b1923d241e82db1e25452fb Mon Sep 17 00:00:00 2001 From: Warner Losh Date: Tue, 12 Feb 2002 05:32:58 +0000 Subject: [PATCH] Two fixes from Jonathan Hanna: 1) We shouldn't continue when we get a RX complete because we ack it and the TX complete. 2) Fix a couple of spl leaks (why splbio is needed in ISR, I cannot understand). MFC after: 3 days --- sys/dev/ep/if_ep.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/dev/ep/if_ep.c b/sys/dev/ep/if_ep.c index 1118f11424e0..7798325c770d 100644 --- a/sys/dev/ep/if_ep.c +++ b/sys/dev/ep/if_ep.c @@ -548,13 +548,13 @@ ep_intr(arg) sc = (struct ep_softc *)arg; - if (sc->gone) - return; /* * quick fix: Try to detect an interrupt when the card goes away. */ - if (inw(BASE + EP_STATUS) == 0xffff) + if (sc->gone || inw(BASE + EP_STATUS) == 0xffff) { + splx(x); return; + } ifp = &sc->arpcom.ac_if; @@ -567,10 +567,8 @@ rescan: /* first acknowledge all interrupt sources */ outw(BASE + EP_COMMAND, ACK_INTR | (status & S_MASK)); - if (status & (S_RX_COMPLETE | S_RX_EARLY)) { + if (status & (S_RX_COMPLETE | S_RX_EARLY)) epread(sc); - continue; - } if (status & S_TX_AVAIL) { /* we need ACK */ ifp->if_timer = 0;