From owner-p4-projects@FreeBSD.ORG Wed Nov 5 20:21:15 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id C9BE2106567C; Wed, 5 Nov 2008 20:21:14 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8DACD106567B for ; Wed, 5 Nov 2008 20:21:14 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 7C0478FC18 for ; Wed, 5 Nov 2008 20:21:14 +0000 (UTC) (envelope-from sam@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id mA5KLEq2098379 for ; Wed, 5 Nov 2008 20:21:14 GMT (envelope-from sam@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id mA5KLEDO098377 for perforce@freebsd.org; Wed, 5 Nov 2008 20:21:14 GMT (envelope-from sam@freebsd.org) Date: Wed, 5 Nov 2008 20:21:14 GMT Message-Id: <200811052021.mA5KLEDO098377@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to sam@freebsd.org using -f From: Sam Leffler To: Perforce Change Reviews Cc: Subject: PERFORCE change 152543 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Nov 2008 20:21:15 -0000 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 */