
When performing a restart (CSR0 STOP, STRT), the behavior regarding the NIC's current RX/TX descriptor ring counters varies between cards: older LANCE cards do not reset the counters; newer PCnet cards do reset them; VirtualBox's emulation is once again broken in that it claims to emulate newer cards but implements the older behavior. Changing the card's receive mode requires such a restart, and now that the system can actually change receive modes dynamically as part of normal network operation, this results in the lance driver breaking all the time on at least VirtualBox. Instead of trying to figure out exactly what is going on with the counters during a restart, we now simply perform a full-blown reinitialization every time the NIC is restarted. That leaves no ambiguity regarding the counters, and appears to be what drivers on other OSes do as well. As a bonus, this approach actually saves code. Change-Id: I60fad2df6de4616d5de2cec39c09b60c15d854fb
…
Description
Languages
C
78.2%
Roff
10.2%
Assembly
4.6%
Shell
3.7%
Makefile
1.6%
Other
1.2%