From owner-svn-src-all@FreeBSD.ORG Sat Apr 20 22:46:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 45883D58; Sat, 20 Apr 2013 22:46:32 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 370511168; Sat, 20 Apr 2013 22:46:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3KMkVUU080385; Sat, 20 Apr 2013 22:46:31 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3KMkVeS080383; Sat, 20 Apr 2013 22:46:31 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201304202246.r3KMkVeS080383@svn.freebsd.org> From: Adrian Chadd Date: Sat, 20 Apr 2013 22:46:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249713 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Apr 2013 22:46:32 -0000 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);