
112
Functional Operation
Chapter 3
AMD-8111 HyperTransport I/O Hub Data Sheet
24674
Rev. 3.00
April 2003
AMD Preliminary Information
3.10.11.6
Host CPU Access to External PHY
The host CPU can indirectly read and write external PHY registers through the PHY Access Register.
To write to a PHY register the host CPU puts the register data into the PHY_DATA field of the PHY
Access Register, specifies the address of the external PHY device in the PHY_ADDR field and the
PHY register number in the PHY_REG_ADDR field, and sets the PHY_WR_CMD bit.
To read from a PHY register the host CPU specifies the address of the external PHY device in the
PHY_ADDR field and the PHY register number in the PHY_REG_ADDR field of the PHY Access
Register and sets the PHY_RD_CMD bit. The host CPU can then poll the register until the
PHY_CMD_ACTIVE bit is 0, or it can wait for the MII Management Command Complete Interrupt
(MCCINT in the Int0 Register). When the PHY_CMD_ACTIVE bit is 0, the PHY_DATA field
contains the data read from the specified external PHY register. If an error occurs in the read
operation, the PHY_RD_ERR bit in the PHY Access Register and the MII Management Read Error
Interrupt (MREINT) bit in the Interrupt0 Register are set, and if the corresponding enable bit is set
(MREINTEN in the Interrupt Enable Register), the host CPU is interrupted.
The host CPU must not attempt a second PHY register access until the first access is complete. When
the access is complete, the PHY_CMD_ACTIVE bit in the PHY Access Register is cleared and the
MII Management Command Complete Interrupt (MCCINT) bit in the Interrupt Register is set to 1,
and if the corresponding enable bit is set, the host CPU is interrupted. The host can either wait for this
interrupt, or it can use some other method to ensure that it waits for a long enough time. Note that
with a 2.5 MHz MDC clock it takes about 27
μ
s to transmit a management frame with a preamble.
However, if the Auto-Poll or Port Manager state machines are active, there may be a delay in sending
a host generated management frame while other frames are sent. Under these conditions, the host
should always check for command completion.
For an MII Management Frame transmitted as the result of a host CPU access to the PHY Access
Register, preamble suppression is controlled by the Preamble Suppression bit (PHY_PRE_SUP) in
the PHY Access Register. If this bit is set to 1 the preamble is suppressed. Otherwise, the frame
includes a preamble. The host CPU should only set the Preamble Suppression bit when accessing a
register in a PHY device that is known to be able to accept management frames without preambles.
For PHY devices that comply with Clause 22 of IEEE standard 802.3, bit 6 of PHY Register 1 is fixed
at 1 if the PHY accepts management frames with the preamble suppressed.
3.10.11.7
Auto-Poll State Machine
As defined in the IEEE 802.3 standard, the external PHY attached to the network controller’s MII has
no way of communicating important timely status information back to the network controller. Unless
it polls the external PHY’s status register, the network controller has no way of knowing that an
external PHY has undergone a change in status. Although it is possible for the host CPU to poll
registers in external PHY devices, the network controller simplifies this process by implementing an
automatic polling function that periodically polls up to 6 user-selected PHY registers and interrupts
the host CPU if the contents of any of these registers change.