[vortex] The mysteries of on-chip MII.

Greg Beeley Greg.Beeley@LightSys.org
Tue Mar 26 20:46:01 2002


Hi,

Thanks, Donald, for your input into the "mysteries" :)

> >     So, the solution that I've used is to internally set the card's
> >     nvram configuration to use MII when it boots.  The 3c905b driver
> 
> Bogus.

:)  When one can write a driver or even a user-mode utility in C with Linux
kernel support, things are a bit different.... but....

> The better solution to do what vortex-diag.c is doing: if the part has
> the flash addressing bug, save the value of internal_config, temporarily
> set MII while copying out the code, and then restore internal_config.

I looked into that solution as one of several possibilities.  The problem was
that in order to do it that way in etherboot, one would have to modify the 
non-card-specific part of etherboot (which I did not write) so that somewhere 
in the first *tiny* part of the etherboot code, the xcvr is switched.  It was 
possible, but had enough caveats due to etherboot's structure that at the 
time I considered it far far more trouble than it was worth.  It's not as 
simple as just a couple of lines of C code a la vortex-diag.c.  The code is 
open source, though, so if you want to implement it, go ahead :)

The alternative was simply to not support the 3c905b at all (in which case we 
would have needed to return a fair number of ethernet cards...).  I certainly
hope that I'm not a "fringe" programmer.  I quite frankly gave a honest
investigation to doing things the way that Donald has mentioned in his
analysis of the issue.

> >     does this automatically.  This way, the 16k prom image can be loaded
> >     into memory, and then the 3c905b driver can set the temporary
> >     configuration of the card to an appropriate value, either
> >     configurable by the user or chosen by the driver.
> 
> The etherboot code sets the internal_config register, but it should be
> using the saved value, not a new value.

Again, read the previous paragraphs for why there isn't a saved value.

The (original) version I wrote was specifically only for the 3c905B with 
the xcvr address mux problem.  That original version had the "fix" in
place by default (and, since it was just for that one card, there were
no #defines to disable/enable it).  My understanding, though, is that 
later versions of the driver (I haven't maintained the driver in over 
two and a half years) had the fix disabled by default.

Hope this helps explain things a bit...

Greg.

------------------------------------------------------------------------
Greg.Beeley@LightSys.org        LightSys - Redeeming Technology...
http://www.LightSys.org                    For God's Kingdom.
------------------------------------------------------------------------