]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[realtek] Fix reopening of legacy-mode 8139 NIC
authorMichael Brown <mcb30@ipxe.org>
Sun, 26 May 2013 17:26:48 +0000 (18:26 +0100)
committerMichael Brown <mcb30@ipxe.org>
Sun, 26 May 2013 17:31:46 +0000 (18:31 +0100)
commit5d3d62d8d72bfd84122fb89e1ee5f9e4c65f46c7
treeab9cdf819da0894d61cb022ea4d6175a4edb256d
parentc4bce43c3c4d3c5ebb2d926b58ad16dc9642c19d
[realtek] Fix reopening of legacy-mode 8139 NIC

realtek_destroy_ring() currently does nothing if the card is operating
in legacy (pre-RTL8139C+) mode.  In particular, the producer and
consumer counters are incorrectly left holding their current values.
Virtual hardware (e.g. the emulated RTL8139 in qemu and similar VMs)
is tolerant of this behaviour, but real hardware will fail to transmit
if the descriptors are not used in the correct order.

Fix by resetting the producer and consumer counters in
realtek_destroy_ring() even if the card is operating in legacy mode.

Reported-by: Gelip <mrgelip@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/net/realtek.c