diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2006-09-17 21:35:59 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2006-09-17 21:35:59 +0000 |
commit | 8a6c7c27b2652bb5e0837e8e5e4d03b7b4fe41bd (patch) | |
tree | 13c109196a7bd272226c26193edd7266dfb6a66b | |
parent | 76008af14929770082a9ce88ffea788da2c3266f (diff) |
Try to reclaim the TX descriptors in the watchdog handler before actually
issuing a watchdog reset of the interface.
From yongari@FreeBSD
-rw-r--r-- | sys/dev/pci/if_em.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c index e08be39ead7..41704fa5e2b 100644 --- a/sys/dev/pci/if_em.c +++ b/sys/dev/pci/if_em.c @@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE. ***************************************************************************/ -/* $OpenBSD: if_em.c,v 1.148 2006/09/17 20:26:14 brad Exp $ */ +/* $OpenBSD: if_em.c,v 1.149 2006/09/17 21:35:58 brad Exp $ */ /* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */ #include <dev/pci/if_em.h> @@ -588,6 +588,14 @@ em_watchdog(struct ifnet *ifp) return; } + /* + * Reclaim first as there is a possibility of losing Tx completion + * interrupts. + */ + em_txeof(sc); + if (sc->num_tx_desc_avail == sc->num_tx_desc) + return; + printf("%s: watchdog timeout -- resetting\n", sc->sc_dv.dv_xname); em_init(sc); |