lkml.org 
[lkml]   [2020]   [Jan]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH net v2 1/4] net: stmmac: Fix incorrect location to set real_num_rx|tx_queues
Date
From: Ong Boon Leong <boon.leong.ong@intel.com>
Date: Jan/15/2020, 07:10:00 (UTC+00:00)

> From: Aashish Verma <aashishx.verma@intel.com>
>
> 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@intel.com>
> Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com>
> ---
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index 80d59b775907..0780e00580a2 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -2624,6 +2624,10 @@ static int stmmac_hw_setup(struct net_device *dev, bool init_ptp)
> if (priv->dma_cap.vlins)
> stmmac_enable_vlan(priv, priv->hw, STMMAC_VLAN_INSERT);
>
> + /* 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);
> +

Nack. You need to hold rtnl lock when calling this and at suspend / resume
you don't.

---
Thanks,
Jose Miguel Abreu

\
 
 \ /
  Last update: 2020-01-15 17:17    [W:0.050 / U:5.864 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site