[PATCH net] fec: Workaround for ERR007885 on fec_enet_txq_submit_skb()

mattiasbarthel@gmail.com posted 1 patch 9 months, 2 weeks ago
There is a newer version of this series
drivers/net/ethernet/freescale/fec_main.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
[PATCH net] fec: Workaround for ERR007885 on fec_enet_txq_submit_skb()
Posted by mattiasbarthel@gmail.com 9 months, 2 weeks ago
From: Mattias Barthel <mattias.barthel@atlascopco.com>

Activate workaround also in fec_enet_txq_submit_skb() for when TSO is not enbabled.

Errata: ERR007885
Symptoms: NETDEV WATCHDOG: eth0 (fec): transmit queue 0 timed out

reference commit 37d6017b84f7 ("net: fec: Workaround for imx6sx enet tx hang when enable three queues"),

Signed-off-by: Mattias Barthel <mattias.barthel@atlascopco.com>
---
 drivers/net/ethernet/freescale/fec_main.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index a86cfebedaa8..17e9bddb9ddd 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -714,7 +714,12 @@ static int fec_enet_txq_submit_skb(struct fec_enet_priv_tx_q *txq,
 	txq->bd.cur = bdp;
 
 	/* Trigger transmission start */
-	writel(0, txq->bd.reg_desc_active);
+	if (!(fep->quirks & FEC_QUIRK_ERR007885) ||
+	    !readl(txq->bd.reg_desc_active) ||
+	    !readl(txq->bd.reg_desc_active) ||
+	    !readl(txq->bd.reg_desc_active) ||
+	    !readl(txq->bd.reg_desc_active))
+		writel(0, txq->bd.reg_desc_active);
 
 	return 0;
 }
-- 
2.43.0
Re: [PATCH net] fec: Workaround for ERR007885 on fec_enet_txq_submit_skb()
Posted by Simon Horman 9 months, 2 weeks ago
On Mon, Apr 28, 2025 at 01:10:18PM +0200, mattiasbarthel@gmail.com wrote:
> From: Mattias Barthel <mattias.barthel@atlascopco.com>
> 
> Activate workaround also in fec_enet_txq_submit_skb() for when TSO is not enbabled.
> 
> Errata: ERR007885
> Symptoms: NETDEV WATCHDOG: eth0 (fec): transmit queue 0 timed out
> 
> reference commit 37d6017b84f7 ("net: fec: Workaround for imx6sx enet tx hang when enable three queues"),

Hi Mattias,

The commit cited above includes an explanation of the problem
and the work around. I think this commit message could
benefit from a similar level of detail.

> 
> Signed-off-by: Mattias Barthel <mattias.barthel@atlascopco.com>

...