Re: [PATCH net-next V4 5/5] net: lan743x: Add support to ethtool phylink get and set settings
From: Raju Lakkaraju
Date: Wed Sep 04 2024 - 04:27:37 EST
Hi Andrew,
Thank you for review the patches.
The 08/30/2024 22:55, Andrew Lunn wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> > @@ -3055,6 +3071,10 @@ static void lan743x_phylink_mac_link_up(struct phylink_config *config,
> > cap & FLOW_CTRL_TX,
> > cap & FLOW_CTRL_RX);
> >
> > + if (phydev)
> > + lan743x_mac_eee_enable(adapter, phydev->enable_tx_lpi &&
> > + phydev->eee_enabled);
>
> This is wrong. The documentation says:
>
> /**
> * phy_support_eee - Set initial EEE policy configuration
> * @phydev: Target phy_device struct
> *
> * This function configures the initial policy for Energy Efficient Ethernet
> * (EEE) on the specified PHY device, influencing that EEE capabilities are
> * advertised before the link is established. It should be called during PHY
> * registration by the MAC driver and/or the PHY driver (for SmartEEE PHYs)
> * if MAC supports LPI or PHY is capable to compensate missing LPI functionality
> * of the MAC.
> *
> * The function sets default EEE policy parameters, including preparing the PHY
> * to advertise EEE capabilities based on hardware support.
> *
> * It also sets the expected configuration for Low Power Idle (LPI) in the MAC
> * driver. If the PHY framework determines that both local and remote
> * advertisements support EEE, and the negotiated link mode is compatible with
> * EEE, it will set enable_tx_lpi = true. The MAC driver is expected to act on
> * this setting by enabling the LPI timer if enable_tx_lpi is set.
> */
>
> So you should only be looking at enable_tx_lpi.
Ok. I will fix.
>
> Also, do you actually call phy_support_eee() anywhere? I don't see it
> in this patch, but maybe it was already there?
We never call phy_support_eee() anywhere.
I will fix
>
> Adrew
--
Thanks,
Raju