Date: Thu, 8 Sep 2011 12:19:58 +0000 (UTC) From: Adrian Chadd <adrian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r225447 - user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416 Message-ID: <201109081219.p88CJw6Z090486@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: adrian Date: Thu Sep 8 12:19:58 2011 New Revision: 225447 URL: http://svn.freebsd.org/changeset/base/225447 Log: Add txq stop debugging; always memzero the 11n descriptors before chaining. * To help me trace down some ath txq device timeout issues, print out some TXQ state before the TXQ is halted. * Always memzero the descriptor in ar5416ChainTxDesc(). It was being called for the non-first descriptor in a (sub) frame. Problem is, I'm calling this function first, and THEN setting up the first descriptor, because of the way that ar5416ChainTxDesc() overwrites some fields that ar5416SetupFirstTxDesc() sets up. It's quite possible that ar5416SetupFirstTxDesc() should be called first; and ar5416ChainTxDesc() should be modified to merge in these changes rather than overwrite them. If I decide this, I'll revert this part of the patch. Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c ============================================================================== --- user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Thu Sep 8 09:33:49 2011 (r225446) +++ user/adrian/if_ath_tx/sys/dev/ath/ath_hal/ar5416/ar5416_xmit.c Thu Sep 8 12:19:58 2011 (r225447) @@ -41,6 +41,14 @@ ar5416StopTxDma(struct ath_hal *ah, u_in HALASSERT(AH5212(ah)->ah_txq[q].tqi_type != HAL_TX_QUEUE_INACTIVE); + HALDEBUG(ah, HAL_DEBUG_TXQUEUE, + "%s: Q(%d) QTXDP: 0x%.8x, QSTS: 0x%.8x, TXE: 0x%.8x, TXD: 0x%.8x\n", + __func__, q, + OS_REG_READ(ah, AR_QTXDP(q)), + OS_REG_READ(ah, AR_QSTS(q)), + OS_REG_READ(ah, AR_Q_TXE), + OS_REG_READ(ah, AR_Q_TXD)); + OS_REG_WRITE(ah, AR_Q_TXD, 1 << q); for (i = STOP_DMA_TIMEOUT/STOP_DMA_ITER; i != 0; i--) { if (ar5212NumTxPending(ah, q) == 0) @@ -350,9 +358,16 @@ ar5416ChainTxDesc(struct ath_hal *ah, st isaggr = 1; } - if (!firstSeg) { - OS_MEMZERO(ds->ds_hw, AR5416_DESC_TX_CTL_SZ); - } + /* + * Since this function is called before any of the other + * descriptor setup functions (at least in this particular + * 802.11n aggregation implementation), always bzero() the + * descriptor. Previously this would be done for all but + * the first segment. + * XXX TODO: figure out why; perhaps I'm using this slightly + * XXX incorrectly. + */ + OS_MEMZERO(ds->ds_hw, AR5416_DESC_TX_CTL_SZ); ads->ds_ctl0 = (pktLen & AR_FrameLen); ads->ds_ctl1 = (type << AR_FrameType_S)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201109081219.p88CJw6Z090486>