aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/dc/if_dc.c
diff options
context:
space:
mode:
authorMarius Strobl <marius@FreeBSD.org>2006-12-20 01:49:56 +0000
committerMarius Strobl <marius@FreeBSD.org>2006-12-20 01:49:56 +0000
commit3e0e67263b848fe769db6d1ebe28d880c2020b88 (patch)
tree8955372a1744e96e3438cc72d1333cea54df8f59 /sys/dev/dc/if_dc.c
parent45ee6ab35006f36023e271608217760a2fde626d (diff)
downloadsrc-3e0e67263b848fe769db6d1ebe28d880c2020b88.tar.gz
src-3e0e67263b848fe769db6d1ebe28d880c2020b88.zip
Fix a bug originally introduced in rev. 1.74; don't reloaded the
watchdog timer in dc_txeof() in case there are still unhandled descriptors as dc_poll() invokes dc_poll() unconditionally. Otherwise this would result in the watchdog timer constantly being being reloaded and thus circumvent that the watchdog ever fires in the DEVICE_POLLING case. Pointed out by: bde
Notes
Notes: svn path=/head/; revision=165365
Diffstat (limited to 'sys/dev/dc/if_dc.c')
-rw-r--r--sys/dev/dc/if_dc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/dc/if_dc.c b/sys/dev/dc/if_dc.c
index 903f2fcdaad7..c699629054a9 100644
--- a/sys/dev/dc/if_dc.c
+++ b/sys/dev/dc/if_dc.c
@@ -2871,7 +2871,8 @@ dc_txeof(struct dc_softc *sc)
sc->dc_cdata.dc_tx_cons = idx;
ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
}
- sc->dc_wdog_timer = (sc->dc_cdata.dc_tx_cnt == 0) ? 0 : 5;
+ if (sc->dc_cdata.dc_tx_cnt == 0)
+ sc->dc_wdog_timer = 0;
}
static void