aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/uPD60620.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2019-12-17 13:39:06 +0000
committerDavid S. Miller <davem@davemloft.net>2019-12-19 12:52:34 -0800
commitaf006240c6cfea9f52fc197ac26e6cade4a8623d (patch)
treee2dda82d22d3daa4bf3124afe956585a4d2d1c4c /drivers/net/phy/uPD60620.c
parentnet: phy: remove redundant .aneg_done initialisers (diff)
downloadlinux-dev-af006240c6cfea9f52fc197ac26e6cade4a8623d.tar.xz
linux-dev-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/uPD60620.c')
-rw-r--r--drivers/net/phy/uPD60620.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/net/phy/uPD60620.c b/drivers/net/phy/uPD60620.c
index a32b3fd8a370..38834347a427 100644
--- a/drivers/net/phy/uPD60620.c
+++ b/drivers/net/phy/uPD60620.c
@@ -68,12 +68,7 @@ static int upd60620_read_status(struct phy_device *phydev)
mii_lpa_to_linkmode_lpa_t(phydev->lp_advertising,
phy_state);
- if (phydev->duplex == DUPLEX_FULL) {
- if (phy_state & LPA_PAUSE_CAP)
- phydev->pause = 1;
- if (phy_state & LPA_PAUSE_ASYM)
- phydev->asym_pause = 1;
- }
+ phy_resolve_aneg_pause(phydev);
}
}
return 0;