Subject: Re: [PATCH net-next 3/5] net: cadence: macb: implement EEE TX LPI support

From: "Russell King (Oracle)" <[email-masked]>
Date: Mon, 23 Feb 2026 10:07:50 +0000

On Mon, Feb 23, 2026 at 10:04:10AM +0100, Nicolai Buchwitz wrote:
> Implement software-managed TX Low Power Idle (LPI) for the Cadence GEM
> MAC as part of IEEE 802.3az Energy Efficient Ethernet support.
> 
> The GEM MAC has no built-in idle timer - the TXLPIEN bit (NCR bit 19)
> immediately asserts LPI and blocks all TX while set. The MAC does not
> auto-wake for transmit. Per Microchip GMAC documentation (section
> 40.6.19): "It is best to use firmware to control LPI."
> 
> This patch implements a software idle timer using delayed_work:
> - On TX completion with an empty ring, schedule LPI entry after a
>   configurable idle timeout (default 250ms). The work function
>   verifies all TX queues are truly idle before entering LPI to
>   prevent entering LPI while traffic is still active.
> - On TX start, wake from LPI by clearing TXLPIEN, cancelling any
>   pending re-entry, and waiting 50us for the PHY to exit LPI
>   (conservative vs IEEE 802.3az Tw_sys of ~17us/~30us)
> - On link up, check EEE negotiation via phy_init_eee() and defer
>   first LPI entry by 1 second per IEEE 802.3az requirements
> - On link down, immediately cancel pending work and clear TXLPIEN
> 
> The timer value is configurable at runtime via ethtool --set-eee
> tx-timer.
> 
> The implementation is gated on MACB_CAPS_EEE so platforms must
> explicitly opt in via their macb_config.

In addition to my comments, please check the nipabot status for this
patch which can be found at:

https://patchwork.kernel.org/project/netdevbpf/patch/[email-masked]/

Thanks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!