diff options
| author | Pranav Tilak <[email protected]> | 2026-03-25 16:36:34 +0100 |
|---|---|---|
| committer | Jerome Forissier <[email protected]> | 2026-03-31 16:54:49 +0200 |
| commit | 8f6077a8b8edbfe3af1be8a7024392e2056ddbfe (patch) | |
| tree | db8af620b4d34c3018e320cdd495520b174f15f8 | |
| parent | 44c7f95987e36de3e034051ed3bbf07c91a8fc16 (diff) | |
net: phy: dp83867: reset PHY on init to ensure clean state
After a warm reboot, the PHY is left in power-down state
(BMCR_PDOWN set) causing auto-negotiation to timeout when
running the dhcp command.
Fix this by calling phy_reset() in dp83867_config() which
brings the PHY to a known clean state. The existing
DP83867_SW_RESTART is removed as it is redundant after phy_reset().
Fixes: 721aed79126b ("net: phy: Add support for Texas Instruments DP83867")
Signed-off-by: Pranav Tilak <[email protected]>
Signed-off-by: Michal Simek <[email protected]>
| -rw-r--r-- | drivers/net/phy/dp83867.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/phy/dp83867.c b/drivers/net/phy/dp83867.c index 772cde1c520..7ce03b59b6a 100644 --- a/drivers/net/phy/dp83867.c +++ b/drivers/net/phy/dp83867.c @@ -257,14 +257,14 @@ static int dp83867_config(struct phy_device *phydev) dp83867 = (struct dp83867_private *)phydev->priv; - ret = dp83867_of_init(phydev); + /* Reset PHY to clear any stale state after warm reboot */ + ret = phy_reset(phydev); if (ret) return ret; - /* Restart the PHY. */ - val = phy_read(phydev, MDIO_DEVAD_NONE, DP83867_CTRL); - phy_write(phydev, MDIO_DEVAD_NONE, DP83867_CTRL, - val | DP83867_SW_RESTART); + ret = dp83867_of_init(phydev); + if (ret) + return ret; /* Mode 1 or 2 workaround */ if (dp83867->rxctrl_strap_quirk) { |
