]> git.baikalelectronics.ru Git - kernel.git/commit
net: phylink: avoid mvneta warning when setting pause parameters
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thu, 28 Oct 2021 14:55:34 +0000 (15:55 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 29 Oct 2021 12:29:30 +0000 (13:29 +0100)
commit3a1a793af5e713fb4920cf48194d0c23568297a7
tree193d96fdf4cc20c07b2db5ff90be5db28bf490a9
parentd0b6e67fdbe9110f82944515560228ff2ce6a59f
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: 81485403f4ec ("phylink: add phylink infrastructure")
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phylink.c