Media Independent Interface
From Wikipedia, the free encyclopedia
The Media Independent Interface (MII) is a standard interface used to connect a Fast Ethernet MAC-block to a PHY. Being Media Independent means that the same MAC-block can be connected to several different types of PHY-chips. The equivalents of MII for other speeds are AUI (for 10 megabit ethernet) and GMII (for gigabit ethernet).
[edit] MII bus
The MII bus (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 transfer data using 4-bit nibbles in each direction. The bus is clocked at 25 MHz to achieve 100 Mbits/s speed. 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]