From 6d44774c777db95174fdbec9db0306ebaf13f08b Mon Sep 17 00:00:00 2001 From: rumble Date: Sun, 4 May 2008 20:02:06 +0000 Subject: [PATCH] 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. --- sys/dev/ic/ath.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/dev/ic/ath.c b/sys/dev/ic/ath.c index 8097a7fab57d..13552bb08a01 100644 --- a/sys/dev/ic/ath.c +++ b/sys/dev/ic/ath.c @@ -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++;