From 6a3a2128e9c6c9262c0f09c30fb6106b3a84fe76 Mon Sep 17 00:00:00 2001 From: yongari Date: Sat, 12 Aug 2006 01:55:51 +0000 Subject: Make sure to check frames in Tx queue are empty before clearing watchdog timer. --- sys/pci/if_xl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys/pci') 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) -- cgit v1.1