Commit 1ac7b090 authored by Antoine Tenart's avatar Antoine Tenart Committed by David S. Miller

net: phy: mscc: add missing shift for media operation mode selection

This patch adds a missing shift for the media operation mode selection.
This does not fix the driver as the current operation mode (copper) has
a value of 0, but this wouldn't work for other modes.
Signed-off-by: default avatarAntoine Tenart <antoine.tenart@bootlin.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 92040c6d
...@@ -2813,8 +2813,8 @@ static int vsc8584_config_init(struct phy_device *phydev) ...@@ -2813,8 +2813,8 @@ static int vsc8584_config_init(struct phy_device *phydev)
val = phy_read(phydev, MSCC_PHY_EXT_PHY_CNTL_1); val = phy_read(phydev, MSCC_PHY_EXT_PHY_CNTL_1);
val &= ~(MEDIA_OP_MODE_MASK | VSC8584_MAC_IF_SELECTION_MASK); val &= ~(MEDIA_OP_MODE_MASK | VSC8584_MAC_IF_SELECTION_MASK);
val |= MEDIA_OP_MODE_COPPER | (VSC8584_MAC_IF_SELECTION_SGMII << val |= (MEDIA_OP_MODE_COPPER << MEDIA_OP_MODE_POS) |
VSC8584_MAC_IF_SELECTION_POS); (VSC8584_MAC_IF_SELECTION_SGMII << VSC8584_MAC_IF_SELECTION_POS);
ret = phy_write(phydev, MSCC_PHY_EXT_PHY_CNTL_1, val); ret = phy_write(phydev, MSCC_PHY_EXT_PHY_CNTL_1, val);
ret = genphy_soft_reset(phydev); ret = genphy_soft_reset(phydev);
...@@ -3276,7 +3276,7 @@ static int vsc8514_config_init(struct phy_device *phydev) ...@@ -3276,7 +3276,7 @@ static int vsc8514_config_init(struct phy_device *phydev)
return ret; return ret;
ret = phy_modify(phydev, MSCC_PHY_EXT_PHY_CNTL_1, MEDIA_OP_MODE_MASK, ret = phy_modify(phydev, MSCC_PHY_EXT_PHY_CNTL_1, MEDIA_OP_MODE_MASK,
MEDIA_OP_MODE_COPPER); MEDIA_OP_MODE_COPPER << MEDIA_OP_MODE_POS);
if (ret) if (ret)
return ret; return ret;
......
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