net: ethernet: Add helper for MACs which support pause

Rather than have the MAC drivers manipulate phydev members, add a
helper function for MACs supporting Pause, but not Asym Pause.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Andrew Lunn
2018-09-12 01:53:16 +02:00
committed by David S. Miller
parent af8d9bb2f2
commit c306ad3618
4 changed files with 17 additions and 4 deletions

View File

@@ -1950,14 +1950,12 @@ static int fec_enet_mii_probe(struct net_device *ndev)
phy_remove_link_mode(phy_dev,
ETHTOOL_LINK_MODE_1000baseT_Half_BIT);
#if !defined(CONFIG_M5272)
phy_dev->supported |= SUPPORTED_Pause;
phy_support_sym_pause(phy_dev);
#endif
}
else
phy_set_max_speed(phy_dev, 100);
phy_dev->advertising = phy_dev->supported;
fep->link = 0;
fep->full_duplex = 0;