[vortex] 3C905TX doesn't see 10Mbps hub till unplugged/replugged

Donald Becker becker@scyld.com
Thu, 22 Jun 2000 14:56:52 -0400 (EDT)


On Wed, 21 Jun 2000, Bogdan Costescu wrote:

> > Rmmod and then insmod doesn't make it come up; I still need to
> > unplug/replug to make it work.  Once I've done the unplug/replug, if I
> > rmmod, the light doesn't go out.  
> ...
> > angle when I thought I observed the card's light not on.  But the card
> > light is on whenever the card is plugged into the hub.  So someone in
> > the card knows that the hub is there...
...
> > Hub light comes on immediately once I plug the cable back in.

This likely means the problem is with your hub.
For some reason it has partitioned the port, and won't re-enable it until
the link beat cycles.

Doing 'mii-diag -R' will reset the transceiver, retriggering
autonegotiation.

> > Card LED is on shortly after I power up the machine.  Hub LED doesn't
> > come on till I unplug/replug, at which time it comes on immediately
> > and I immediately have access to the network.
> 
> I think that the card wants to autonegotiate, but as the hub cannot,
> finishes in a strange state, whithout knowing what's at the other end.
> 
> mii-diag does control the card by writting the Control register of MII
> (register 0) with the right information: 10baseT; however, the driver does
> not appear to do this by itself. I couldn't find any occurence of
> mdio_write to register 0 in the driver, so I suppose that the driver
> expects the MII interface to deal with this situation and only reads from
> MII to see what it "autonegotiated".

The transceiver has a power-up default that the driver should not change.
The default is usually "autonegotiate".

The driver should not usually reset the transceiver.  It certainly shouldn't
do a reset each time the interface is activated, since it may take 3 seconds
before the negotiation completes or fails.

> Donald, Andrew, others: how is this situation supposed to be handled: when
> you have a MII interface which does not "sense" what's at the other end?
> The current vortex_timer (I'm looking at Andrew's driver now) only changes
> the full duplex setting, but not the speed.

In default autonegotiation/autosense mode an MII transceiver should "just
work", without the driver have to set any configuration.

If the driver needs to limit the advertised media types, it should write
register 4, perhaps after reading register 1 to find the supported media
types.

If the driver needs to force the link speed (and turn off autonegotiation),
it should write register 0.  If the driver knows it has been forced to full
duplex, it should set the FDX bit in reg 0 since that may be controlling
an LED.

The driver should poll register 5 to find if a full duplex type has been
negotiated.

Donald Becker				becker@scyld.com
Scyld Computing Corporation		http://www.scyld.com
410 Severn Ave. Suite 210		Annapolis MD 21403