summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>2006-12-20 12:03:21 +0000
committerbde <bde@FreeBSD.org>2006-12-20 12:03:21 +0000
commit6245a01f000f21764a57dcf52469c1fb896e47fe (patch)
tree444747f874a2453abf4eabc7045d183d2bbe7602 /sys/dev
parent32424673a8fbc9737110fb407419c47d6fbf933a (diff)
downloadFreeBSD-src-6245a01f000f21764a57dcf52469c1fb896e47fe.zip
FreeBSD-src-6245a01f000f21764a57dcf52469c1fb896e47fe.tar.gz
In bge_txeof(), cancel the watchdog timeout if all descriptors have
been handled instead of when at least one descriptor was just handled. For bge, it is normal to get a txeof when only a small fraction of the queued tx descriptors have been handled, so the bug broke the watchdog in a usual case.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/bge/if_bge.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c
index 3363584..f58b281 100644
--- a/sys/dev/bge/if_bge.c
+++ b/sys/dev/bge/if_bge.c
@@ -2908,11 +2908,12 @@ bge_txeof(struct bge_softc *sc)
}
sc->bge_txcnt--;
BGE_INC(sc->bge_tx_saved_considx, BGE_TX_RING_CNT);
- sc->bge_timer = 0;
}
if (cur_tx != NULL)
ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
+ if (sc->bge_txcnt == 0)
+ sc->bge_timer = 0;
}
#ifdef DEVICE_POLLING
OpenPOWER on IntegriCloud