]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: fix phy_validate_pause
authorHeiner Kallweit <hkallweit1@gmail.com>
Wed, 1 May 2019 19:54:28 +0000 (21:54 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 5 May 2019 08:04:10 +0000 (01:04 -0700)
commitb91d24b68b81be01c94a9bdcd73952864ef58501
tree7c346ca5f94d61b85fa58bf4399f639455252037
parent8759a229603f517480a8ee545c440ca66af11137
net: phy: fix phy_validate_pause

We have valid scenarios where ETHTOOL_LINK_MODE_Pause_BIT doesn't
need to be supported. Therefore extend the first check to check
for rx_pause being set.

See also phy_set_asym_pause:
rx=0 and tx=1: advertise asym pause only
rx=0 and tx=0: stop advertising both pause modes

The fixed commit isn't wrong, it's just the one that introduced the
linkmode bitmaps.

Fixes: 1adbfd4fe348 ("net: ethernet: Convert phydev advertize and supported from u32 to link mode")
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy_device.c