Re: [PATCH net 1/1] net: stmmac: set initial EEE policy configuration
From: Jacob Keller
Date: Wed Nov 20 2024 - 14:48:46 EST
On 11/20/2024 12:38 AM, Choong Yong Liang wrote:
> 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@xxxxxxxxxxxxxxx>
> Signed-off-by: Choong Yong Liang <yong.liang.choong@xxxxxxxxxxxxxxx>
> ---
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index 7bf275f127c9..766213ee82c1 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -1205,6 +1205,9 @@ static int stmmac_init_phy(struct net_device *dev)
> return -ENODEV;
> }
>
> + if (priv->dma_cap.eee)
> + phy_support_eee(phydev);
> +
Ok, so priv->dma_cap.eee is true, then this device supports EEE, and we
call phy_support_eee which will initialize the values indicating that we
support the feature for ethtool.
Makes sense.
Reviewed-by: Jacob Keller <jacob.e.keller@xxxxxxxxx>
> ret = phylink_connect_phy(priv->phylink, phydev);
> } else {
> fwnode_handle_put(phy_fwnode);