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

From: Nicolai Buchwitz

Date: Fri Apr 03 2026 - 14:47:43 EST


On 3.4.2026 17:27, Andrew Lunn wrote:
+ * @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.

Makes sense. I will amend all comments accordingly.

* @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?

Probably not the right wording, agreed. I was thinking of the RX LPI
counter on macb, which wasn't incrementing until I noticed that the PHY
had AutogrEEEn enabled. After disabling it, the RX LPI signaling
worked.


+ * 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().

Will do.


Andrew

---
pw-bot: cr

Thanks for the prompt review

Nicolai