From 41aa0ba271cfff3852e4d88f1b8bb52d44c374b2 Mon Sep 17 00:00:00 2001 From: Luigi Rizzo Date: Sun, 30 Jun 2002 22:28:00 +0000 Subject: [PATCH] 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 --- sys/dev/fxp/if_fxp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c index 1d2ff03f0c3e..50da42e1421a 100644 --- a/sys/dev/fxp/if_fxp.c +++ b/sys/dev/fxp/if_fxp.c @@ -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. */