If a device transmit timeout occurs and sc_txintrperiod is greater than

one, throttle it down before the reset. This way the user need not know
the magic `hw.ath0.txintrperiod=1' fix if the default value is too high
for their machine.
This commit is contained in:
rumble 2008-05-04 20:02:06 +00:00
parent 46512505a9
commit 6d44774c77
1 changed files with 6 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ath.c,v 1.99 2008/03/12 18:02:21 dyoung Exp $ */
/* $NetBSD: ath.c,v 1.100 2008/05/04 20:02:06 rumble Exp $ */
/*-
* Copyright (c) 2002-2005 Sam Leffler, Errno Consulting
@ -41,7 +41,7 @@
__FBSDID("$FreeBSD: src/sys/dev/ath/if_ath.c,v 1.104 2005/09/16 10:09:23 ru Exp $");
#endif
#ifdef __NetBSD__
__KERNEL_RCSID(0, "$NetBSD: ath.c,v 1.99 2008/03/12 18:02:21 dyoung Exp $");
__KERNEL_RCSID(0, "$NetBSD: ath.c,v 1.100 2008/05/04 20:02:06 rumble Exp $");
#endif
/*
@ -5048,7 +5048,10 @@ ath_watchdog(struct ifnet *ifp)
;
else if (--axq->axq_timer == 0) {
ATH_TXQ_UNLOCK(axq);
if_printf(ifp, "device timeout (txq %d)\n", i);
if_printf(ifp, "device timeout (txq %d, "
"txintrperiod %d)\n", i, sc->sc_txintrperiod);
if (sc->sc_txintrperiod > 1)
sc->sc_txintrperiod--;
ath_reset(ifp);
ifp->if_oerrors++;
sc->sc_stats.ast_watchdog++;