net: phy: DP83822: not able to get a link
From: Johannes Pointner <hidden>
Date: 2021-06-07 12:14:05
Hello,
I just updated a i.MX6 device which uses the DP83822 from 5.4 to 5.10
and can't get a link anymore.
ip addr shows:
1: lo: <LOOPBACK> mtu 65536 qdisc noop qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:60:65:54:32:10 brd ff:ff:ff:ff:ff:ff
It seems to me that the commit 5dc39fd5ef35 ("net: phy: DP83822: Add
ability to advertise Fiber connection") causes this.
If I revert the following part of this commit, it is working again:@@ -314,13 +451,85 @@ static int dp83822_phy_reset(struct phy_device *phydev) { int err; - err = phy_write(phydev, MII_DP83822_RESET_CTRL, DP83822_HW_RESET); + err = phy_write(phydev, MII_DP83822_RESET_CTRL, DP83822_SW_RESET);
Was this change intentional? Because I took a look at the driver DP83867 which has similar bits to reset the phy and there this wasn't changed. Maybe the naming of the defines in case of the DP83822 is a bit misleading? DP83882: #define DP83822_HW_RESET BIT(15) #define DP83822_SW_RESET BIT(14) datasheet description: 15 Software Reset 14 Digital Restart DP83867: #define DP83867_SW_RESET BIT(15) #define DP83867_SW_RESTART BIT(14) datasheet description: 15 SW_RESET 14 SW_RESTART Thanks, Hannes