[tulip-bug] media type selection errors with SMC8036TX cardbus adapter (ADMTek Comet chip)

Donald Becker becker@scyld.com
Fri Nov 15 11:07:02 2002


Excutive summary: 
If you limit your advertised capabilities to full duplex, the
transceiver will not pass packets to a link partner without
autonegotation.  See
  http://scyld.com/expert/NWay.html


On Fri, 15 Nov 2002, Juhan Ernits wrote:

> i have an SMC EZ Connect Cardbus adapter, SMC8036TX. It is a nice card and
> works fine for me when i am attached to a 100 Mbit/s FD swich port at
> work. But the card refuses to work with 10baseT-HD media.
...
> ********* Link partner is a Cisco Catalyst 1900 switch (2x100, 24x10

Ohhh, as soon as I see "Cisco", I _expect_ duplex problems.
Do you have non-Cisco equipment that you can test against?

> (It seems that mii-diag can set 10baseT-FD and 100baseT-HD, but not the
> other media types)

How are you calling the 'mii-diag' program?  I suspect that you actually
specifying full duplex.

> 2) The card/driver is not able to switch itself into 10baseT-HD mode (even
> in autosense mode).

I the debug log doesn't show that.

> ********* The card works with 10baseT-FD, (only when forced into this
> mode, but that's fine).
> 
> Tulip-diag with 10baseT-FD media attached (working fine):
...
>  MII PHY #1 transceiver registers:
>    0100 784d 001d 2411 05e1 0021 0004 2001
...
>  Basic mode control register 0x0100: Auto-negotiation disabled!
>    Speed fixed at 10 mbps, full-duplex.

OK, so the speed and duplex were forced, and it works fine.  Note that
configuring the switch to forced full duplex is a not a standard
conforming mode!  Even Cisco now admits that their earlier
recommendation to force duplex was in error and a deliberate attempt to
put more work on Donald Becker.  (Errrm, well, that latter part is
implicit in the document.)

    http://www.cisco.com/warp/public/473/46.html

> ********** Tulip-diag forced to HALF DUPLEX after being in FD mode but 
> ********** still attached to FD media (should not work fine, but does
> so) under load:
> 
> # tulip-diag -mm
...
>  MII PHY #1 transceiver registers:
>    0000 784d 001d 2411 05e1 0021 0004 2001
>  Basic mode control register 0x0000: Auto-negotiation disabled!
>    Speed fixed at 10 mbps, half-duplex.

Try passing "-R" or "--reset" at this point.

> ********* Tulip-diag with 10baseT-HD media attached in autosense mode (not
> working fine):

Does it pass packets?  Are there performance problems?

>  MII PHY #1 transceiver registers:
>    1100 786d 001d 2411 05e1 0021 0006 2001
>  Basic mode control register 0x1100: Auto-negotiation enabled.
>  Basic mode status register 0x786d ... 786d.
>  Link partner capability is 0021: 10baseT.
>    Negotiation did not complete.

You should be able to communicate.

> *************** Relevant part from kern.log (card init when 10baseT-HD
> media attached):
...
> Nov 15 15:32:55 jubin kernel: eth0: Setting half-duplex based on MII #1
> link partner capability of 
> 0021.
> Nov 15 15:32:55 jubin kernel: eth0: The transmitter stopped.  CSR5 is
> fc67c016, CSR6 ff972113, new 
> CSR6 40000.

This happens because the driver must stop the transmitter to change the
duplex setting.

> ************** Kernel message when plugging the wire into 100Mbit FD port: 
> 
> Nov 15 15:03:55 jubin kernel: eth0: MII link partner 0021, negotiated
> 0021.
> Nov 15 15:04:55 jubin kernel: eth0: Comet link status 7869 partner
> capability 45e1.
> Nov 15 15:04:55 jubin kernel: eth0: MII link partner 45e1, negotiated
> 05e1.

Old 10baseT.
Link broken.
New link negotiation finished.

> ************* Kernel message when plugging the wire into 100Mbit HD port
> (after setting 
> ************* the card into 100baseTx-FD mode from 100baseTx-HD) (weirdly
> enough the
> ************* link works although mii-diag reports it to be in FD mode):
> 
> Nov 15 16:19:55 jubin kernel: eth0: Comet link status 784d partner
> capability 0081.

The transceiver is reporting 100baseTx link beat.  It isn't reporting
that 100baseTx has been negotiated -- the "negotiation complete" bit
isn't set.

>  Basic mode control register 0x2100: Auto-negotiation disabled!
>    Speed fixed at 100 mbps, full-duplex.

This is what the fixed setting is...

>  Link partner capability is 0081: 100baseTx.
>    Negotiation did not complete.

And the sensed speed.

>  #  mii-diag -A 100baseTx-FD 
> Using the default interface 'eth0'.
>  Setting the media capability advertisement register of PHY #1 to 0x0101.
...
> ************THE TRANCEIVER STAYS OFF AT THIS POINT. 

This is *exactly* what is supposed to happen!
If you cannot negotiate the specified link, communication does not occur.



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