SNLA473 November   2024 DP83867CS , DP83867E , DP83867IS , DP83869HM , DP83TC811S-Q1 , DP83TC812S-Q1 , DP83TC813S-Q1 , DP83TC814S-Q1 , DP83TC817S-Q1 , DP83TC818S-Q1 , DP83TG720S-Q1 , DP83TG721S-Q1

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Troubleshooting the MAC Interface - SGMII
    1. 1.1 Verify Bootstrap Configurations
      1. 1.1.1 SGMII Bootstrap Configuration for DP83TG720S-Q1
    2. 1.2 Read and Check Register Values
    3. 1.3 Auto-Negotiation
    4. 1.4 Throughput and Loopback Testing
      1. 1.4.1 Bidirectional Throughput Testing
      2. 1.4.2 RX and TX Throughput Testing
      3. 1.4.3 RX and TX Throughput Testing with Fixed Number of Packets
      4. 1.4.4 Loopback Testing
        1. 1.4.4.1 MII Loopback
        2. 1.4.4.2 Reverse Loopback
    5. 1.5 Check the Clock Signal
    6. 1.6 Measure the SGMII Eye
      1. 1.6.1 SGMII Eye Mask Requirements
    7. 1.7 SGMII Layout
  5. 2Summary
  6. 3References

MII Loopback

 MII Loopback Diagram Figure 1-10 MII Loopback Diagram
  1. Power on the device under test
  2. Enable MII loopback in register 0x0
  3. Send a fixed number of packets from the MAC. If ping is used to send packets, do not use the same IP address as the source because the packets are never transferred to the PHY. Use a random IP address.
  4. If all the packets sent are also received, then the SGMII connection is working. Tcpdump or Wireshark can be used to check the number of packets received.

In Figure 1-11, 10 packets are output from the MAC after MII loopback in enabled. Ping shows that 10 packets are sent and 0 packets are received. This is expected because the destination address is nonexistent. However, the TCPdump log shows all of the outbound in inbound packets. There are 20 messages total. 10 messages are outgoing and then sent back the the host through loopback. Therefore, the MII block within the PHY is working.

 Testing MII Loopback in Linux Figure 1-11 Testing MII Loopback in Linux

To shows only the outgoing or incoming packets, use the following commands:

tcpdump dst hst <host IP> & #Packets coming to the host
tcpdump src hst <host IP> & #Packets sent out from the host
Note: MII Loopback does note increment the packet counters in register 0x639-0x63E in TI SPE Ethernet PHYs. Use digital loopback instead as a loopback option to increment these counters.