summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2013-02-20 12:14:49 +0000
committeradrian <adrian@FreeBSD.org>2013-02-20 12:14:49 +0000
commit5f4ebdbfb81f276bb33d8530e4d121fdcda4349d (patch)
tree836bd846a4d341a581aafc6e908404ffda4227f7
parent5ee708ace2a30c3137ed7b426d6abed10d23e952 (diff)
downloadFreeBSD-src-5f4ebdbfb81f276bb33d8530e4d121fdcda4349d.zip
FreeBSD-src-5f4ebdbfb81f276bb33d8530e4d121fdcda4349d.tar.gz
Configure larger TX FIFO default and maximum level values.
This has reduced the number of TX delimiter and data underruns when doing large UDP transfers (>100mbit). This stops any HAL_INT_TXURN interrupts from occuring, which is a good sign! Obtained from: Qualcomm Atheros
-rw-r--r--sys/dev/ath/ath_hal/ar5416/ar5416_attach.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c b/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
index d165540..30d1161 100644
--- a/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
+++ b/sys/dev/ath/ath_hal/ar5416/ar5416_attach.c
@@ -241,8 +241,24 @@ ar5416InitState(struct ath_hal_5416 *ahp5416, uint16_t devid, HAL_SOFTC sc,
/* Enable all ANI functions to begin with */
AH5416(ah)->ah_ani_function = 0xffffffff;
- /* Set overridable ANI methods */
- AH5212(ah)->ah_aniControl = ar5416AniControl;
+ /* Set overridable ANI methods */
+ AH5212(ah)->ah_aniControl = ar5416AniControl;
+
+ /* Default FIFO Trigger levels */
+#define AR_FTRIG_512B 0x00000080 // 5 bits total
+ /* AR9285/AR9271 need to use half the TX FIFOs */
+ if (AR_SREV_KITE(ah) || AR_SREV_9271(ah)) {
+ AH5212(ah)->ah_txTrigLev = (AR_FTRIG_256B >> AR_FTRIG_S);
+ AH5212(ah)->ah_maxTxTrigLev = ((2048 / 64) - 1);
+ } else {
+ AH5212(ah)->ah_txTrigLev = (AR_FTRIG_512B >> AR_FTRIG_S);
+ AH5212(ah)->ah_maxTxTrigLev = ((4096 / 64) - 1);
+ }
+ ath_hal_printf(ah, "%s: trigLev=%d, maxTxTrigLev=%d\n",
+ __func__,
+ AH5212(ah)->ah_txTrigLev,
+ AH5212(ah)->ah_maxTxTrigLev);
+#undef AR_FTRIG_512B
}
uint32_t
OpenPOWER on IntegriCloud