Thread (11 messages) 11 messages, 2 authors, 2026-03-11

Re: [PATCH v4 7/8] net: macb: add XDP support for gem

From: Nicolai Buchwitz <hidden>
Date: 2026-03-10 23:21:52

Hi Paolo,

Nice series! One issue I spotted that interacts with the EEE support
that's currently in net-next:
+	spin_lock(&bp->lock);
+	macb_writel(bp, NCR, macb_readl(bp, NCR) | MACB_BIT(TSTART));
+	spin_unlock(&bp->lock);
macb_xdp_submit_frame() writes TSTART without first waking the MAC
from LPI. The regular TX path in macb_start_xmit() calls
macb_tx_lpi_wake(bp) before TSTART for this reason -- the GEM MAC
has no auto-wake mechanism, so when TXLPIEN is set in NCR, TX is
blocked and frames will sit in the FIFO indefinitely.

This affects XDP_TX, XDP_REDIRECT and ndo_xdp_xmit. The fix should
be straightforward:

	spin_lock(&bp->lock);
	macb_tx_lpi_wake(bp);
	macb_writel(bp, NCR, macb_readl(bp, NCR) | MACB_BIT(TSTART));
	spin_unlock(&bp->lock);

macb_tx_lpi_wake() is a no-op when EEE is not active, so there's no
overhead in the non-EEE case.

Thanks,
Nicolai
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help