[PATCH v2 3/3] net: stmmac: Bring down the clocks to lower frequencies when mac link goes down

Andrew Lunn andrew at lunn.ch
Wed Jun 26 08:10:35 PDT 2024


> I'm still curious if any of the netdev folks have any opinion on scaling
> things down like this on link down.

It does make sense, in that there are no frames to process, so the
clock can be reduced. But i also think it is a bit of a workaround for
poor hardware design. Often you can tell the MAC the link is down, and
it can shut down a lot more, and even turn all the clocks off.

I also wounder if there are going to be any side effects of this. Some
Ethernet MACs export a clock to the PHY. Is that clock going to
change? I don't think it will, because we are changing to a valid MAC
speed, not 0. So the PHY has to work at this speed clock.

But to make it easier to find issues like this, open() should probably
set the clocks to a low speed until the link is up. That way, if there
are going to be problems, the link should never come up, as opposed to
the link never comes up after being lost the first time...

     Andrew



More information about the linux-arm-kernel mailing list