Subject: More braindead code
To: None <tech-kern@netbsd.org>
From: Lennart Augustsson <lennart@augustsson.net>
List: tech-kern
Date: 01/14/2000 13:20:18
I'm looking at the MII code (trying to get the Linksys USB Ethernet adapter to work).
Again, I can't believe my eyes!  There is code in there that may loop for up to 500ms
using delay().  I.e. the kernel will busy wait for 0.5s.  And looking a little further the I
see that it can loop for 0.1s during reset.  I've not checked, but the only reason for
using delay() rather than tsleep() is that these routines are called from an interrupt
context, which in my opinion makes using delay() even more unforgivable since it may
block important interrupts.
Clearly, the MII code needs a little restructuring to get rid of these atrocities.

--

        -- Lennart