From owner-svn-src-all@FreeBSD.ORG Mon Nov 5 07:08:45 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B0C4BB99; Mon, 5 Nov 2012 07:08:45 +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 96A158FC08; Mon, 5 Nov 2012 07:08:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qA578jMI048994; Mon, 5 Nov 2012 07:08:45 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qA578jBq048992; Mon, 5 Nov 2012 07:08:45 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201211050708.qA578jBq048992@svn.freebsd.org> From: Adrian Chadd Date: Mon, 5 Nov 2012 07:08:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r242599 - 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: Mon, 05 Nov 2012 07:08:45 -0000 Author: adrian Date: Mon Nov 5 07:08:45 2012 New Revision: 242599 URL: http://svnweb.freebsd.org/changeset/base/242599 Log: TX EDMA debugging fixes: * Do the calculation for each ath_buf, rather than just the first * Correct the calculation in the first place. Modified: head/sys/dev/ath/if_ath_debug.c Modified: head/sys/dev/ath/if_ath_debug.c ============================================================================== --- head/sys/dev/ath/if_ath_debug.c Mon Nov 5 05:56:10 2012 (r242598) +++ head/sys/dev/ath/if_ath_debug.c Mon Nov 5 07:08:45 2012 (r242599) @@ -143,17 +143,18 @@ ath_printtxbuf_edma(struct ath_softc *sc const struct ath_desc_txedma *eds; int i, n; - /* - * Assume the TX map size is 4 for now and only walk - * the appropriate number of segments. - */ - n = (bf->bf_nseg / 4) + 1; - printf("Q%u[%3u] (nseg=%d)", qnum, ix, bf->bf_nseg); while (bf != NULL) { /* * XXX For now, assume the txmap size is 4. */ + + /* + * Assume the TX map size is 4 for now and only walk + * the appropriate number of segments. + */ + n = ((bf->bf_nseg - 1) / 4) + 1; + for (i = 0, ds = (const char *) bf->bf_desc; i < n; i ++, ds += sc->sc_tx_desclen) {