Subject: Implicit device activation
To: None <tech-kern@netbsd.org>
From: None <Lloyd.Parkes@vuw.ac.nz>
List: tech-net
Date: 03/11/1999 15:28:35
Being the careful and considered person that I am, after I sent my last
message asking advice on device activation I went home and started to
cut code. Considering the mess I could have made, things have turned
out quite well.

I added two lines of code to net/if.c so that it now calls
config_deactivate() and config_activate() as appropriate when bringing
an interface up or down. I also added one line to my driver so that it
it marks its dv_flags as inactive, overriding the default for all
devices to be active when they have been attached. Of course I also had
to write the activate function to put in my struct cfattach.

All in all I am very pleased with the results. I don't think I have
messed with (other parts of) the kernel too much, and I don't have to
pass around pointers to enable/disable functions in my softc. Driver
specific pointers to enable/disable functions struck me as something
that should be done away with.

I will post my patches when I get home.

-- 
Lloyd Parkes
"For my confession they burned me with fire
 And found that I was for endurance made." - The Arabian Nights, trans. Haddawy