[PATCH RFC net-next 02/16] net: phylink: split cur_link_an_mode into requested and active

Andrew Lunn andrew at lunn.ch
Tue Nov 26 12:02:42 PST 2024


On Tue, Nov 26, 2024 at 09:24:25AM +0000, Russell King (Oracle) wrote:
> There is an interdependence between the current link_an_mode and
> pcs_neg_mode that some drivers rely upon to know whether inband or PHY
> mode will be used.
> 
> In order to support detection of PCS and PHY inband capabilities
> resulting in automatic selection of inband or PHY mode, we need to
> cater for this, and support changing the MAC link_an_mode. However, we
> end up with an inter-dependency between the current link_an_mode and
> pcs_neg_mode.
> 
> To solve this, split the current link_an_mode into the requested
> link_an_mode and active link_an_mode. The requested link_an_mode will
> always be passed to phylink_pcs_neg_mode(), and the active link_an_mode
> will be used for everything else, and only updated during
> phylink_major_config(). This will ensure that phylink_pcs_neg_mode()'s
> link_an_mode will not depend on the active link_an_mode that will,
> in a future patch, depend on pcs_neg_mode.
> 
> Signed-off-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>

Reviewed-by: Andrew Lunn <andrew at lunn.ch>

    Andrew



More information about the Linux-mediatek mailing list