AnsweredAssumed Answered

P2040: strange behavior of network interface under linux

Question asked by Andy Medynets on Apr 10, 2018
Latest reply on Apr 14, 2018 by ufedor

Hi,

 

our custom P2040 board  has five 1G Marvell PHYs (1x88E1510 + 1x88E1340 Quad phy ) connected to the same MDIO bus at addresses 0, 4, 5, 6, 7 , respectively.

U-boot 2016.01 and linux kernel 4.1 based on QorIQ SDK 2.0 are used.

 

All above network interfaces work as expected in u-boot.  Under linux, we observe a weird behavior of one of the network interfaces connected to a quad PHY.

Under llinux, the eth2 (PHY address 5) always shows the link connected and "doesn't auto-negotiate", i.e. the only

way to make it work under linux is to manually turn its auto-negotiation off + set proper speed and duplex mode using

the standard ethtool command. At the same time, the "peer" connected to this interface auto-negotiates correctly regardless of that.

 

The above suggests that most(or all) related data structures are OK, and this is not a device tree problem.

 

 

The only discrepancy observed so far is that the standard PHY identification registers #2 and #3 are always read as zeros for this interface/phyad:5. All other registers read (and written ?) OK.

 

      root:/mnt/ctrl# ./phytool read eth1/4/2
      0x0141
      root:/mnt/ctrl# ./phytool read eth1/4/3
      0x0dc0


      root:/mnt/ctrl# ./phytool read eth2/5/2
      0000
      root:/mnt/ctrl# ./phytool read eth2/5/3
      0000

 

Does this situation look familiar to anyone? What debugging technique should be used in our case?

 

Thanks. 

Outcomes