Commit e8e032cd authored by Wei Fang's avatar Wei Fang Committed by Paolo Abeni
Browse files

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 53bb20d1 ("net: fec:
add variable reg_desc_active to speed things up") and the commit
a179aad1 ("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: 6d6b39f1 ("net: fec: add initial XDP support")
Signed-off-by: default avatarWei Fang <wei.fang@nxp.com>
Link: https://patch.msgid.link/20251128025915.2486943-1-wei.fang@nxp.com


Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 8f7aa3d3
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -3933,6 +3933,11 @@ static int fec_enet_txq_xmit_frame(struct fec_enet_private *fep,
	txq->bd.cur = bdp;

	/* Trigger transmission start */
	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;