Commit 14fc0aba authored by Andrew Lunn's avatar Andrew Lunn Committed by David S. Miller

net: phy: marvell: Only configure RGMII delays when using RGMII

The fix 5987feb3 ("net: phy: marvell: logical vs bitwise OR typo")
uncovered another bug in the Marvell PHY driver, which broke the
Marvell OpenRD platform. It relies on the bootloader configuring the
RGMII delays and does not specify a phy-mode in its device tree.  The
PHY driver should only configure RGMII delays if the phy mode
indicates it is using RGMII. Without anything in device tree, the
mv643xx Ethernet driver defaults to GMII.

Fixes: 5987feb3 ("net: phy: marvell: logical vs bitwise OR typo")
Signed-off-by: default avatarAndrew Lunn <andrew@lunn.ch>
Tested-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b34a264f
...@@ -681,9 +681,11 @@ static int m88e1116r_config_init(struct phy_device *phydev) ...@@ -681,9 +681,11 @@ static int m88e1116r_config_init(struct phy_device *phydev)
if (err < 0) if (err < 0)
return err; return err;
err = m88e1121_config_aneg_rgmii_delays(phydev); if (phy_interface_is_rgmii(phydev)) {
if (err < 0) err = m88e1121_config_aneg_rgmii_delays(phydev);
return err; if (err < 0)
return err;
}
err = genphy_soft_reset(phydev); err = genphy_soft_reset(phydev);
if (err < 0) if (err < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment