Skip to content

Commit e8e032c

Browse files
Wei FangPaolo Abeni
authored andcommitted
net: fec: ERR007885 Workaround for XDP TX path
The ERR007885 will lead to a TDAR race condition for mutliQ when the driver sets TDAR and the UDMA clears TDAR simultaneously or in a small window (2-4 cycles). And it will cause the udma_tx and udma_tx_arbiter state machines to hang. Therefore, the commit 53bb20d ("net: fec: add variable reg_desc_active to speed things up") and the commit a179aad ("net: fec: ERR007885 Workaround for conventional TX") have added the workaround to fix the potential issue for the conventional TX path. Similarly, the XDP TX path should also have the potential hang issue, so add the workaround for XDP TX path. Fixes: 6d6b39f ("net: fec: add initial XDP support") Signed-off-by: Wei Fang <wei.fang@nxp.com> Link: https://patch.msgid.link/20251128025915.2486943-1-wei.fang@nxp.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent 8f7aa3d commit e8e032c

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
@@ -3933,7 +3933,12 @@ static int fec_enet_txq_xmit_frame(struct fec_enet_private *fep,
39333933
txq->bd.cur = bdp;
39343934

39353935
/* Trigger transmission start */
3936-
writel(0, txq->bd.reg_desc_active);
3936+
if (!(fep->quirks & FEC_QUIRK_ERR007885) ||
3937+
!readl(txq->bd.reg_desc_active) ||
3938+
!readl(txq->bd.reg_desc_active) ||
3939+
!readl(txq->bd.reg_desc_active) ||
3940+
!readl(txq->bd.reg_desc_active))
3941+
writel(0, txq->bd.reg_desc_active);
39373942

39383943
return 0;
39393944
}

0 commit comments

Comments
 (0)