Skip to content

Commit fd8d973

Browse files
Russell King (Oracle)davem330
authored andcommitted
net: phylink: avoid mvneta warning when setting pause parameters
mvneta does not support asymetric pause modes, and it flags this by the lack of AsymPause in the supported field. When setting pause modes, we check that pause->rx_pause == pause->tx_pause, but only when pause autoneg is enabled. When pause autoneg is disabled, we still allow pause->rx_pause != pause->tx_pause, which is incorrect when the MAC does not support asymetric pause, and causes mvneta to issue a warning. Fix this by removing the test for pause->autoneg, so we always check that pause->rx_pause == pause->tx_pause for network devices that do not support AsymPause. Fixes: 9525ae8 ("phylink: add phylink infrastructure") Signed-off-by: Russell King (Oracle) <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 0f48fb6 commit fd8d973

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/phy/phylink.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1724,7 +1724,7 @@ int phylink_ethtool_set_pauseparam(struct phylink *pl,
17241724
return -EOPNOTSUPP;
17251725

17261726
if (!phylink_test(pl->supported, Asym_Pause) &&
1727-
!pause->autoneg && pause->rx_pause != pause->tx_pause)
1727+
pause->rx_pause != pause->tx_pause)
17281728
return -EINVAL;
17291729

17301730
pause_state = 0;

0 commit comments

Comments
 (0)