Re: [RFC PATCH net-next 1/3] net: phy: add support for disabling PHY-autonomous EEE

From: Andrew Lunn

Date: Fri Apr 03 2026 - 11:30:46 EST


> + * @autonomous_eee_disabled: Set when autonomous EEE has been disabled via
> + * phy_support_eee(), used to re-apply after PHY soft reset

Thinking ahead to when autonomous EEE is supported, there will be
other reasons to disable it than just phy_support_eee(). So i would
not say this here.

> * @eee_cfg: User configuration of EEE
> * @lp_advertising: Current link partner advertised linkmodes
> * @host_interfaces: PHY interface modes supported by host
> @@ -739,6 +741,7 @@ struct phy_device {
> __ETHTOOL_DECLARE_LINK_MODE_MASK(eee_disabled_modes);
> bool enable_tx_lpi;
> bool eee_active;
> + bool autonomous_eee_disabled;
> struct eee_config eee_cfg;
>
> /* Host supported PHY interface types. Should be ignored if empty. */
> @@ -1359,6 +1362,21 @@ struct phy_driver {
> void (*get_stats)(struct phy_device *dev,
> struct ethtool_stats *stats, u64 *data);
>
> + /**
> + * @disable_autonomous_eee: Disable PHY-autonomous EEE
> + *
> + * Some PHYs manage EEE LPI autonomously without forwarding LPI
> + * signaling to the MAC.

My understanding is that LPI is always from the MAC to the PHY?


> + * Called by phy_support_eee() when the MAC indicates it supports
> + * EEE. PHY drivers that implement autonomous EEE should provide
> + * this callback.

Again, there will be other reasons to call this, than just
phy_support_eee().

Andrew

---
pw-bot: cr