[realtek] autosense to halfduplex

Donald Becker becker@scyld.com
Fri Jan 11 14:54:02 2002


On Fri, 11 Jan 2002, Nikolai Vladychevski wrote:

> when I buy a realtek card, it is alaways configured to autosense the media, 
> and when it autosenses a hub that can do full duplex it is set to it. I want 
> it to autosense but always to enter half duplex mode, is this possible? 

Terminology:
   autosense:
     Select 10baseT or 100baseTx based on the partner's link
     beat signal.  The link should always be set to half duplex.
   autonegotiation:
     The link partners negotiate the highest common capability.
     The communication takes place on the 10baseT link beat bits.
     This is the only standards-conforming way to use full duplex on
     twisted pair.
     If no common capability is negotiated, the link is not usable.
     If autonegotiation does not complete (e.g. an pre-autonegotiation
     link partner), the transceiver falls back to autosense.

Autonegotiation is described at
  http://scyld.com/expert/NWay.html

The answer you are looking for is to advertise only half duplex
capabilities.  You can do this with
   mii-diag eth0 -A 0x00A0

This advertises 10baseT-HD and 100baseTx-HD only.

I'll explain the (admittedly obscure) constant
   0x0100  100baseTx-FD
   0x0080  100baseTx-HD
   0x0040  10baseT-FD
   0x0020  10baseT-HD

   0x0001  Ethernet (always set in the report)

Normally you could use a text name such as
   mii-diag -A 100baseTx-FD
but I didn't put in text names for all of the possible combinations.  

Hmmm, perhaps I could change the option parsing to support a
comma-separated list
   mii-diag -A 10baseT-HD,100baseTx-HD

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