Skip to content

Commit da9ef50

Browse files
praneethbajjuridavem330
authored andcommitted
net: phy: dp83867: perform soft reset and retain established link
Current logic is performing hard reset and causing the programmed registers to be wiped out. as per datasheet: https://www.ti.com/lit/ds/symlink/dp83867cr.pdf 8.6.26 Control Register (CTRL) do SW_RESTART to perform a reset not including the registers, If performed when link is already present, it will drop the link and trigger re-auto negotiation. Signed-off-by: Praneeth Bajjuri <[email protected]> Signed-off-by: Geet Modi <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 232e368 commit da9ef50

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

drivers/net/phy/dp83867.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -826,16 +826,12 @@ static int dp83867_phy_reset(struct phy_device *phydev)
826826
{
827827
int err;
828828

829-
err = phy_write(phydev, DP83867_CTRL, DP83867_SW_RESET);
829+
err = phy_write(phydev, DP83867_CTRL, DP83867_SW_RESTART);
830830
if (err < 0)
831831
return err;
832832

833833
usleep_range(10, 20);
834834

835-
/* After reset FORCE_LINK_GOOD bit is set. Although the
836-
* default value should be unset. Disable FORCE_LINK_GOOD
837-
* for the phy to work properly.
838-
*/
839835
return phy_modify(phydev, MII_DP83867_PHYCTRL,
840836
DP83867_PHYCR_FORCE_LINK_GOOD, 0);
841837
}

0 commit comments

Comments
 (0)