Subject: Network driver detach
To: None <tech-kern@netbsd.org>
From: Lennart Augustsson <lennart@augustsson.net>
List: tech-kern
Date: 01/27/2000 01:25:22
Unless someone protests I'm going to change some network drivers to do
something, IMHO, more sane in their detach routines.
Basically, they will call
   ether_ifdetach(ifp);
   if_detach(ifp);
and if they have PHYs
   mii_phy_detach(...);

If any of these calls fail the detach will fail.  This way we only need
to implement these few routines to make network drivers detach properly.
ether_ifdetach() and mii_phy_detach() are easy to implement.
(And if_detach() can be fudged with some memory leakage until
implemented properly.)

Note, I'm not proposing to commit proper implementations of these three
detach routines, I just want all drivers to do the right thing on
detach.


--

        -- Lennart