Fix if_timer logic so that there is always a timeout pending if there

are packets queued for transmission.

This driver is strange -- it never sets IFF_OACTIVE, so all
transmissions always cause a call to fxp_start. However, if the
link gets stuck, there was nothing to reset it, so there was still
a possibility of lockups.

MFC after: 3 days
This commit is contained in:
Luigi Rizzo 2002-06-30 22:28:00 +00:00
parent 2e4fb41fa5
commit 41aa0ba271

View File

@ -1253,11 +1253,13 @@ fxp_intr_body(struct fxp_softc *sc, u_int8_t statack, int count)
sc->tx_queued--;
}
sc->cbl_first = txp;
ifp->if_timer = 0;
if (sc->tx_queued == 0) {
ifp->if_timer = 0;
if (sc->need_mcsetup)
fxp_mc_setup(sc);
}
} else
ifp->if_timer = 5;
/*
* Try to start more packets transmitting.
*/