summaryrefslogtreecommitdiffstats
path: root/sys/pci
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2006-08-12 01:55:51 +0000
committeryongari <yongari@FreeBSD.org>2006-08-12 01:55:51 +0000
commit6a3a2128e9c6c9262c0f09c30fb6106b3a84fe76 (patch)
treea25fc328e6c7a1e53debb5ca82d85b580402c938 /sys/pci
parent38e27927c91701f256654a22f2341b7197f00cee (diff)
downloadFreeBSD-src-6a3a2128e9c6c9262c0f09c30fb6106b3a84fe76.zip
FreeBSD-src-6a3a2128e9c6c9262c0f09c30fb6106b3a84fe76.tar.gz
Make sure to check frames in Tx queue are empty before clearing
watchdog timer.
Diffstat (limited to 'sys/pci')
-rw-r--r--sys/pci/if_xl.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/pci/if_xl.c b/sys/pci/if_xl.c
index 73cbced..503ce72 100644
--- a/sys/pci/if_xl.c
+++ b/sys/pci/if_xl.c
@@ -2122,9 +2122,6 @@ xl_txeof(struct xl_softc *sc)
XL_LOCK_ASSERT(sc);
- /* Clear the timeout timer. */
- ifp->if_timer = 0;
-
/*
* Go through our tx list and free mbufs for those
* frames that have been uploaded. Note: the 3c905B
@@ -2154,6 +2151,8 @@ xl_txeof(struct xl_softc *sc)
if (sc->xl_cdata.xl_tx_head == NULL) {
ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
+ /* Clear the timeout timer. */
+ ifp->if_timer = 0;
sc->xl_cdata.xl_tx_tail = NULL;
} else {
if (CSR_READ_4(sc, XL_DMACTL) & XL_DMACTL_DOWN_STALLED ||
@@ -2197,9 +2196,10 @@ xl_txeof_90xB(struct xl_softc *sc)
sc->xl_cdata.xl_tx_cnt--;
XL_INC(idx, XL_TX_LIST_CNT);
- ifp->if_timer = 0;
}
+ if (sc->xl_cdata.xl_tx_cnt == 0)
+ ifp->if_timer = 0;
sc->xl_cdata.xl_tx_cons = idx;
if (cur_tx != NULL)
OpenPOWER on IntegriCloud