receive config register of rtl8139 card is reseting to 0
Posted: Wed Oct 31, 2012 10:40 am
I am writing a rtl8139 network driver.
However I am not able to receive packets. On debugging I found that the receive config register (0x44) is reseting its value to 0.
I am testing it in qemu.
--thanks
However I am not able to receive packets. On debugging I found that the receive config register (0x44) is reseting its value to 0.
Code: Select all
outl((BaseAddress + 0x44), 0x000002FF); // For receiving all type of packets.
uint32 reg2 = inl(BaseAddress + 0x44); // reading if changes get reflected
reg2 is 0. // no change.
I am testing it in qemu.
Code: Select all
# qemu script to run kernel
brctl addbr br0
tunctl -t tap0 -u root2
brctl addif br0 eth0
brctl addif br0 tap0
ifconfig eth0 up
ifconfig tap0 up
ifconfig br0 10.0.2.21/24
ifconfig eth0 0.0.0.0 promisc
[b]qemu -m 1G -kernel kernel -net nic,macaddr=05:aa:10:60:21:01,model=rtl8139 -net tap,ifname=tap0,script=no[/b]
ifconfig br0 down
brctl delbr br0