diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2008-02-20 12:31:49 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2008-02-20 12:31:49 +0000 |
commit | ef618e7d1f677bfe26b07a47c1eaa27ce54a6c69 (patch) | |
tree | 430fc02271bbdd21f30193b3c3e2a980789ba31d /sys | |
parent | 32dfee5240805e27a6753ae4bfca0403ffa58bbf (diff) |
- Only clear the IFF_OACTIVE flag if packets were processed.
- Only clear the watchdog timer if there are no more packets to
process otherwise rearm the timer.
From mickey@
Tested by krw@, mikeb@ and brad@
ok dlg@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ic/fxp.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sys/dev/ic/fxp.c b/sys/dev/ic/fxp.c index 7eeb8f9868c..899a863fbb1 100644 --- a/sys/dev/ic/fxp.c +++ b/sys/dev/ic/fxp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fxp.c,v 1.89 2007/10/13 16:12:29 fgsch Exp $ */ +/* $OpenBSD: fxp.c,v 1.90 2008/02/20 12:31:48 brad Exp $ */ /* $NetBSD: if_fxp.c,v 1.2 1997/06/05 02:01:55 thorpej Exp $ */ /* @@ -857,10 +857,12 @@ fxp_intr(void *arg) FXP_TXCB_SYNC(sc, txs, BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE); } - sc->sc_cbt_cons = txs; sc->sc_cbt_cnt = txcnt; - ifp->if_timer = 0; - ifp->if_flags &= ~IFF_OACTIVE; + /* Did we transmit any packets? */ + if (sc->sc_cbt_cons != txs) + ifp->if_flags &= ~IFF_OACTIVE; + ifp->if_timer = sc->sc_cbt_cnt ? 5 : 0; + sc->sc_cbt_cons = txs; if (!IFQ_IS_EMPTY(&ifp->if_snd)) { /* |