Re: [PATCH net-next v5 3/8] net: phy: Add helper to set EEE Clock stop enable bit

From: Oleksij Rempel
Date: Fri Feb 23 2024 - 03:54:35 EST


On Thu, Feb 22, 2024 at 08:47:58PM -0800, Florian Fainelli wrote:
>
>
> On 2/20/2024 10:21 PM, Oleksij Rempel wrote:
> > From: Andrew Lunn <andrew@xxxxxxx>
> >
> > The MAC driver can request that the PHY stops the clock during EEE
> > LPI. This has normally been does as part of phy_init_eee(), however
> > that function is overly complex and often wrongly used. Add a
> > standalone helper, to aid removing phy_init_eee().
> >
> > Signed-off-by: Andrew Lunn <andrew@xxxxxxx>
> > Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
>
> Reviewed-by: Florian Fainelli <florian.fainelli@xxxxxxxxxxxx>
>
> It would be useful to also read whether the PHY is capable of stopping its
> clock, this has IMHO always been missing. Clause 45 IEEE PCS Status 1
> Register (3.1) bit 6 reflects whether the PHY is capable of stopping its
> clock.

Agreed, there is a extra set of challenges with this functionality. For
example stmmac will fail to reset DMA engine if PHY disabled clock. It will be
good to handle it in a separate patch set.

Regards,
Oleksij
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |