[vortex] Test results with 3c90xcfg -- I'M CONFUSED!

Bogdan Costescu bogdan.costescu@iwr.uni-heidelberg.de
Wed Feb 20 12:44:01 2002


  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.

---830399112-194434118-1014227031=:9059
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Wed, 20 Feb 2002, Bill Cattey wrote:

> Is there some simple set of arguments to vortex-diag or mii-diag that
> enable me to set NWAY/Autonegotiate on the chips by hand so that we can
> at least go to our machines and take them out of this unpleasant state?

Here is a patch that have sent to Donald some months ago to implement 
changing the EEPROM media default with vortex-diag. It containes however 
only the code but not the user interface as that raised some problems that 
I didn't know how to solve: the *-diag family shares code and command line 
options and I didn't want to have vortex-diag diverge from the others (and 
probably Don wouldn't have accepted it anyway 8-)).
The patch also allows enabling/disabling of BootPROM, but that's something 
completely different. To do what you want, you need to have "set_ee_media" 
set to non-zero and "set_ee_media_auto" to 1. In order for the changes to 
be written to the EEPROM, vortex-diag must be run with the "-w" command 
line option, but it's probably better to run it first without it and it 
should report what changes it does.

This code is based on documentation that I have and by watching what 
3Com's DOS tool did to my card (which are not exactly equivalent!). As it 
did not receive large testing, I cannot guarantee that it works well, but 
all modifications that it does should be reversible by using the DOS tool.
However, if you choose to use it, a report (either good or bad) would be 
much appreciated.

-- 
Bogdan Costescu

IWR - Interdisziplinaeres Zentrum fuer Wissenschaftliches Rechnen
Universitaet Heidelberg, INF 368, D-69120 Heidelberg, GERMANY
Telephone: +49 6221 54 8869, Telefax: +49 6221 54 8868
E-mail: Bogdan.Costescu@IWR.Uni-Heidelberg.De



---830399112-194434118-1014227031=:9059
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="vd.patch"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.44.0202201843510.9059@kenzo.iwr.uni-heidelberg.de>
Content-Description: 
Content-Disposition: attachment; filename="vd.patch"

LS0tIHZvcnRleC1kaWF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