Re: [PATCH net-next 2/2] net: phy: improve phy_set_sym_pause and phy_set_asym_pause

2019-05-01 Thread Heiner Kallweit
On 30.04.2019 07:06, Heiner Kallweit wrote: > On 29.04.2019 23:52, Andrew Lunn wrote: >>> @@ -2078,6 +2089,11 @@ EXPORT_SYMBOL(phy_set_sym_pause); >>> void phy_set_asym_pause(struct phy_device *phydev, bool rx, bool tx) >>> { >>> __ETHTOOL_DECLARE_LINK_MODE_MASK(oldadv); >>> + bool asym_pau

Re: [PATCH net-next 2/2] net: phy: improve phy_set_sym_pause and phy_set_asym_pause

2019-04-29 Thread Heiner Kallweit
On 29.04.2019 23:52, Andrew Lunn wrote: >> @@ -2078,6 +2089,11 @@ EXPORT_SYMBOL(phy_set_sym_pause); >> void phy_set_asym_pause(struct phy_device *phydev, bool rx, bool tx) >> { >> __ETHTOOL_DECLARE_LINK_MODE_MASK(oldadv); >> +bool asym_pause_supported; >> + >> +asym_pause_supported =

Re: [PATCH net-next 2/2] net: phy: improve phy_set_sym_pause and phy_set_asym_pause

2019-04-29 Thread Andrew Lunn
> @@ -2078,6 +2089,11 @@ EXPORT_SYMBOL(phy_set_sym_pause); > void phy_set_asym_pause(struct phy_device *phydev, bool rx, bool tx) > { > __ETHTOOL_DECLARE_LINK_MODE_MASK(oldadv); > + bool asym_pause_supported; > + > + asym_pause_supported = > + linkmode_test_bit(ETHTOOL_L

[PATCH net-next 2/2] net: phy: improve phy_set_sym_pause and phy_set_asym_pause

2019-04-29 Thread Heiner Kallweit
We should consider what is supported, and we shouldn't mess with phydev->supported. In addition make sure that phy_set_sym_pause() clears the asym pause bit in phydev->advertising. In phy_set_sym_pause() use the same mechanism as in phy_set_asym_pause() to restart autoneg if needed. Signed-off-by: