[vortex] 3c905CX-TXM

Donald Becker becker@scyld.com
Fri, 24 Nov 2000 14:21:41 -0500 (EST)


>> OK. Oh, and I forgot in my last message: thanks for coming up with a
>> fix.
>
> s/fix/successful experiment/

Yes, everyone please keep this in mind.
Register polling should never go on longer than about 50 microseconds.

The same limit should be applied to udelay().
Actually, udelay() should *never* been used.
It was broken in older kernels, and SpeedStep makes it unreliable with all
kernel versions.
Any no cheating with a loop around udelay()!

On Fri, 24 Nov 2000, Bogdan Costescu wrote:

> On Thu, 23 Nov 2000, Berkan Eskikaya wrote:
> 
> > > What if the driver gets the MII registers address wrong ?
> > > So, can you try running 'mii-diag -p 24 eth1' ?
> > We'll there is a definite change; mii-diag now reports link beat, but
> > I still cannot ping anywhere.
...
> Well, I somehow expected that. Page 147 of the documentation says:
> 
> "These auto-negotiation registers are accessed through the MII management
> interface using a PHY address (PHYAD) of 11000b" = 24.

The manual might report that the transceiver is at address 24, but we should
still scan.  The chip supports external MII transceivers (e.g. for the
100baseT4 product), and even 3Com doesn't keep track of what designs are
using the chip.

Here are a few MII rules.
  A plug-in transceiver, via a MII connector, should be at address 0.
  On-board transceivers are addressed  1..31
  The scan order is  1,2,..30,31, 0
  A transceiver jumpered for address 0 should power up disconnected from the
    data lines.  The driver might need to explicitly disable the on-board
    transceivers before activating the external one.

> In vortex_probe1(), if MII or NWAY is used, there is a search for the MII
> interfaces (there can be more than 1). Why this search suddenly doesn't
> work anymore, I don't know; Don, do you have any ideea ? Maybe the
> preamble confuses the interface ? Maybe some more checks are needed before
> saying "we have a valid MII interface at this PHYAD" ?

I don't know.  I suspect that it's just a bug in the address matching
design.  The 3Com people never see it because they have the luxury of
shipping a unique driver with each board type, and thus their driver doesn't
need to do a MII scan.  When a vendor puts a 3Com chip on their own board,
they get to tweak the driver source as well.

We have to write drivers to support any board that might come out in the
next two years.

> A workaround can be a test for IS_TORNADO and always add one interface
> with PHYAD = 24, but this still leaves the other 2 (or 4 according to
> vortex-diag output) MII interfaces detected. Now I don't understand
> something: if there are several MII interfaces and they provide similar
> capabilities, how is one of them selected as being the one in use ?

Nominally we should use the lowest numbered transceiver.

I really don't like always using #24, but it looks as if we might have to
that with some boards.  It shouldn't be based only on IS_TORNADO, since that
would break with 100baseT4 and 100baseFx boards.  There are also HomePNA and
radio transceivers with MII interfaces that might someday show up connected
to 3Com chips.

Donald Becker				becker@scyld.com
Scyld Computing Corporation		http://www.scyld.com
410 Severn Ave. Suite 210		Second Generation Beowulf Clusters
Annapolis MD 21403			410-990-9993