Re: [PATCH net 2/3] net: dsa: lantiq_gswip: handle SPEED_2500 in gswip_port_set_speed()

From: Maxime Chevallier

Date: Mon Sep 07 2026 - 12:36:09 EST


Hi,

On 9/7/26 15:48, Jan Havran (Advantech Czech) wrote:
> The mxl-gsw1xx driver advertises 2500BASE-X on its SGMII port (via
> supports_2500m and gsw1xx_phylink_get_caps()), but the shared
> gswip_port_set_speed() has no SPEED_2500 case: at 2.5G every field keeps
> its initializer, so mdio_phy = 0 pins the MDIO speed override to 10 Mbps
> and no data passes.
>
> At the MAC/MDIO level 2500BASE-X is identical to 1 Gbps (same wide GMII
> datapath, same speed override); the rate itself is set in the PCS and
> SerDes, not here. This matches the boot loader's PHY_ADDR_4 = 0x32A4 for
> the 2.5G strap ("1 Gbps or above"), whose SPEED field is
> GSWIP_MDIO_PHY_SPEED_G1 (the field has no encoding above G1). Share the
> SPEED_1000 arm via a stacked case label. Its mii_cfg value is a no-op
> for 2.5G: gswip_mii_mask_cfg() writes it only for the RGMII port
> (mii_cfg[SGMII port] == -1), which cannot reach 2.5G anyway.
>
> Fixes: 22335939ec90 ("net: dsa: add driver for MaxLinear GSW1xx switch family")
> Signed-off-by: Jan Havran (Advantech Czech) <havran.jan@xxxxxxxx>

Reviewed-by: Maxime Chevallier <maxime.chevallier@xxxxxxxxxxx>

Maxime

> ---
> drivers/net/dsa/lantiq/lantiq_gswip_common.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/dsa/lantiq/lantiq_gswip_common.c b/drivers/net/dsa/lantiq/lantiq_gswip_common.c
> index 0e8eedf64d3a3..6150dc3ffb641 100644
> --- a/drivers/net/dsa/lantiq/lantiq_gswip_common.c
> +++ b/drivers/net/dsa/lantiq/lantiq_gswip_common.c
> @@ -1339,6 +1339,7 @@ static void gswip_port_set_speed(struct gswip_priv *priv, int port, int speed,
> break;
>
> case SPEED_1000:
> + case SPEED_2500:
> mdio_phy = GSWIP_MDIO_PHY_SPEED_G1;
>
> mii_cfg = GSWIP_MII_CFG_RATE_M125;