Hi TI Team,
We use DP83867IRPAPT,
After setting the eth1 link down, the eth0 Link Status went down unexpectedly.
There is my test scenario:
$ ifconfig eth0 up; ifconfig eth1 up
TI DP83867 8000f00.mdio:00: attached PHY driver [TI DP83867] (mii_bus:phy_addr=8000f00.mdio:00, irq=POLL)
am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
TI DP83867 8000f00.mdio:01: attached PHY driver [TI DP83867] (mii_bus:phy_addr=8000f00.mdio:01, irq=POLL)
am65-cpsw-nuss 8000000.ethernet eth1: Link is Down
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
am65-cpsw-nuss 8000000.ethernet eth0: Link is Up - 1Gbps/Full - flow control off
$ ifconfig | grep eth.:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
eth1: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
$ ./mdio-tool r eth0 1 # BMSR register
0x796d
After eth0 works. I turned off eth1. eth0 also lost the link unexpectedly.
$ ifconfig eth1 down
am65-cpsw-nuss 8000000.ethernet eth0: Link is Down
$ ifconfig eth0
eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
$ ./mdio-tool r eth0 17 # STS2 register
0x1140
$ ./mdio-tool r eth0 0 # BMCR register
0x1140
$ ./mdio-tool r eth0 1 # BMSR register
0x1140
OS polls the link status of all LANs, in genphy_update_link( ) at drivers/net/phy/phy_device.c.
Getting the Phy Link Status via davinci_mdiobb_read( ) at drivers/net/ethernet/ti/davinci_mdio.c
I am sure the driver using the correct Phy ID to write the eth1 MDIO register.
davinci_mdiobb_write(struct mii_bus *bus, int phy, int reg, u16 val)
I don't know why it affects the other PHY (eth0).
Only writing to the eth1 (PHY1) MDIO register would cause the eth0 (PHY0) link to go down.
If I swap eth0 and eth1 roles and do the test, there is no problem.
Writing to the PHY0 MDIO register affects only himself.
Could someone provide some clues on this issue?
Thanks,
Sean