Netdev List
 help / color / mirror / Atom feed
* [PATCH net] net: stmmac: reconfigure RX packet parser table in stmmac_hw_setup() after reset
@ 2026-08-31 17:06 Lorenzo Bianconi
  2026-09-03  9:50 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Lorenzo Bianconi @ 2026-08-31 17:06 UTC (permalink / raw)
  To: Maxime Chevallier, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Maxime Coquelin, Alexandre Torgue,
	Jose Abreu
  Cc: netdev, linux-stm32, linux-arm-kernel, Lorenzo Bianconi

The core software reset issued in stmmac_init_dma_engine() during
ndo_open() callback clears the MTL RX packet parser registers, but
stmmac_rxp_config() is only invoked from the cls_u32 add/delete paths.
After an ifdown/ifup cycle the hardware therefore runs with the default
all-pass table while priv->tc_entries still reports the filters as
installed. Re-apply the RX packet parser table from priv->tc_entries in
stmmac_hw_setup(), right after the software reset, so the filters are
restored when the interface is brought up again.

Fixes: 4dbbe8dde848 ("net: stmmac: Add support for U32 TC filter using Flexible RX Parser")
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index d576059c04df..24656b35350b 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -3676,6 +3676,14 @@ static int stmmac_hw_setup(struct net_device *dev)
 	/* Initialize MTL*/
 	stmmac_mtl_configuration(priv);
 
+	/* Apply the RX packet parser table */
+	if (priv->tc_entries) {
+		ret = stmmac_rxp_config(priv, priv->hw->pcsr, priv->tc_entries,
+					priv->tc_entries_max);
+		if (ret)
+			return ret;
+	}
+
 	/* Initialize Safety Features */
 	stmmac_safety_feat_configuration(priv);
 

---
base-commit: 1376afc7660bad2a1a5ee0876898312a486cf8bd
change-id: 20260831-stmmac_tc_cls32_reconfigure-17bc5001829d

Best regards,
-- 
Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>


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

* Re: [PATCH net] net: stmmac: reconfigure RX packet parser table in stmmac_hw_setup() after reset
  2026-08-31 17:06 [PATCH net] net: stmmac: reconfigure RX packet parser table in stmmac_hw_setup() after reset Lorenzo Bianconi
@ 2026-09-03  9:50 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-09-03  9:50 UTC (permalink / raw)
  To: Lorenzo Bianconi
  Cc: maxime.chevallier, andrew+netdev, davem, edumazet, kuba, pabeni,
	mcoquelin.stm32, alexandre.torgue, Jose.Abreu, netdev,
	linux-stm32, linux-arm-kernel

Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Mon, 31 Aug 2026 19:06:38 +0200 you wrote:
> The core software reset issued in stmmac_init_dma_engine() during
> ndo_open() callback clears the MTL RX packet parser registers, but
> stmmac_rxp_config() is only invoked from the cls_u32 add/delete paths.
> After an ifdown/ifup cycle the hardware therefore runs with the default
> all-pass table while priv->tc_entries still reports the filters as
> installed. Re-apply the RX packet parser table from priv->tc_entries in
> stmmac_hw_setup(), right after the software reset, so the filters are
> restored when the interface is brought up again.
> 
> [...]

Here is the summary with links:
  - [net] net: stmmac: reconfigure RX packet parser table in stmmac_hw_setup() after reset
    https://git.kernel.org/netdev/net/c/6b8fed2675fb

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] 2+ messages in thread

end of thread, other threads:[~2026-09-03  9:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-31 17:06 [PATCH net] net: stmmac: reconfigure RX packet parser table in stmmac_hw_setup() after reset Lorenzo Bianconi
2026-09-03  9:50 ` 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