diff options
author | wpaul <wpaul@FreeBSD.org> | 1999-10-21 19:42:03 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 1999-10-21 19:42:03 +0000 |
commit | 6ac7cdd7154bae972f2dabc8a960faafc7607ed9 (patch) | |
tree | fb11a26f4ba217bd7b4f9ca728c68f086a925cfe /sys/pci/if_rlreg.h | |
parent | e2a07af8e9edccde7317330a3790e61a69e2784f (diff) | |
download | FreeBSD-src-6ac7cdd7154bae972f2dabc8a960faafc7607ed9.zip FreeBSD-src-6ac7cdd7154bae972f2dabc8a960faafc7607ed9.tar.gz |
Make some tweaks to the RealTek driver:
- Fix a bug in rl_rxeof() handler: in the case where the packet wraps
from the end of the receive buffer back to the beginning, we need to
insure that at least sizeof(ether_header) bytes make it into the first
mbuf. If we don't, then doing eh = mtod(m, struct ether_header *)
loses. To avoid this, we use m_pullup() to suck at least MHLEN -
RL_ETHER_ALIGN bytes into the first mbuf, which should also help
small packets fit into a single mbuf.
Pointed out by: Philip A. Prindeville <philipp@zembu.com>
- Make the transmit threshold autotuning: start off with a small value
and jack it up when TX underruns are detected.
- Also improve TX error recovery: kick the chip in the head with a
reset/init sequence to make sure it recovers afer a transmit error.
Diffstat (limited to 'sys/pci/if_rlreg.h')
-rw-r--r-- | sys/pci/if_rlreg.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/pci/if_rlreg.h b/sys/pci/if_rlreg.h index 8654f7e..0bb9ffc 100644 --- a/sys/pci/if_rlreg.h +++ b/sys/pci/if_rlreg.h @@ -299,7 +299,8 @@ #define RL_RXBUFLEN (1 << ((RL_RX_BUF_SZ >> 11) + 13)) #define RL_TX_LIST_CNT 4 #define RL_MIN_FRAMELEN 60 -#define RL_TX_EARLYTHRESH (256 << 11) +#define RL_TXTHRESH(x) ((x) << 11) +#define RL_TX_THRESH_INIT 96 #define RL_RX_FIFOTHRESH RL_RXFIFO_256BYTES #define RL_RX_MAXDMA RL_RXDMA_UNLIMITED #define RL_TX_MAXDMA RL_TXDMA_2048BYTES @@ -364,6 +365,7 @@ struct rl_softc { u_int8_t rl_unit; /* interface number */ u_int8_t rl_type; u_int8_t rl_stats_no_timeout; + int rl_txthresh; struct rl_chain_data rl_cdata; struct callout_handle rl_stat_ch; }; |