diff options
author | Russell King <rmk+kernel@armlinux.org.uk> | 2019-12-17 14:39:06 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-12-19 21:52:34 +0100 |
commit | af006240c6cfea9f52fc197ac26e6cade4a8623d (patch) | |
tree | e2dda82d22d3daa4bf3124afe956585a4d2d1c4c /drivers/net/phy/marvell.c | |
parent | net: phy: remove redundant .aneg_done initialisers (diff) | |
download | linux-af006240c6cfea9f52fc197ac26e6cade4a8623d.tar.xz linux-af006240c6cfea9f52fc197ac26e6cade4a8623d.zip |
net: phy: use phy_resolve_aneg_pause()
Several drivers code their own version of this, working from the LPA
register, after setting the ethtool link partner advertisement bitmask.
Use the generic function instead.
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/marvell.c')
-rw-r--r-- | drivers/net/phy/marvell.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c index b1fbd1937328..d807c3e5cc56 100644 --- a/drivers/net/phy/marvell.c +++ b/drivers/net/phy/marvell.c @@ -1384,10 +1384,7 @@ static int marvell_read_status_page_an(struct phy_device *phydev, mii_lpa_to_linkmode_lpa_t(phydev->lp_advertising, lpa); mii_stat1000_mod_linkmode_lpa_t(phydev->lp_advertising, lpagb); - if (phydev->duplex == DUPLEX_FULL) { - phydev->pause = lpa & LPA_PAUSE_CAP ? 1 : 0; - phydev->asym_pause = lpa & LPA_PAUSE_ASYM ? 1 : 0; - } + phy_resolve_aneg_pause(phydev); } else { /* The fiber link is only 1000M capable */ fiber_lpa_mod_linkmode_lpa_t(phydev->lp_advertising, lpa); |