From owner-svn-src-head@FreeBSD.ORG Mon Sep 24 19:48:42 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3CCCE1065670; Mon, 24 Sep 2012 19:48:42 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0EA208FC14; Mon, 24 Sep 2012 19:48:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q8OJmf5a085962; Mon, 24 Sep 2012 19:48:41 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q8OJmfXO085960; Mon, 24 Sep 2012 19:48:41 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201209241948.q8OJmfXO085960@svn.freebsd.org> From: Adrian Chadd Date: Mon, 24 Sep 2012 19:48:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r240895 - head/sys/dev/ath X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Sep 2012 19:48:42 -0000 Author: adrian Date: Mon Sep 24 19:48:41 2012 New Revision: 240895 URL: http://svn.freebsd.org/changeset/base/240895 Log: Debugging output fixes: * use the correct frame status - although the completion descriptor is the _last_ in the frame/aggregate, the status is currently stored in the _first_ buffer. * Print out ath_buf specific fields once, not per descriptor in an ath_buf. 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 Sep 24 19:32:24 2012 (r240894) +++ head/sys/dev/ath/if_ath_debug.c Mon Sep 24 19:48:41 2012 (r240895) @@ -198,7 +198,7 @@ static void ath_printtxbuf_legacy(struct ath_softc *sc, const struct ath_buf *first_bf, u_int qnum, u_int ix, int done) { - const struct ath_tx_status *ts = &first_bf->bf_last->bf_status.ds_txstat; + const struct ath_tx_status *ts = &first_bf->bf_status.ds_txstat; const struct ath_buf *bf = first_bf; struct ath_hal *ah = sc->sc_ah; const struct ath_desc *ds; @@ -206,16 +206,17 @@ ath_printtxbuf_legacy(struct ath_softc * printf("Q%u[%3u]", qnum, ix); while (bf != NULL) { + printf(" (bf=%p, lastds=%p)\n", bf, first_bf->bf_lastds); + printf(" Seq: %d swtry: %d ADDBAW?: %d DOBAW?: %d\n", + bf->bf_state.bfs_seqno, + bf->bf_state.bfs_retries, + bf->bf_state.bfs_addedbaw, + bf->bf_state.bfs_dobaw); for (i = 0, ds = bf->bf_desc; i < bf->bf_nseg; i++, ds++) { printf(" (DS.V:%p DS.P:%p) L:%08x D:%08x F:%04x%s\n", ds, (const struct ath_desc *)bf->bf_daddr + i, ds->ds_link, ds->ds_data, bf->bf_state.bfs_txflags, !done ? "" : (ts->ts_status == 0) ? " *" : " !"); - printf(" Seq: %d swtry: %d ADDBAW?: %d DOBAW?: %d\n", - bf->bf_state.bfs_seqno, - bf->bf_state.bfs_retries, - bf->bf_state.bfs_addedbaw, - bf->bf_state.bfs_dobaw); printf(" %08x %08x %08x %08x %08x %08x\n", ds->ds_ctl0, ds->ds_ctl1, ds->ds_hw[0], ds->ds_hw[1],