Arria 10 HPS EMAC with KSZ9131 PHY
We've developed a custom Arria 10 SX board that pairs a KSZ9131 Ethernet PHY with the HPS EMAC, and using Linux 5.4 we see inconsistent Ethernet behavior depending on whether the link has gone down:
- The first time a link is established (whether an Ethernet cable was plugged in during boot or afterward), we're able to ping both directions between a PC and the Arria 10, with no dropped packets.
- Subsequently, if the link goes down and then comes back up (either because the cable was unplugged or by using ifdown/ifup), we can't ping to or from the Arria 10.
If we disable EEE (Energy Efficient Ethernet), the problem seems to disappear: we can take the link down and up without subsequent traffic being lost.
As far as we can tell, the PHY, EMAC, and relevant Linux drivers all support EEE, so we're trying to understand what might be going wrong. Any help would be much appreciated.
Additional details
We've previously done successful Arria 10 designs with the KSZ9031 PHY, which is very similar and shares almost all of the same Linux driver code and device tree bindings; we've never seen this problem with those designs.
We've run tshark on the Arria 10 and Wireshark on a PC while in the "bad" state trying to ping from the Arria 10:
- The PC receives some of the packets sent by the Arria 10, but not many; the PC responds to the packets it does receive.
- The Arria 10 receives none of the packets sent by the PC.
Testing setup:
- Direct Ethernet connection between Arria 10 and PC
- 1000 Mbps full duplex link
- Static IP addresses for both Arria 10 and PC