From 2ee8f5d296934c4304c6ac8d9e9aad63f92de0b8 Mon Sep 17 00:00:00 2001 From: hidnplayr Date: Mon, 18 Mar 2013 17:23:05 +0000 Subject: [PATCH] Enabled Promiscuous mode for i8254x so it works in Qemu. git-svn-id: svn://kolibrios.org@3387 a494cfbc-eb01-0410-851d-a64ba20cac60 --- kernel/branches/net/drivers/i8254x.asm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/branches/net/drivers/i8254x.asm b/kernel/branches/net/drivers/i8254x.asm index 925a40a1a1..1fe627a007 100644 --- a/kernel/branches/net/drivers/i8254x.asm +++ b/kernel/branches/net/drivers/i8254x.asm @@ -548,7 +548,8 @@ reset_dontstart: mov dword [esi + REG_RDLEN], (1 * 128) ; Receive Descriptor Length mov dword [esi + REG_RDH], 0 ; Receive Descriptor Head mov dword [esi + REG_RDT], 1 ; Receive Descriptor Tail - mov dword [esi + REG_RCTL], 0x04008006 ; Receiver Enable, Store Bad Packets, Broadcast Accept Mode, Strip Ethernet CRC from incoming packet + mov dword [esi + REG_RCTL], RCTL_EN or RCTL_SBP or RCTL_BAM or RCTL_SECRC or RCTL_UPE or RCTL_MPE + ; Receiver Enable, Store Bad Packets, Broadcast Accept Mode, Strip Ethernet CRC from incoming packet, Promiscuous mode mov dword [device.tx_desc], 0 mov dword [device.tx_desc + 4], 0 @@ -577,7 +578,7 @@ start_i8254x: mov [esi + REG_RDTR], eax ; Clear the Receive Delay Timer Register mov [esi + REG_RADV], eax ; Clear the Receive Interrupt Absolute Delay Timer mov [esi + REG_RSRPD], eax ; Clear the Receive Small Packet Detect Interrupt - or eax, 1 shl 0 + 1 shl 7 ; TXDW + RXT0 +; or eax, 1 shl 0 + 1 shl 7 ; TXDW + RXT0 mov eax, 1+4+16 ;;;; hack! mov [esi + REG_IMS], eax ; Enable interrupt types