Subject: Re: A possible way of handling variant/common devices
To: Bill Sommerfeld <sommerfeld@orchard.east-arlington.ma.us>
From: Andrew Gillham <gillhaa@ghost.whirlpool.com>
List: tech-kern
Date: 03/28/1997 16:49:23
> Perhaps one way to compromise here -- getting both user convenience
> and driver cleanliness -- is to have a "generic" eth* or lan* wrapper
> around ethernet devices similar to the scsibus* wrapper around SCSI
> controllers.

I'm just a kernel dabbler, but working on a driver for my NE3300 has
show me one thing.  Anything that "cleans up" if_ed.c would be great!
The NE3300 is an EISA dp8390 variant, with 32bit shared memory. I
split the if_ed.c myself, creating /sys/dev/dp8390.c, 
/sys/dev/isa/if_ed_isa.c, and /sys/dev/eisa/if_ed_eisa.c.  And, I even
got it working correctly.. :)  Regardless, for the average joe wanting
to mess with a device driver, the if_ed.c driver is a nightmare.  
Splitting the driver into MI/MD chunks is desperately needed, and I
agree with Matt that card specific probes would be ideal in seperate
chunks as well.  To me this would make it easier to drop in a driver
for some variant, without potentially breaking existing support.  

WRT "eth*" devices, they would be useful, especially when/if NetBSD
decides to implement subinterfaces.  A specific NIC driver shouldn't
deal with the clutter of subinterfaces, it should just present itself
to the upper layers as a single device.  The generic "eth0" device
could then simply wrap (obscure?) the actual device (say "le0"), or
allow subinterfaces.  I would love to be able to do something like:
	ifconfig eth0 x.x.x.1 
	ifconfig eth0.1 x.x.x.2
	ifconfig eth0.2 x.x.x.3
etc.. the 'alias' syntax is rather cumbersome.

-Andrew