Subject: Automatic device activation example
To: None <tech-kern@netbsd.org>
From: Lloyd Parkes <Lloyd.Parkes@vuw.ac.nz>
List: tech-kern
Date: 03/11/1999 20:43:00
  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

--0-1530040452-921138171=:18666
Content-Type: TEXT/PLAIN; charset=US-ASCII

Hello all,
I have attached a couple of diffs to this message. The first one is a diff
of my changes to net/if.c. The second is a diff of the changes I have made
to the NE2000 drivers to support my changes to net/if.c. I also have some
skeletal code for the AMD MACE in http://www.geo.vuw.ac.nz/~lloyd/.

I had thought that I could do away with tracking the IFF_UP and
IFF_RUNNING flags when processing a SIOCSIFFLAGS ioctl. i.e. I thought I
could get away with not having to start and stop the DP8390 except for
explicit resets. Unfortunately there are many NE2000 devices that do not
have an activate function (such as NE2000s on an ISA bus), and I realised
that it wasn't going to be appropriate to try and write some.

After some thought, I realised that I could leave the SIOCSIFFLAGS ioctl
processing almost as it was. If the NE2000 supported the activation
interface, it would be marked as running by the time dp8390_ioctl got its
hands on the ioctl call, and so it wouldn't try and start the DP8390. If
the NE2000 didn't support activation, then it wouldn't be marked as
running, and dp8390_ioctl would start the DP8390.

I also have some skeletal code for the AMD MACE in
http://www.geo.vuw.ac.nz/~lloyd/. There isn't much programming of the MACE
involved in it yet, so it may show a better picture of what I am trying to
achieve than my quick hacks on the NE2000 driver.

Lloyd


--0-1530040452-921138171=:18666
Content-Type: TEXT/PLAIN; charset=US-ASCII; name=dev-diffs
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.NEB.4.05.9903112042510.18666@ophidian.lloyd.gen.nz>
Content-Description: dev/* diffs
Content-Disposition: attachment; filename=dev-diffs

ZGlmZiAtY3IgY3VycmVudC9zcmMvc3lzL2Rldi9pYy9kcDgzOTAuYyB3b3Jr
L21hY2UvZGV2L2ljL2RwODM5MC5jDQoqKiogY3VycmVudC9zcmMvc3lzL2Rl
di9pYy9kcDgzOTAuY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bnRl
cmZhY2UuICovDQohIAkJbmVfcGNtY2lhX2Rpc2FibGUgKHNjKTsNCiEgCQli
cmVhazsNCiEgCX0NCiEgCXNwbHgocyk7DQohIAlyZXR1cm4gKHJ2KTsNCiAg
fQ0K
--0-1530040452-921138171=:18666
Content-Type: TEXT/PLAIN; charset=US-ASCII; name=net-diffs
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.NEB.4.05.9903112042511.18666@ophidian.lloyd.gen.nz>
Content-Description: net/if.c diffs
Content-Disposition: attachment; filename=net-diffs

KioqIGN1cnJlbnQvc3JjL3N5cy9uZXQvaWYuYwlTdW4gRmViIDIxIDAxOjI2
OjAyIDE5OTkNCi0tLSB3b3JrL21hY2UvbmV0L2lmLmMJVHVlIE1hciAgOSAx
OToyNzoyMiAxOTk5DQoqKioqKioqKioqKioqKioNCioqKiA0MCw0NSAqKioq
DQotLS0gNDAsNDYgLS0tLQ0KICAjaW5jbHVkZSAib3B0X2NvbXBhdF80My5o
Ig0KICANCiAgI2luY2x1ZGUgPHN5cy9wYXJhbS5oPg0KKyAjaW5jbHVkZSA8
c3lzL2RldmljZS5oPg0KICAjaW5jbHVkZSA8c3lzL21idWYuaD4NCiAgI2lu
Y2x1ZGUgPHN5cy9zeXN0bS5oPg0KICAjaW5jbHVkZSA8c3lzL3Byb2MuaD4N
CioqKioqKioqKioqKioqKg0KKioqIDQ3Miw0ODAgKioqKg0KICAJCQlpbnQg
cyA9IHNwbGltcCgpOw0KICAJCQlpZl9kb3duKGlmcCk7DQogIAkJCXNwbHgo
cyk7DQogIAkJfQ0KICAJCWlmIChpZnItPmlmcl9mbGFncyAmIElGRl9VUCAm
JiAoaWZwLT5pZl9mbGFncyAmIElGRl9VUCkgPT0gMCkgew0KISAJCQlpbnQg
cyA9IHNwbGltcCgpOw0KICAJCQlpZl91cChpZnApOw0KICAJCQlzcGx4KHMp
Ow0KICAJCX0NCi0tLSA0NzMsNDg0IC0tLS0NCiAgCQkJaW50IHMgPSBzcGxp
bX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