forked from Stichting-MINIX-Research-Foundation/minix
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lance: perform full reinitialization for restarts
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
- Loading branch information
Showing
1 changed file
with
32 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters