Re: [PATCH net-next v1 1/1] net: sxgbe: rework EEE handling to use PHY negotiation results
From: Russell King (Oracle)
Date: Thu Feb 06 2025 - 05:24:49 EST
On Thu, Feb 06, 2025 at 08:58:56AM +0100, Oleksij Rempel wrote:
> From: Andrew Lunn <andrew@xxxxxxx>
>
> The enabling/disabling of EEE in the MAC should happen as a result of
> auto negotiation. So rework sxgbe_eee_adjust() to take the result of
> negotiation into account.
PLS, at least in stmmac terminology, is "phy link status" and there it
is used with a separate timer which prevents LPI mode being entered
near to the link coming up. Given that the method is called
priv->hw->mac->set_eee_pls, and what was being passed to it was the
link status, I think this is the same thing in this driver.
So, I think repurposing this bit to indicate whether EEE has been
negotiated is not correct.
> sxgbe_set_eee() now just stores LTI timer value. Everything else is
> passed to phylib, so it can correctly setup the PHY.
Not sure why you don't use phydev->eee_cfg.lpi_timer which will be
updated correctly - if phy_ethtool_set_eee() reutrns an error, then
priv->tx_lpi_timer will have been updated yet an error will be
returned to userspace. Sure, have priv->tx_lpi_timer, but update
this on link-up.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!