Media Independent Interface

From Wikipedia, the free encyclopedia

MII connector on a Sun Ultra 1 Creator workstation
MII connector on a Sun Ultra 1 Creator workstation

The Media Independent Interface (MII) is a standard interface used to connect a Fast Ethernet MAC-block to a PHY. The MII may connect to an external transceiver device via a pluggable connector (see photo) or simply connect two chips on the same printed circuit board. Being media independent means that any of several different types of PHY devices can be used without redesigning or replacing the MAC hardware. The equivalents of MII for other speeds are AUI (for 10 megabit Ethernet), GMII (for gigabit Ethernet), and XAUI (for 10 gigabit Ethernet).

[edit] MII bus

The MII bus (standardized by IEEE 802.3u) is a generic bus that connects different types of PHYs to the same network controller (MAC). The network controller may interact with any PHY using the same hardware interface, independent of the media the PHYs are connected to. The MII transfers data using 4-bit words (nibble) in each direction, clocked at 25 MHz to achieve 100 Mbit/s speed. On a PC the CNR connector Type B carries MII bus interface signals.

Serial Management Interface (SMI) is used to transfer management information between MAC and PHY.

The standard MII features a small set of registers:

  • Basic Mode Configuration (#0)
  • Status Word (#1)
  • PHY Identification (#2, #3)
  • Ability Advertisement (#4)
  • Link Partner Ability (#5)
  • Auto Negotiation Expansion (#6)

The MII Status Word is the most useful datum, since it may be used to detect whether an Ethernet NIC is connected to a network. It contains a bitmask with the following meaning:

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
0x0002 Jabber detected
0x0001 Extended MII register exist.

A more detailed reference on registers exported by MII-compatible transceivers could be found looking at the Linux MII interface definition (include/linux/mii.h) [1]

[edit] See also