Subject: Re: [PATCH net-next v2 1/6] net: dsa: add support for phylink mac_select_pcs()

From: "Russell King (Oracle)" <[email-masked]>
Date: Mon, 21 Feb 2022 14:44:34 +0000

On Mon, Feb 21, 2022 at 04:32:54PM +0200, Vladimir Oltean wrote:
> Alternatively, phylink_create() gets the initial PHY interface mode
> passed to it, I wonder, couldn't we call mac_select_pcs() with that in
> order to determine whether the function is a stub or not?

That would be rather prone to odd behaviour depending on how
phylink_create() is called, depending on the initial interface mode.
If the initial interface mode causes mac_select_pcs() to return NULL
but it actually needed to return a PCS for a different interface mode,
then we fail.

> *and as I haven't considered, to be honest. When phylink_major_config()
> gets called after a SGMII to 10GBaseR switchover, and mac_select_pcs is
> called and returns NULL, the current behavior is to keep working with
> the PCS for SGMII. Is that intended?

It was not originally intended, but as a result of the discussion
around this patch which didn't go anywhere useful, I dropped it as
a means to a path of least resistance.

https://patchwork.kernel.org/project/linux-arm-kernel/patch/[email-masked]/

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