]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/phy/marvell.c
r8169: support additional 8168cp chipset
[linux-2.6-omap-h63xx.git] / drivers / net / phy / marvell.c
index 33539917e9b8008d6890e872e9d4ab7550b06d6d..4aa54794704045dfdec94bbaafea2d88970e163a 100644 (file)
@@ -158,11 +158,10 @@ static int m88e1111_config_init(struct phy_device *phydev)
 {
        int err;
        int temp;
-       int mode;
 
        /* Enable Fiber/Copper auto selection */
        temp = phy_read(phydev, MII_M1111_PHY_EXT_SR);
-       temp |= MII_M1111_HWCFG_FIBER_COPPER_AUTO;
+       temp &= ~MII_M1111_HWCFG_FIBER_COPPER_AUTO;
        phy_write(phydev, MII_M1111_PHY_EXT_SR, temp);
 
        temp = phy_read(phydev, MII_BMCR);
@@ -198,9 +197,7 @@ static int m88e1111_config_init(struct phy_device *phydev)
 
                temp &= ~(MII_M1111_HWCFG_MODE_MASK);
 
-               mode = phy_read(phydev, MII_M1111_PHY_EXT_CR);
-
-               if (mode & MII_M1111_HWCFG_FIBER_COPPER_RES)
+               if (temp & MII_M1111_HWCFG_FIBER_COPPER_RES)
                        temp |= MII_M1111_HWCFG_MODE_FIBER_RGMII;
                else
                        temp |= MII_M1111_HWCFG_MODE_COPPER_RGMII;
@@ -211,8 +208,6 @@ static int m88e1111_config_init(struct phy_device *phydev)
        }
 
        if (phydev->interface == PHY_INTERFACE_MODE_SGMII) {
-               int temp;
-
                temp = phy_read(phydev, MII_M1111_PHY_EXT_SR);
                if (temp < 0)
                        return temp;