This document explains the meaning of MII status words. These are commonly found in messages from Linux network drivers or in the output from the mii-diag program.
Most people with a specific problem should only need to read this section.
The MII status word is the most useful datum. A typical good status value 0x784d, while a transceiver without link beat typically reports 0x7849. If you don't have link beat, check your cable and hub.
If you have link beat, the next register to check is the Link Partner Ability. It reports what the machine at the other end of the wire can do.
MII transceivers have 32 management registers. The first 16 are reserved for standard-defined uses, and the others are available for chip-specific features. Only the first seven registers are currently defined.
Offset | Register Name | ||||||||
00 | Basic Mode Configuration | ||||||||
01 | Basic Mode Status | ||||||||
02 | PHY ID #1
03 | PHY ID #2
| 04 | AutoNegotation Advertisement
| 05 | Link Partner Ability
| 06 | AutoNegotation Expansion
| |
These registers are reported by the mii-diag program, and sometimes by device driver status messages.
The MII status word is the most useful MII register. A typical good status value 0x78*d, while a transceiver without link beat typically reports 0x78*9.
The bits of the MII status word are:
0x8000 | Capable of 100baseT4. |
0x7800 | Capable of 10/100 HD/FD (most common). |
0x0040 | Preamble suppression permitted. |
0x0020 | Autonegotiation complete. |
0x0010 | Remote fault. |
0x0008 | Capable of Autonegotiation. |
0x0004 | Link established ("sticky" on link failure) |
0x0002 | Jabber detected ("sticky" on transmit jabber) |
0x0001 | Extended MII register exist. |
Some bits are "sticky", which means they indicate that an event has occured. Registers with sticky bits must be read twice to get the current status.
On some transceivers bit 0x0020 means "autonegotiation failed, but autosensing worked".
The PHY ID registers uniquely identify the transceiver chip. The are a combination of the IEEE-assigned organization (company) number and a part number assigned by the designer.
The capabilities we advertise are set in the Autonegotiation Advertisement Register. This value is encoded on the link beat pulses and sent to the remote machine. The meaning of most bits are identical to the link partner ability register:
0x8000 | We can send additional information. |
0x4000 | Link partner got our advertised abilities. |
0x2000 | Advertise that we detected a link fault. |
0x0400 | Flow control supported (currently uncommon) |
0x0200 | 100baseT4 supported |
0x0100 | 100baseTx-FD supported |
0x0080 | 100baseTx supported |
0x0040 | 10baseT-FD supported |
0x0020 | 10baseT supported |
0x001F | Protocol selection bits, always 0x0001 for Ethernet. |
This register usually initialized at power-up to the proper value. A few board designs (e.g. the D-Link DFE500TX rev C3) are broken and do not set up the transceiver to reset with the correct value. For these boards the device driver must set the advertised value, which often causes problems.
If autonegotation completes the transceiver will report the link types the remote machine (the "link partner") will support.
A common link partner ability word is 0x01e1, which means the remote machine will support 10 and 100mbps at half and full duplex. Also common are 0x0080 and 0x0020, which mean the remote end is a 100baseTx or 10baseT repeater.
The bits of the AutoNegotation Link Partner Ability Register are
0x8000 | Link partner can send more info. |
0x4000 | Link partner got our advertised abilities. |
0x2000 | Fault detected by link partner (uncommon). |
0x0400 | Flow control supported (currently uncommon) |
0x0200 | 100baseT4 supported (uncommon) |
0x0100 | 100baseTx-FD (full duplex) supported |
0x0080 | 100baseTx supported |
0x0040 | 10baseT-FD supported |
0x0020 | 10baseT supported |
0x001F | Protocol selection bits, always 0x0001 for Ethernet. |
While it's not universal, many transceivers set the 0x0080 or 0x0020 bits to indicate the link speed when the link partner does not autonegotiate.
This register supports additional communication about link level information. It uses the same mechanism as the media type advertisement. While a protocol has not yet been defined, this functionality could be used to communicate willingness to accept jumbo frames (oversized packets), VLAN connections, channel bonding aka trunking, etc.