netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] net: stmmac: do not clear TBS enable bit on link up/down
@ 2024-01-24 14:32 Esben Haabendal
  2024-01-24 14:33 ` [PATCH 2/3] dt-bindings: net: snps,dwmac: Add time-based-scheduling property Esben Haabendal
  2024-01-24 14:33 ` [PATCH 3/3] net: stmmac: Time Based Scheduling support for OF platforms Esben Haabendal
  0 siblings, 2 replies; 12+ messages in thread
From: Esben Haabendal @ 2024-01-24 14:32 UTC (permalink / raw)
  To: netdev, Alexandre Torgue, Jose Abreu, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Maxime Coquelin,
	Christian Marangi
  Cc: stable, linux-stm32, linux-arm-kernel, linux-kernel

With the dma conf being reallocated on each call to stmmac_open(), any
information in there is lost, unless we specifically handle it.

The STMMAC_TBS_EN bit is set when adding an etf qdisc, and the etf qdisc
therefore would stop working when link was set down and then back up.

Fixes: ba39b344e924 ("net: ethernet: stmicro: stmmac: generate stmmac dma conf before open")
Cc: stable@vger.kernel.org
Signed-off-by: Esben Haabendal <esben@geanix.com>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index a0e46369ae15..691bf3ef5e30 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -3932,6 +3932,9 @@ static int __stmmac_open(struct net_device *dev,
 	priv->rx_copybreak = STMMAC_RX_COPYBREAK;
 
 	buf_sz = dma_conf->dma_buf_sz;
+	for (int i = 0; i < MTL_MAX_TX_QUEUES; i++)
+		if (priv->dma_conf.tx_queue[i].tbs & STMMAC_TBS_EN)
+			dma_conf->tx_queue[i].tbs = priv->dma_conf.tx_queue[i].tbs;
 	memcpy(&priv->dma_conf, dma_conf, sizeof(*dma_conf));
 
 	stmmac_reset_queues_param(priv);
-- 
2.43.0


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

end of thread, other threads:[~2024-01-31  7:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-24 14:32 [PATCH 1/3] net: stmmac: do not clear TBS enable bit on link up/down Esben Haabendal
2024-01-24 14:33 ` [PATCH 2/3] dt-bindings: net: snps,dwmac: Add time-based-scheduling property Esben Haabendal
2024-01-24 16:07   ` Conor Dooley
2024-01-25  9:10     ` esben
2024-01-25  9:19       ` Krzysztof Kozlowski
2024-01-25 11:55         ` esben
2024-01-25 17:14           ` Conor Dooley
2024-01-30 21:39   ` Rob Herring
2024-01-31  7:31     ` Esben Haabendal
2024-01-24 14:33 ` [PATCH 3/3] net: stmmac: Time Based Scheduling support for OF platforms Esben Haabendal
2024-01-25 11:03   ` Kurt Kanzenbach
2024-01-25 11:58     ` esben

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).