[PATCH net v2 2/3] net: stmmac: advertise integrated PCS interfaces to phylink

Maxime Chevallier maxime.chevallier at bootlin.com
Fri Sep 18 00:11:32 PDT 2026


Hello Thomas,

On 9/18/26 06:50, Thomas Karpiniec wrote:
> From: Thomas Karpiniec <tom at wendy.sh>
> 
> stmmac_phylink_setup() adds interfaces reported by platform
> get_interfaces() and non-integrated PCS instances to
> config->supported_interfaces, but omits the integrated PCS.
> 
> On qcom-ethqos with 2500BASE-X selected by firmware, this leaves SGMII
> out of the supported interface bitmap, causing phylink to remove the
> lower-speed modes of a switching PHY such as QCA8081.
> 
> Add the integrated PCS interface bitmap to config->supported_interfaces.
> 
> Fixes: 68cff4fff61f ("net: stmmac: add BASE-X support to integrated PCS")
> Cc: stable at vger.kernel.org # 7.0+
> Assisted-by: LLM sparse
> Signed-off-by: Thomas Karpiniec <tom at wendy.sh>

Looks good to me, thanks !

Reviewed-by: Maxime Chevallier <maxime.chevallier at bootlin.com>

Maxime


> ---
>  drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index 1350e92943ac..f956e0d2ec64 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -1414,6 +1414,12 @@ static int stmmac_phylink_setup(struct stmmac_priv *priv)
>  		__set_bit(priv->plat->phy_interface,
>  			  config->supported_interfaces);
>  
> +	/* If we have an integrated PCS, add the interfaces it supports. */
> +	if (priv->integrated_pcs)
> +		phy_interface_or(config->supported_interfaces,
> +				 config->supported_interfaces,
> +				 priv->integrated_pcs->pcs.supported_interfaces);
> +
>  	/* If we have an xpcs, it defines which PHY interfaces are supported. */
>  	if (priv->hw->xpcs)
>  		pcs = xpcs_to_phylink_pcs(priv->hw->xpcs);




More information about the linux-arm-kernel mailing list