]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
net: phy: Fix the mdix_ctrl changes
authorRaju Lakkaraju <Raju.Lakkaraju@microsemi.com>
Tue, 29 Nov 2016 09:46:49 +0000 (15:16 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Dec 2016 16:26:48 +0000 (11:26 -0500)
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: Raju Lakkaraju <Raju.Lakkaraju@microsemi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/marvell.c
drivers/net/phy/microchip.c

index fa31f50824d3d3aac3df0e3afe9f0dce2a3f5a22..e269262471a44fdcbfc9ef3c5833bf3ceb78624e 100644 (file)
@@ -268,7 +268,7 @@ static int marvell_config_aneg(struct phy_device *phydev)
        if (err < 0)
                return err;
 
-       err = marvell_set_polarity(phydev, phydev->mdix);
+       err = marvell_set_polarity(phydev, phydev->mdix_ctrl);
        if (err < 0)
                return err;
 
@@ -311,7 +311,7 @@ static int m88e1111_config_aneg(struct phy_device *phydev)
         */
        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)
                return err;
 
index eb4db22002873685ad27e370f18766dc2624eeb1..12825a5feb3ffff14969756cbe241de06dba9e70 100644 (file)
@@ -111,7 +111,7 @@ static void lan88xx_set_mdix(struct phy_device *phydev)
        int buf;
        int val;
 
-       switch (phydev->mdix) {
+       switch (phydev->mdix_ctrl) {
        case ETH_TP_MDI:
                val = LAN88XX_EXT_MODE_CTRL_MDI_;
                break;