aboutsummaryrefslogtreecommitdiffstats
path: root/src/drivers/net/realtek.c
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2012-08-23 13:27:31 +0100
committerMichael Brown <mcb30@ipxe.org>2012-08-23 15:15:42 +0100
commit77afdc56439c904b0a8ae167a0a899c1488b328a (patch)
treeaf1644994e4e304d8498107d16ef686727b5121c /src/drivers/net/realtek.c
parent5d05220ee034bf6989786303d1e195aaf61da986 (diff)
downloadipxe-77afdc56439c904b0a8ae167a0a899c1488b328a.tar.gz
[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.c')
-rw-r--r--src/drivers/net/realtek.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/drivers/net/realtek.c b/src/drivers/net/realtek.c
index 2dded0a5..77df64e6 100644
--- a/src/drivers/net/realtek.c
+++ b/src/drivers/net/realtek.c
@@ -500,6 +500,7 @@ static void realtek_refill_rx ( struct realtek_nic *rtl ) {
*/
static int realtek_open ( struct net_device *netdev ) {
struct realtek_nic *rtl = netdev->priv;
+ uint32_t tcr;
uint32_t rcr;
int rc;
@@ -524,6 +525,12 @@ static int realtek_open ( struct net_device *netdev ) {
*/
writeb ( ( RTL_CR_TE | RTL_CR_RE ), rtl->regs + RTL_CR );
+ /* Configure transmitter */
+ tcr = readl ( rtl->regs + RTL_TCR );
+ tcr &= ~RTL_TCR_MXDMA_MASK;
+ tcr |= RTL_TCR_MXDMA_DEFAULT;
+ writel ( tcr, rtl->regs + RTL_TCR );
+
/* Configure receiver */
rcr = readl ( rtl->regs + RTL_RCR );
rcr &= ~( RTL_RCR_RXFTH_MASK | RTL_RCR_RBLEN_MASK |