Skip to content

Commit ef4943d

Browse files
Wei Fanggregkh
authored andcommitted
net: fec: ERR007885 Workaround for XDP TX path
[ Upstream commit e8e032c ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 6938e2f commit ef4943d

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

39503950
/* Trigger transmission start */
3951-
writel(0, txq->bd.reg_desc_active);
3951+
if (!(fep->quirks & FEC_QUIRK_ERR007885) ||
3952+
!readl(txq->bd.reg_desc_active) ||
3953+
!readl(txq->bd.reg_desc_active) ||
3954+
!readl(txq->bd.reg_desc_active) ||
3955+
!readl(txq->bd.reg_desc_active))
3956+
writel(0, txq->bd.reg_desc_active);
39523957

39533958
return 0;
39543959
}

0 commit comments

Comments
 (0)