Patch "net: phylink: avoid mvneta warning when setting pause parameters" has been added to the 4.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net: phylink: avoid mvneta warning when setting pause parameters

to the 4.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-phylink-avoid-mvneta-warning-when-setting-pause-.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 0111462b099bb97ea8e5dcb1370fe75053a54923
Author: Russell King (Oracle) <rmk+kernel@xxxxxxxxxxxxxxx>
Date:   Thu Oct 28 15:55:34 2021 +0100

    net: phylink: avoid mvneta warning when setting pause parameters
    
    [ Upstream commit fd8d9731bcdfb22d28e45bce789bcb211c868c78 ]
    
    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: 9525ae83959b ("phylink: add phylink infrastructure")
    Signed-off-by: Russell King (Oracle) <rmk+kernel@xxxxxxxxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index 17acecfda5420..89d8efe8753e5 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -1022,7 +1022,7 @@ int phylink_ethtool_set_pauseparam(struct phylink *pl,
 		return -EOPNOTSUPP;
 
 	if (!phylink_test(pl->supported, Asym_Pause) &&
-	    !pause->autoneg && pause->rx_pause != pause->tx_pause)
+	    pause->rx_pause != pause->tx_pause)
 		return -EINVAL;
 
 	config->pause &= ~(MLO_PAUSE_AN | MLO_PAUSE_TXRX_MASK);




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux