mirror of
https://github.com/ipxe/ipxe
synced 2025-12-17 10:01:03 +03:00
[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>
This commit is contained in:
@@ -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 |
|
||||
|
||||
Reference in New Issue
Block a user