Patch "net: stmmac: Fix incorrect location to set real_num_rx|tx_queues" has been added to the 5.9-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 incorrect location to set real_num_rx|tx_queues

to the 5.9-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-incorrect-location-to-set-real_num_rx.patch
and it can be found in the queue-5.9 subdirectory.

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



commit 08668c3933aae6b33d467f382e6cd6413ced9121
Author: Aashish Verma <aashishx.verma@xxxxxxxxx>
Date:   Tue Sep 15 09:28:39 2020 +0800

    net: stmmac: Fix incorrect location to set real_num_rx|tx_queues
    
    [ Upstream commit 686cff3d7022ddf35d7e38bc80191eb92de5989a ]
    
    netif_set_real_num_tx_queues() & netif_set_real_num_rx_queues() should be
    used to inform network stack about the real Tx & Rx queue (active) number
    in both stmmac_open() and stmmac_resume(), therefore, we move the code
    from stmmac_dvr_probe() to stmmac_hw_setup().
    
    Fixes: c02b7a914551 net: stmmac: use netif_set_real_num_{rx,tx}_queues
    
    Signed-off-by: Aashish Verma <aashishx.verma@xxxxxxxxx>
    Signed-off-by: Ong Boon Leong <boon.leong.ong@xxxxxxxxx>
    Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
    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 b56b13d64ab48..1af25da4461da 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -2740,6 +2740,10 @@ static int stmmac_hw_setup(struct net_device *dev, bool init_ptp)
 		stmmac_enable_tbs(priv, priv->ioaddr, enable, chan);
 	}
 
+	/* Configure real RX and TX queues */
+	netif_set_real_num_rx_queues(dev, priv->plat->rx_queues_to_use);
+	netif_set_real_num_tx_queues(dev, priv->plat->tx_queues_to_use);
+
 	/* Start the ball rolling... */
 	stmmac_start_all_dma(priv);
 
@@ -4827,10 +4831,6 @@ int stmmac_dvr_probe(struct device *device,
 
 	stmmac_check_ether_addr(priv);
 
-	/* Configure real RX and TX queues */
-	netif_set_real_num_rx_queues(ndev, priv->plat->rx_queues_to_use);
-	netif_set_real_num_tx_queues(ndev, priv->plat->tx_queues_to_use);
-
 	ndev->netdev_ops = &stmmac_netdev_ops;
 
 	ndev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |



[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