GENET never initializes priv->eee.eee_enabled or priv->eee.tx_lpi_enabled to true, so the link-change callback in bcmgenet_mac_config() always calls bcmgenet_eee_enable_set() with enable=false. The result is that EEE is negotiated at the PHY level but the MAC never enters Low Power Idle, wasting the power savings that EEE is designed to provide. Users can work around this with 'ethtool --set-eee eth0 eee on tx-lpi on tx-timer 250', but the MAC should enable TX LPI out of the box when the hardware supports it, consistent with how phylink-managed MACs behave (phylink calls phy_support_eee() which sets eee_enabled=true and tx_lpi_enabled=true by default). Initialize EEE software state during bcmgenet_open() on GENET v2+ so that the link-change path activates EEE in hardware once the PHY negotiates it. Use an LPI timer of 250 us, matching the default used by other MAC drivers (mvneta, mvpp2). Signed-off-by: Nicolai Buchwitz --- drivers/net/ethernet/broadcom/genet/bcmgenet.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c index 33fece36a95e..00ce93b8a6fa 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c @@ -3375,6 +3375,16 @@ static int bcmgenet_open(struct net_device *dev) bcmgenet_phy_pause_set(dev, priv->rx_pause, priv->tx_pause); + /* Enable EEE by default on hardware that supports it. This sets the + * software state so that the link-change callback will activate EEE + * in hardware once EEE is negotiated with the link partner. + */ + if (!GENET_IS_V1(priv)) { + priv->eee.eee_enabled = true; + priv->eee.tx_lpi_enabled = true; + bcmgenet_umac_writel(priv, 250, UMAC_EEE_LPI_TIMER); + } + bcmgenet_netif_start(dev); netif_tx_start_all_queues(dev); -- 2.51.0