diff mbox series

[net,1/1] net: stmmac: Add queue reset into stmmac_xdp_open() function

Message ID 20230404044823.3226144-1-yoong.siang.song@intel.com (mailing list archive)
State Superseded
Commit 24e3fce00c0b557491ff596c0682a29dee6fe848
Delegated to: Netdev Maintainers
Headers show
Series [net,1/1] net: stmmac: Add queue reset into stmmac_xdp_open() function | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net
netdev/fixes_present success Fixes tag present in non-next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 18 this patch: 18
netdev/cc_maintainers success CCed 17 of 17 maintainers
netdev/build_clang success Errors and warnings before: 18 this patch: 18
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 18 this patch: 18
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Song, Yoong Siang April 4, 2023, 4:48 a.m. UTC
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(+)

Comments

Alexander Duyck April 4, 2023, 4:11 p.m. UTC | #1
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>
patchwork-bot+netdevbpf@kernel.org April 6, 2023, 2:10 a.m. UTC | #2
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!
diff mbox series

Patch

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);