Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Apr 2013 22:46:31 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r249713 - head/sys/dev/ath
Message-ID:  <201304202246.r3KMkVeS080383@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Sat Apr 20 22:46:31 2013
New Revision: 249713
URL: http://svnweb.freebsd.org/changeset/base/249713

Log:
  There's some races (likely in the BAR handling, sigh) which is causing
  the pause/resume code to not be called completely symmetrically.
  
  I'll chase down the root cause of that soon; this at least works around
  the bug and tells me when it happens.

Modified:
  head/sys/dev/ath/if_ath_tx.c

Modified: head/sys/dev/ath/if_ath_tx.c
==============================================================================
--- head/sys/dev/ath/if_ath_tx.c	Sat Apr 20 22:26:33 2013	(r249712)
+++ head/sys/dev/ath/if_ath_tx.c	Sat Apr 20 22:46:31 2013	(r249713)
@@ -2976,7 +2976,19 @@ ath_tx_tid_resume(struct ath_softc *sc, 
 {
 	ATH_TX_LOCK_ASSERT(sc);
 
-	tid->paused--;
+	/*
+	 * There's some odd places where ath_tx_tid_resume() is called
+	 * when it shouldn't be; this works around that particular issue
+	 * until it's actually resolved.
+	 */
+	if (tid->paused == 0) {
+		device_printf(sc->sc_dev, "%s: %6D: paused=0?\n",
+		    __func__,
+		    tid->an->an_node.ni_macaddr,
+		    ":");
+	} else {
+		tid->paused--;
+	}
 
 	DPRINTF(sc, ATH_DEBUG_SW_TX_CTRL, "%s: unpaused = %d\n",
 	    __func__, tid->paused);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201304202246.r3KMkVeS080383>