Skip to content

Commit 014ddc5

Browse files
Mattias Bartheljfvogel
authored andcommitted
net: fec: ERR007885 Workaround for conventional TX
[ Upstream commit a179aad12badc43201cbf45d1e8ed2c1383c76b9 ] Activate TX hang workaround also in fec_enet_txq_submit_skb() when TSO is not enabled. Errata: ERR007885 Symptoms: NETDEV WATCHDOG: eth0 (fec): transmit queue 0 timed out commit 37d6017 ("net: fec: Workaround for imx6sx enet tx hang when enable three queues") There is a TDAR race condition for mutliQ when the software sets TDAR and the UDMA clears TDAR simultaneously or in a small window (2-4 cycles). This will cause the udma_tx and udma_tx_arbiter state machines to hang. So, the Workaround is checking TDAR status four time, if TDAR cleared by hardware and then write TDAR, otherwise don't set TDAR. Fixes: 53bb20d ("net: fec: add variable reg_desc_active to speed things up") Signed-off-by: Mattias Barthel <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]> Signed-off-by: Sasha Levin <[email protected]> (cherry picked from commit bcb9d6a2229ffc8a2c7a5e433540484c788c9444) Signed-off-by: Jack Vogel <[email protected]>
1 parent 2a7e8b1 commit 014ddc5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

drivers/net/ethernet/freescale/fec_main.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,12 @@ static int fec_enet_txq_submit_skb(struct fec_enet_priv_tx_q *txq,
714714
txq->bd.cur = bdp;
715715

716716
/* Trigger transmission start */
717-
writel(0, txq->bd.reg_desc_active);
717+
if (!(fep->quirks & FEC_QUIRK_ERR007885) ||
718+
!readl(txq->bd.reg_desc_active) ||
719+
!readl(txq->bd.reg_desc_active) ||
720+
!readl(txq->bd.reg_desc_active) ||
721+
!readl(txq->bd.reg_desc_active))
722+
writel(0, txq->bd.reg_desc_active);
718723

719724
return 0;
720725
}

0 commit comments

Comments
 (0)