summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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