summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/realtek.h
diff options
context:
space:
mode:
authorMichael Brown2012-08-23 14:27:31 +0200
committerMichael Brown2012-08-23 16:15:42 +0200
commit77afdc56439c904b0a8ae167a0a899c1488b328a (patch)
treeaf1644994e4e304d8498107d16ef686727b5121c /src/drivers/net/realtek.h
parent[realtek] Use explicit values for RCR.RXFTH and RCR.MXDMA (diff)
downloadipxe-77afdc56439c904b0a8ae167a0a899c1488b328a.tar.gz
ipxe-77afdc56439c904b0a8ae167a0a899c1488b328a.tar.xz
ipxe-77afdc56439c904b0a8ae167a0a899c1488b328a.zip
[realtek] Use explicit value for TCR.MXDMA
Some RTL8169 cards (observed with an RTL8169SC) power up with TCR.MXDMA set to 16 bytes. While this does not prevent proper operation, it almost certainly degrades performance. Fix by explicitly setting TCR.MXDMA to "unlimited". Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/drivers/net/realtek.h')
-rw-r--r--src/drivers/net/realtek.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/drivers/net/realtek.h b/src/drivers/net/realtek.h
index 24ec09e7..2591e725 100644
--- a/src/drivers/net/realtek.h
+++ b/src/drivers/net/realtek.h
@@ -132,6 +132,12 @@ enum realtek_legacy_status {
/** Interrupt Status Register (word) */
#define RTL_ISR 0x3e
+/** Transmit (Tx) Configuration Register (dword) */
+#define RTL_TCR 0x40
+#define RTL_TCR_MXDMA(x) ( (x) << 8 ) /**< Max DMA burst size */
+#define RTL_TCR_MXDMA_MASK RTL_TCR_MXDMA ( 0x7 )
+#define RTL_TCR_MXDMA_DEFAULT RTL_TCR_MXDMA ( 0x7 /* Unlimited */ )
+
/** Receive (Rx) Configuration Register (dword) */
#define RTL_RCR 0x44
#define RTL_RCR_RXFTH(x) ( (x) << 13 ) /**< Receive FIFO threshold */