summaryrefslogtreecommitdiffstats
path: root/sys/dev/ath/if_ath_debug.c
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2012-11-05 07:08:45 +0000
committeradrian <adrian@FreeBSD.org>2012-11-05 07:08:45 +0000
commit4ee785630e021884006f85f6fbb7cfe10653a7fd (patch)
treeaa9f242851053c9ce60d29e8b1d21598dd35ac14 /sys/dev/ath/if_ath_debug.c
parenta2fc3751fcb7d01d06f3b2f086617e89606efced (diff)
downloadFreeBSD-src-4ee785630e021884006f85f6fbb7cfe10653a7fd.zip
FreeBSD-src-4ee785630e021884006f85f6fbb7cfe10653a7fd.tar.gz
TX EDMA debugging fixes:
* Do the calculation for each ath_buf, rather than just the first * Correct the calculation in the first place.
Diffstat (limited to 'sys/dev/ath/if_ath_debug.c')
-rw-r--r--sys/dev/ath/if_ath_debug.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/dev/ath/if_ath_debug.c b/sys/dev/ath/if_ath_debug.c
index 7d620dd..e3c73f5 100644
--- a/sys/dev/ath/if_ath_debug.c
+++ b/sys/dev/ath/if_ath_debug.c
@@ -143,17 +143,18 @@ ath_printtxbuf_edma(struct ath_softc *sc, const struct ath_buf *first_bf,
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) {
OpenPOWER on IntegriCloud