Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 5 Nov 2008 20:21:14 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 152543 for review
Message-ID:  <200811052021.mA5KLEDO098377@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=152543

Change 152543 by sam@sam_ebb on 2008/11/05 20:20:41

	print the extended tx/rx descriptor for 5416 and later parts

Affected files ...

.. //depot/projects/vap/sys/dev/ath/if_ath.c#119 edit

Differences ...

==== //depot/projects/vap/sys/dev/ath/if_ath.c#119 (text+ko) ====

@@ -280,8 +280,10 @@
 	if (sc->sc_debug & ATH_DEBUG_KEYCACHE)			\
 		ath_keyprint(sc, __func__, ix, hk, mac);	\
 } while (0)
-static	void ath_printrxbuf(const struct ath_buf *bf, u_int ix, int);
-static	void ath_printtxbuf(const struct ath_buf *bf, u_int qnum, u_int ix, int done);
+static	void ath_printrxbuf(struct ath_softc *, const struct ath_buf *bf,
+	u_int ix, int);
+static	void ath_printtxbuf(struct ath_softc *, const struct ath_buf *bf,
+	u_int qnum, u_int ix, int done);
 #else
 #define	IFF_DUMPPKTS(sc, m) \
 	((sc->sc_ifp->if_flags & (IFF_DEBUG|IFF_LINK2)) == (IFF_DEBUG|IFF_LINK2))
@@ -4044,7 +4046,7 @@
 				bf->bf_daddr, PA2DESC(sc, ds->ds_link), rs);
 #ifdef ATH_DEBUG
 		if (sc->sc_debug & ATH_DEBUG_RECV_DESC)
-			ath_printrxbuf(bf, 0, status == HAL_OK);
+			ath_printrxbuf(sc, bf, 0, status == HAL_OK);
 #endif
 		if (status == HAL_EINPROGRESS)
 			break;
@@ -5043,7 +5045,8 @@
 		status = ath_hal_txprocdesc(ah, ds, ts);
 #ifdef ATH_DEBUG
 		if (sc->sc_debug & ATH_DEBUG_XMIT_DESC)
-			ath_printtxbuf(bf, txq->axq_qnum, 0, status == HAL_OK);
+			ath_printtxbuf(sc, bf, txq->axq_qnum, 0,
+			    status == HAL_OK);
 #endif
 		if (status == HAL_EINPROGRESS) {
 			ATH_TXQ_UNLOCK(txq);
@@ -5262,7 +5265,7 @@
 		if (sc->sc_debug & ATH_DEBUG_RESET) {
 			struct ieee80211com *ic = sc->sc_ifp->if_l2com;
 
-			ath_printtxbuf(bf, txq->axq_qnum, ix,
+			ath_printtxbuf(sc, bf, txq->axq_qnum, ix,
 				ath_hal_txprocdesc(ah, bf->bf_desc,
 				    &bf->bf_status.ds_txstat) == HAL_OK);
 			ieee80211_dump_pkt(ic, mtod(bf->bf_m, caddr_t),
@@ -5330,7 +5333,7 @@
 	if (sc->sc_debug & ATH_DEBUG_RESET) {
 		struct ath_buf *bf = STAILQ_FIRST(&sc->sc_bbuf);
 		if (bf != NULL && bf->bf_m != NULL) {
-			ath_printtxbuf(bf, sc->sc_bhalq, 0,
+			ath_printtxbuf(sc, bf, sc->sc_bhalq, 0,
 				ath_hal_txprocdesc(ah, bf->bf_desc,
 				    &bf->bf_status.ds_txstat) == HAL_OK);
 			ieee80211_dump_pkt(ifp->if_l2com, mtod(bf->bf_m, caddr_t),
@@ -5371,7 +5374,7 @@
 			HAL_STATUS status = ath_hal_rxprocdesc(ah, ds,
 				bf->bf_daddr, PA2DESC(sc, ds->ds_link), rs);
 			if (status == HAL_OK || (sc->sc_debug & ATH_DEBUG_FATAL))
-				ath_printrxbuf(bf, ix, status == HAL_OK);
+				ath_printrxbuf(sc, bf, ix, status == HAL_OK);
 			ix++;
 		}
 	}
@@ -6281,9 +6284,11 @@
 
 #ifdef ATH_DEBUG
 static void
-ath_printrxbuf(const struct ath_buf *bf, u_int ix, int done)
+ath_printrxbuf(struct ath_softc *sc, const struct ath_buf *bf,
+	u_int ix, int done)
 {
 	const struct ath_rx_status *rs = &bf->bf_status.ds_rxstat;
+	struct ath_hal *ah = sc->sc_ah;
 	const struct ath_desc *ds;
 	int i;
 
@@ -6295,13 +6300,21 @@
 		    !done ? "" : (rs->rs_status == 0) ? " *" : " !",
 		    ds->ds_ctl0, ds->ds_ctl1,
 		    ds->ds_hw[0], ds->ds_hw[1]);
+		if (ah->ah_magic == 0x20065416) {
+			printf("        %08x %08x %08x %08x %08x %08x %08x\n",
+			    ds->ds_hw[2], ds->ds_hw[3], ds->ds_hw[4],
+			    ds->ds_hw[5], ds->ds_hw[6], ds->ds_hw[7],
+			    ds->ds_hw[8]);
+		}
 	}
 }
 
 static void
-ath_printtxbuf(const struct ath_buf *bf, u_int qnum, u_int ix, int done)
+ath_printtxbuf(struct ath_softc *sc, const struct ath_buf *bf,
+	u_int qnum, u_int ix, int done)
 {
 	const struct ath_tx_status *ts = &bf->bf_status.ds_txstat;
+	struct ath_hal *ah = sc->sc_ah;
 	const struct ath_desc *ds;
 	int i;
 
@@ -6314,6 +6327,16 @@
 		    !done ? "" : (ts->ts_status == 0) ? " *" : " !",
 		    ds->ds_ctl0, ds->ds_ctl1,
 		    ds->ds_hw[0], ds->ds_hw[1], ds->ds_hw[2], ds->ds_hw[3]);
+		if (ah->ah_magic == 0x20065416) {
+			printf("        %08x %08x %08x %08x %08x %08x %08x %08x\n",
+			    ds->ds_hw[4], ds->ds_hw[5], ds->ds_hw[6],
+			    ds->ds_hw[7], ds->ds_hw[8], ds->ds_hw[9],
+			    ds->ds_hw[10],ds->ds_hw[11]);
+			printf("        %08x %08x %08x %08x %08x %08x %08x %08x\n",
+			    ds->ds_hw[12],ds->ds_hw[13],ds->ds_hw[14],
+			    ds->ds_hw[15],ds->ds_hw[16],ds->ds_hw[17],
+			    ds->ds_hw[18], ds->ds_hw[19]);
+		}
 	}
 }
 #endif /* ATH_DEBUG */



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