Subject: Re: Setting the default port on ethernet cards
To: Chris G. Demetriou <>
From: Eric Varsanyi <>
List: tech-net
Date: 04/23/1997 13:15:49
>> The only hesitation I have about this is the additional kernel code size
>> needed to support this feature for some cards (efsetup has to do
>> a fair amount of work to figure out what its talking to and do the
>> right thing for all flavors of 3com cards, thats a lot of code that
>> gets run once - which is another reason I put it in a user mode
>> program).
>I agree with this, but i'm not sure that the code really ends up being
>that large.

I just looked at efsetup... not counting the command line options
processing, the routines that do the ioctl's to read/write the
eeprom, and the routine that formats the eeprom contents for display
its about 80 lines of code. The whole program is around 400 lines including
the above and the copyright.

The code that's currently in the kernel to read/write prom locations is
90 lines of code (a read and write routine, plus a routine shared by both
to issue the appropriate commands and do the sync wait).

This is just FYI. I don't mind seeing the 'set default media' option
be part of the interface. Like Chris, I'm worried that you'll still
want to be able to talk to the EEPROM from user mode for other
reasons (its pretty useful to print out all the buffer sizing and
version info for instance), this means more kernel code but you
still need the user mode stuff anyway.

Are there any cards other than the 3c59x's that set up their ASIC
based on EEPROM contents at powerup time? I would argue that in
most other cases you can simply leave the interface alone until it
is ifconfiged up in netstart and let the 'defaults' be set from
there.  I did efsetup because the 595's will come online at powerup
and if you have the wrong media type set in the EEPROM (10 vs. 100)
it will jam the net until the O/S comes up far enough to ifconfig