[PATCH net-next 01/13] net: phy: Extract the speed/duplex to linkmode conversion from phylink

Russell King (Oracle) linux at armlinux.org.uk
Mon Feb 24 06:01:11 PST 2025


On Sat, Feb 22, 2025 at 03:27:13PM +0100, Maxime Chevallier wrote:
> Phylink uses MAC capabilities to represent the Pause, AsymPause, Speed
> and Duplex capabilities of a given MAC device. These capabilities are
> used internally by phylink for link validation and get a coherent set of
> linkmodes that we can effectively use on a given interface.
> 
> The conversion from MAC capabilities to linkmodes is done in a dedicated
> function, that associates speed/duplex to linkmodes.
> 
> As preparation work for phy_port, extract this logic away from phylink
> and have it in a dedicated file that will deal with all the conversions
> between capabilities, linkmodes and interfaces.

Fundamental question: why do you want to extract MAC capabilities from
phylink?

At the moment, only phylink uses the MAC capabilities (they're a phylink
thing.) Why should they be made generic, and what use will they be
applied to as something generic?

If there's no answer for that, then I worry that they'll get abused.

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



More information about the linux-arm-kernel mailing list