Re: [PATCH v4 7/8] net: macb: add XDP support for gem
From: Paolo Valerio <hidden>
Date: 2026-03-11 16:51:33
On 11 Mar 2026 at 12:21:19 AM, Nicolai Buchwitz [off-list ref] wrote:
Hi Paolo, Nice series! One issue I spotted that interacts with the EEE support that's currently in net-next:
Hi Nicolai,
quoted
+ 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.
good catch! I'll make sure to add it to the next version, thanks.