提交 4e26c5c3 编写于 作者: R Raju Lakkaraju 提交者: David S. Miller

net: phy: Fix the mdix_ctrl changes

PHY drivers to have an eth_tp_mdix_ctrl to indicate what is the configured
MDI setting, and read eth_tp_mdi to indicate what is the current status,

Add new parameter mdix_ctrl in phy_device structure and fix driver.
Signed-off-by: NRaju Lakkaraju <Raju.Lakkaraju@microsemi.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 233275ec
...@@ -268,7 +268,7 @@ static int marvell_config_aneg(struct phy_device *phydev) ...@@ -268,7 +268,7 @@ static int marvell_config_aneg(struct phy_device *phydev)
if (err < 0) if (err < 0)
return err; return err;
err = marvell_set_polarity(phydev, phydev->mdix); err = marvell_set_polarity(phydev, phydev->mdix_ctrl);
if (err < 0) if (err < 0)
return err; return err;
...@@ -311,7 +311,7 @@ static int m88e1111_config_aneg(struct phy_device *phydev) ...@@ -311,7 +311,7 @@ static int m88e1111_config_aneg(struct phy_device *phydev)
*/ */
err = phy_write(phydev, MII_BMCR, BMCR_RESET); err = phy_write(phydev, MII_BMCR, BMCR_RESET);
err = marvell_set_polarity(phydev, phydev->mdix); err = marvell_set_polarity(phydev, phydev->mdix_ctrl);
if (err < 0) if (err < 0)
return err; return err;
......
...@@ -111,7 +111,7 @@ static void lan88xx_set_mdix(struct phy_device *phydev) ...@@ -111,7 +111,7 @@ static void lan88xx_set_mdix(struct phy_device *phydev)
int buf; int buf;
int val; int val;
switch (phydev->mdix) { switch (phydev->mdix_ctrl) {
case ETH_TP_MDI: case ETH_TP_MDI:
val = LAN88XX_EXT_MODE_CTRL_MDI_; val = LAN88XX_EXT_MODE_CTRL_MDI_;
break; break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册