Skip to content

Commit 686cff3

Browse files
Aashish Vermadavem330
authored andcommitted
net: stmmac: Fix incorrect location to set real_num_rx|tx_queues
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: c02b7a9 net: stmmac: use netif_set_real_num_{rx,tx}_queues Signed-off-by: Aashish Verma <[email protected]> Signed-off-by: Ong Boon Leong <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 0366f7e commit 686cff3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2732,6 +2732,10 @@ static int stmmac_hw_setup(struct net_device *dev, bool init_ptp)
27322732
stmmac_enable_tbs(priv, priv->ioaddr, enable, chan);
27332733
}
27342734

2735+
/* Configure real RX and TX queues */
2736+
netif_set_real_num_rx_queues(dev, priv->plat->rx_queues_to_use);
2737+
netif_set_real_num_tx_queues(dev, priv->plat->tx_queues_to_use);
2738+
27352739
/* Start the ball rolling... */
27362740
stmmac_start_all_dma(priv);
27372741

@@ -4882,10 +4886,6 @@ int stmmac_dvr_probe(struct device *device,
48824886

48834887
stmmac_check_ether_addr(priv);
48844888

4885-
/* Configure real RX and TX queues */
4886-
netif_set_real_num_rx_queues(ndev, priv->plat->rx_queues_to_use);
4887-
netif_set_real_num_tx_queues(ndev, priv->plat->tx_queues_to_use);
4888-
48894889
ndev->netdev_ops = &stmmac_netdev_ops;
48904890

48914891
ndev->hw_features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM |

0 commit comments

Comments
 (0)