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
This commit is contained in:
Warner Losh 2002-02-12 05:32:58 +00:00
parent 90e0035cca
commit 3fe83829bf

View File

@ -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;