Commit 1004ee61 authored by Raju Lakkaraju's avatar Raju Lakkaraju Committed by David S. Miller

net: phy: update the mdix_ctrl with correct value.

Update the mdix and mdix_ctrl with corresponding ethtool configuration
parameters.
Signed-off-by: default avatarRaju Lakkaraju <Raju.Lakkaraju@microsemi.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f4ed2fe3
...@@ -389,7 +389,7 @@ int phy_ethtool_sset(struct phy_device *phydev, struct ethtool_cmd *cmd) ...@@ -389,7 +389,7 @@ int phy_ethtool_sset(struct phy_device *phydev, struct ethtool_cmd *cmd)
phydev->duplex = cmd->duplex; phydev->duplex = cmd->duplex;
phydev->mdix = cmd->eth_tp_mdix_ctrl; phydev->mdix_ctrl = cmd->eth_tp_mdix_ctrl;
/* Restart the PHY */ /* Restart the PHY */
phy_start_aneg(phydev); phy_start_aneg(phydev);
...@@ -443,7 +443,7 @@ int phy_ethtool_ksettings_set(struct phy_device *phydev, ...@@ -443,7 +443,7 @@ int phy_ethtool_ksettings_set(struct phy_device *phydev,
phydev->duplex = duplex; phydev->duplex = duplex;
phydev->mdix = cmd->base.eth_tp_mdix_ctrl; phydev->mdix_ctrl = cmd->base.eth_tp_mdix_ctrl;
/* Restart the PHY */ /* Restart the PHY */
phy_start_aneg(phydev); phy_start_aneg(phydev);
...@@ -469,7 +469,8 @@ int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd) ...@@ -469,7 +469,8 @@ int phy_ethtool_gset(struct phy_device *phydev, struct ethtool_cmd *cmd)
cmd->transceiver = phy_is_internal(phydev) ? cmd->transceiver = phy_is_internal(phydev) ?
XCVR_INTERNAL : XCVR_EXTERNAL; XCVR_INTERNAL : XCVR_EXTERNAL;
cmd->autoneg = phydev->autoneg; cmd->autoneg = phydev->autoneg;
cmd->eth_tp_mdix_ctrl = phydev->mdix; cmd->eth_tp_mdix_ctrl = phydev->mdix_ctrl;
cmd->eth_tp_mdix = phydev->mdix;
return 0; return 0;
} }
...@@ -496,7 +497,8 @@ int phy_ethtool_ksettings_get(struct phy_device *phydev, ...@@ -496,7 +497,8 @@ int phy_ethtool_ksettings_get(struct phy_device *phydev,
cmd->base.phy_address = phydev->mdio.addr; cmd->base.phy_address = phydev->mdio.addr;
cmd->base.autoneg = phydev->autoneg; cmd->base.autoneg = phydev->autoneg;
cmd->base.eth_tp_mdix_ctrl = phydev->mdix; cmd->base.eth_tp_mdix_ctrl = phydev->mdix_ctrl;
cmd->base.eth_tp_mdix = phydev->mdix;
return 0; return 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