Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Nov 2012 07:08:45 +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: r242599 - head/sys/dev/ath
Message-ID:  <201211050708.qA578jBq048992@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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) {



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