2024-05-29 11:46:08

by Russell King (Oracle)

[permalink] [raw]
Subject: Re: [net PATCH] net: stmmac: update priv->speed to SPEED_UNKNOWN when link down

On Wed, May 29, 2024 at 06:55:21PM +0800, xiaolei wang wrote:
> On 5/29/24 16:46, Russell King (Oracle) wrote:
> > To me, commit 1f705bc61aee ("net: stmmac: Add support for CBS QDISC")
> > just looks very buggy.
>
> This makes sense. I think it is necessary to update the parameters after
> linking up.
>
> Does anyone have a better suggestion?

Any setup that a phylink-based MAC driver does which is dependent on
the negotiated media parameters (e.g. speed, duplex etc) _should_
always be done from the .mac_link_up method.

So, from a phylink perspective, what you propose is the correct and
only way.

--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!