]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net: phy: marvell10g: Let genphy_c45_pma_read_abilities set Aneg bit
authorMaxime Chevallier <maxime.chevallier@bootlin.com>
Mon, 25 Feb 2019 16:14:06 +0000 (17:14 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 28 Feb 2019 05:41:40 +0000 (21:41 -0800)
The genphy_c45_pma_read_abilities helper now sets the Autoneg ability
in phydev->supported according to what the AN MMD reports.

We therefore don't need to manually do that in mv3310_get_features().

Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Suggested-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/marvell10g.c

index 580e91deadbc1b75eeb2e5a326fe65c004878153..ab71da55c1e0514fea8b37bcf303a8291dc0b25c 100644 (file)
@@ -268,16 +268,6 @@ static int mv3310_get_features(struct phy_device *phydev)
 {
        int ret, val;
 
-       if (phydev->c45_ids.devices_in_package & MDIO_DEVS_AN) {
-               val = phy_read_mmd(phydev, MDIO_MMD_AN, MDIO_STAT1);
-               if (val < 0)
-                       return val;
-
-               if (val & MDIO_AN_STAT1_ABLE)
-                       linkmode_set_bit(ETHTOOL_LINK_MODE_Autoneg_BIT,
-                                        phydev->supported);
-       }
-
        ret = genphy_c45_pma_read_abilities(phydev);
        if (ret)
                return ret;