mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net 1/1] net: stmmac: Add queue reset into stmmac_xdp_open() function
@ 2023-04-04  4:48 Song Yoong Siang
  2023-04-04 16:11 ` Alexander H Duyck
  2023-04-06  2:10 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Song Yoong Siang @ 2023-04-04  4:48 UTC (permalink / raw)
  To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S . Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Maxime Coquelin, Alexei Starovoitov, Daniel Borkmann,
	Jesper Dangaard Brouer, John Fastabend, Christian Marangi
  Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel, bpf, stable,
	Song Yoong Siang

Queue reset was moved out from __init_dma_rx_desc_rings() and
__init_dma_tx_desc_rings() functions. Thus, the driver fails to transmit
and receive packet after XDP prog setup.

This commit adds the missing queue reset into stmmac_xdp_open() function.

Fixes: f9ec5723c3db ("net: ethernet: stmicro: stmmac: move queue reset to dedicated functions")
Cc: <stable@vger.kernel.org> # 6.0+
Signed-off-by: Song Yoong Siang <yoong.siang.song@intel.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 3e5bbfe3c41b..e4c27eb17bd2 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -6630,6 +6630,8 @@ int stmmac_xdp_open(struct net_device *dev)
 		goto init_error;
 	}
 
+	stmmac_reset_queues_param(priv);
+
 	/* DMA CSR Channel configuration */
 	for (chan = 0; chan < dma_csr_ch; chan++) {
 		stmmac_init_chan(priv, priv->ioaddr, priv->plat->dma_cfg, chan);
-- 
2.34.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net 1/1] net: stmmac: Add queue reset into stmmac_xdp_open() function
  2023-04-04  4:48 [PATCH net 1/1] net: stmmac: Add queue reset into stmmac_xdp_open() function Song Yoong Siang
@ 2023-04-04 16:11 ` Alexander H Duyck
  2023-04-06  2:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Alexander H Duyck @ 2023-04-04 16:11 UTC (permalink / raw)
  To: Song Yoong Siang, Giuseppe Cavallaro, Alexandre Torgue,
	Jose Abreu, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Maxime Coquelin, Alexei Starovoitov,
	Daniel Borkmann, Jesper Dangaard Brouer, John Fastabend,
	Christian Marangi
  Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel, bpf, stable

On Tue, 2023-04-04 at 12:48 +0800, Song Yoong Siang wrote:
> Queue reset was moved out from __init_dma_rx_desc_rings() and
> __init_dma_tx_desc_rings() functions. Thus, the driver fails to transmit
> and receive packet after XDP prog setup.
> 
> This commit adds the missing queue reset into stmmac_xdp_open() function.
> 
> Fixes: f9ec5723c3db ("net: ethernet: stmicro: stmmac: move queue reset to dedicated functions")
> Cc: <stable@vger.kernel.org> # 6.0+
> Signed-off-by: Song Yoong Siang <yoong.siang.song@intel.com>
> ---
>  drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index 3e5bbfe3c41b..e4c27eb17bd2 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -6630,6 +6630,8 @@ int stmmac_xdp_open(struct net_device *dev)
>  		goto init_error;
>  	}
>  
> +	stmmac_reset_queues_param(priv);
> +
>  	/* DMA CSR Channel configuration */
>  	for (chan = 0; chan < dma_csr_ch; chan++) {
>  		stmmac_init_chan(priv, priv->ioaddr, priv->plat->dma_cfg, chan);

Looks good to me.

Reviewed-by: Alexander Duyck <alexanderduyck@fb.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net 1/1] net: stmmac: Add queue reset into stmmac_xdp_open() function
  2023-04-04  4:48 [PATCH net 1/1] net: stmmac: Add queue reset into stmmac_xdp_open() function Song Yoong Siang
  2023-04-04 16:11 ` Alexander H Duyck
@ 2023-04-06  2:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-04-06  2:10 UTC (permalink / raw)
  To: Song Yoong Siang
  Cc: peppe.cavallaro, alexandre.torgue, joabreu, davem, edumazet,
	kuba, pabeni, mcoquelin.stm32, ast, daniel, hawk, john.fastabend,
	ansuelsmth, netdev, linux-stm32, linux-arm-kernel, linux-kernel,
	bpf, stable

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Tue,  4 Apr 2023 12:48:23 +0800 you wrote:
> Queue reset was moved out from __init_dma_rx_desc_rings() and
> __init_dma_tx_desc_rings() functions. Thus, the driver fails to transmit
> and receive packet after XDP prog setup.
> 
> This commit adds the missing queue reset into stmmac_xdp_open() function.
> 
> Fixes: f9ec5723c3db ("net: ethernet: stmicro: stmmac: move queue reset to dedicated functions")
> Cc: <stable@vger.kernel.org> # 6.0+
> Signed-off-by: Song Yoong Siang <yoong.siang.song@intel.com>
> 
> [...]

Here is the summary with links:
  - [net,1/1] net: stmmac: Add queue reset into stmmac_xdp_open() function
    https://git.kernel.org/netdev/net/c/24e3fce00c0b

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-04-06  2:10 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-04  4:48 [PATCH net 1/1] net: stmmac: Add queue reset into stmmac_xdp_open() function Song Yoong Siang
2023-04-04 16:11 ` Alexander H Duyck
2023-04-06  2:10 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®