]> git.hungrycats.org Git - linux/commitdiff
net: stmmac: set initial EEE policy configuration
authorChoong Yong Liang <yong.liang.choong@linux.intel.com>
Wed, 20 Nov 2024 08:38:18 +0000 (16:38 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Dec 2024 09:41:04 +0000 (10:41 +0100)
commit 59c5e1411a0a13ebb930f4ebba495cc4eb14f8f2 upstream.

Set the initial eee_cfg values to have 'ethtool --show-eee ' display
the initial EEE configuration.

Fixes: 49168d1980e2 ("net: phy: Add phy_support_eee() indicating MAC support EEE")
Cc: <stable@vger.kernel.org>
Signed-off-by: Choong Yong Liang <yong.liang.choong@linux.intel.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Link: https://patch.msgid.link/20241120083818.1079456-1-yong.liang.choong@linux.intel.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

index 7bf275f127c9d750418db8b4fdb6e650a53dc644..766213ee82c16e6fe0cba1d676f3745cde88f037 100644 (file)
@@ -1205,6 +1205,9 @@ static int stmmac_init_phy(struct net_device *dev)
                        return -ENODEV;
                }
 
+               if (priv->dma_cap.eee)
+                       phy_support_eee(phydev);
+
                ret = phylink_connect_phy(priv->phylink, phydev);
        } else {
                fwnode_handle_put(phy_fwnode);