Patch "net: stmmac: Fix max-speed being ignored on queue re-init" has been added to the 6.8-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: stmmac: Fix max-speed being ignored on queue re-init

to the 6.8-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-stmmac-fix-max-speed-being-ignored-on-queue-re-i.patch
and it can be found in the queue-6.8 subdirectory.

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



commit 2d9f7c1e0acc128fdd6b08ae054d7bf70102789c
Author: Serge Semin <fancer.lancer@xxxxxxxxx>
Date:   Fri Apr 12 21:03:15 2024 +0300

    net: stmmac: Fix max-speed being ignored on queue re-init
    
    [ Upstream commit 59c3d6ca6cbded6c6599e975b42a9d6a27fcbaf2 ]
    
    It's possible to have the maximum link speed being artificially limited on
    the platform-specific basis. It's done either by setting up the
    plat_stmmacenet_data::max_speed field or by specifying the "max-speed"
    DT-property. In such cases it's required that any specific
    MAC-capabilities re-initializations would take the limit into account. In
    particular the link speed capabilities may change during the number of
    active Tx/Rx queues re-initialization. But the currently implemented
    procedure doesn't take the speed limit into account.
    
    Fix that by calling phylink_limit_mac_speed() in the
    stmmac_reinit_queues() method if the speed limitation was required in the
    same way as it's done in the stmmac_phy_setup() function.
    
    Fixes: 95201f36f395 ("net: stmmac: update MAC capabilities when tx queues are updated")
    Signed-off-by: Serge Semin <fancer.lancer@xxxxxxxxx>
    Reviewed-by: Romain Gantois <romain.gantois@xxxxxxxxxxx>
    Signed-off-by: Paolo Abeni <pabeni@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index cbb00ca23a7c3..2a48277ed614f 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -7272,6 +7272,7 @@ int stmmac_reinit_queues(struct net_device *dev, u32 rx_cnt, u32 tx_cnt)
 {
 	struct stmmac_priv *priv = netdev_priv(dev);
 	int ret = 0, i;
+	int max_speed;
 
 	if (netif_running(dev))
 		stmmac_release(dev);
@@ -7287,6 +7288,10 @@ int stmmac_reinit_queues(struct net_device *dev, u32 rx_cnt, u32 tx_cnt)
 
 	stmmac_mac_phylink_get_caps(priv);
 
+	max_speed = priv->plat->max_speed;
+	if (max_speed)
+		phylink_limit_mac_speed(&priv->phylink_config, max_speed);
+
 	stmmac_napi_add(dev);
 
 	if (netif_running(dev))




[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