[vortex] media sepection

Andrew Morton andrewm@uow.edu.au
Sun, 25 Feb 2001 21:06:33 +1100


Bogdan Costescu wrote:
> 
> On Sat, 17 Feb 2001, Andrew Morton wrote:
> 
> > Question, please:  why do we need HAS_NWAY at all?
> >
> > The situation is that the internalconfig register has
> > autoselect=true and xcvrSelect=autoneg.
> 
> My understanding of the docs was that xcvrSelect=autoneg. means that we
> want to do autonegotiation (NWAY), regardless of autoselect; autoselect
> should be honoured when xcvrSelect!=autoneg; when autoselect is
> not set and xcvrSelect!=autoneg., force media type from xcvrSelect.

The Autoselect pseudocode indicates that autoselection can
use a mix of NWAY and non-NWAY.  With NWAY, you try another
interface if autonegotiation didn't complete.

We don't do that.  In fact, we don't do lots of things
which the doc says.  This isn't necessarily a bad thing - we
have a lot of operational experience with a lot of devices.

P60: "if autoneg is unable to establich a link then the driver
should try the other supported media types".


> > In this situation, the driver starts out with 100baseTX,
> > finds link beat and then screws up, because of a duplex
> > mismatch.  Putting HAS_NWAY into the device table
> > overrides this.
> 
> Wasn't the same situation with Tornado a year ago ?

Yes.

> > Rather than putting more HAS_NWAYs into the device table,
> > wouldn't it be better to make the autoselect sequence
> > start out with XCVR_NWAY, and then advance onto 100baseTX
> > in this situation?  I mean, the NIC has _told_ us that
> > it wants to do nway.
> 
> Then why do you want to use the autoselect sequence if you know that you
> will end up using XCVR_NWAY ?
> 
> If I understood correctly, the HAS_NWAY flag is used to signal that the
> card has NWAY capabilities; something has to be kept to signal this.

The `available media' bits will tell us if it's present.  The xcvrSelect
field of internalconfig tells us which one to start with.

> What to do in case the card supports NWAY and NWAY is wanted is a separate
> problem and I offered my oppinion earlier.
> 
> Anyway, I think making the autoselect sequence check for XCVR_NWAY would
> complicate things in both vortex_open() and vortex_timer().

In the 2.2 driver I have simply added HAS_NWAY to the PCI table.  There
are probably other entries which need this.  We'll see.

In the 2.4 driver I set vp->has_nway if internalconfig.xcvrSelect == XCVR_NWAY.
What this does is, basically, "if the defaut media from EEPROM is NWAY, assume
the NIC has NWAY". This is kinda kludgy, but it's better than having me sitting
here and basically guessing which NICS support NWAY.  And the `mediaoptions'
register doesn't tell us...