diff options
| author | riz <riz@NetBSD.org> | 2006-08-25 20:16:57 +0000 |
|---|---|---|
| committer | riz <riz@NetBSD.org> | 2006-08-25 20:16:57 +0000 |
| commit | df667bafa9867bb4d860ef54a47d67f098c14630 (patch) | |
| tree | 40d90d8903d3acb8eab585f499a149f6cfd03018 /sys/dev | |
| parent | 2c659827953e506016d822d34e200b46c3ed67b6 (diff) | |
In sk_watchdog(), attempt to reclaim pending TX descriptors before
resetting the hardware. Should fix occasional watchdog timeouts
seen with this driver.
From FreeBSD, via OpenBSD.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/pci/if_sk.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/sys/dev/pci/if_sk.c b/sys/dev/pci/if_sk.c index 9425a4440f7..406003bf323 100644 --- a/sys/dev/pci/if_sk.c +++ b/sys/dev/pci/if_sk.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_sk.c,v 1.31 2006/08/25 02:34:30 riz Exp $ */ +/* $NetBSD: if_sk.c,v 1.32 2006/08/25 20:16:57 riz Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -1998,8 +1998,18 @@ sk_watchdog(struct ifnet *ifp) { struct sk_if_softc *sc_if = ifp->if_softc; - aprint_error("%s: watchdog timeout\n", sc_if->sk_dev.dv_xname); - (void) sk_init(ifp); + /* + * Reclaim first as there is a possibility of losing Tx completion + * interrupts. + */ + sk_txeof(sc_if); + if (sc_if->sk_cdata.sk_tx_cnt != 0) { + aprint_error("%s: watchdog timeout\n", sc_if->sk_dev.dv_xname); + + ifp->if_oerrors++; + + sk_init(ifp); + } } void |
