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

From
Andrew Lunn <andrew@lunn.ch>
Date
2024-11-26 20:04:03
Also in
linux-arm-kernel, linux-mediatek
Reply to
Russell King (Oracle), 2024-11-26
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) <redacted>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
Thread (32 messages) 32 messages, 4 authors, last reply 2024-11-27
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help