svn commit: r249713 - head/sys/dev/ath

Adrian Chadd adrian at FreeBSD.org
Sat Apr 20 22:46:32 UTC 2013


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);


More information about the svn-src-all mailing list