diff options
author | David S. Miller <davem@davemloft.net> | 2019-02-27 21:41:41 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-02-27 21:41:41 -0800 |
commit | d8afbc9795a5d05f1ca47a3ee817d2c07f3d7efe (patch) | |
tree | 71f08fac64c20d505414c81ac432a18a82270a00 | |
parent | 87750d173c35ff8f1ddc909fdf58393e111e5356 (diff) | |
parent | 41e2a99fb9fa3e786c3f796d502c1babd116266f (diff) |
Merge branch 'net-phy-marvell10g-Clean-get_features-by-using-C45-helpers'
Maxime Chevallier says:
====================
net: phy: marvell10g: Clean .get_features by using C45 helpers
Recent work on C45 helpers by Heiner made the
genphy_c45_pma_read_abilities function generic enough to use as a
default .get_featutes implementation.
This series removes the remaining redundant code in
mv3310_get_features(), and makes the 2110 PHY use
genphy_c45_pma_read_abilities() directly, since it doesn't have the
issue with the wrong abilities being reported.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/phy/marvell10g.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/net/phy/marvell10g.c b/drivers/net/phy/marvell10g.c index 580e91deadbc..79106e70010f 100644 --- a/drivers/net/phy/marvell10g.c +++ b/drivers/net/phy/marvell10g.c @@ -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; @@ -482,7 +472,7 @@ static struct phy_driver mv3310_drivers[] = { .phy_id = MARVELL_PHY_ID_88E2110, .phy_id_mask = MARVELL_PHY_ID_MASK, .name = "mv88x2110", - .features = PHY_10GBIT_FEATURES, + .get_features = genphy_c45_pma_read_abilities, .probe = mv3310_probe, .soft_reset = gen10g_no_soft_reset, .config_init = mv3310_config_init, |