From 628480ec4f4e30f3e86a635ea5a4ecf264f6951c Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Tue, 6 Aug 2013 14:27:21 +0000 Subject: [PATCH] RTL8139 now works in QEMU. git-svn-id: svn://kolibrios.org@3858 a494cfbc-eb01-0410-851d-a64ba20cac60 --- drivers/ethernet/RTL8139.asm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/ethernet/RTL8139.asm b/drivers/ethernet/RTL8139.asm index 9586a824f0..8e66a1c089 100644 --- a/drivers/ethernet/RTL8139.asm +++ b/drivers/ethernet/RTL8139.asm @@ -547,7 +547,11 @@ reset: DEBUGF 2, "Reset timeout!\n" .reset_completed: +; Read MAC address + call read_mac + ; unlock config and BMCR registers + set_io 0 set_io REG_9346CR mov al, (1 shl BIT_93C46_EEM1) or (1 shl BIT_93C46_EEM0) out dx, al @@ -560,16 +564,15 @@ reset: out dx, eax ; enable Rx/Tx - mov al, (1 shl BIT_RE) or (1 shl BIT_TE) set_io REG_COMMAND out dx, al ; Rxbuffer size, unlimited dma burst, no wrapping, no rx threshold ; accept broadcast packets, accept physical match packets - mov ax, RX_CONFIG + mov eax, RX_CONFIG set_io REG_RXCONFIG - out dx, ax + out dx, eax ; 1024 bytes DMA burst, total retries = 16 + 8 * 16 = 144 mov eax, (TX_MXDMA shl BIT_TX_MXDMA) or (TXRR shl BIT_TXRR) or BIT_IFG1 or BIT_IFG0 @@ -617,9 +620,6 @@ reset: set_io REG_RBSTART out dx, eax -; Read MAC address - call read_mac - ; enable interrupts set_io 0 set_io REG_IMR