From: Daniel Golle Date: Sat, 30 Aug 2025 02:33:48 +0000 (+0100) Subject: net: dsa: lantiq_gswip: ignore SerDes modes in phylink_mac_config() X-Git-Tag: v6.18-rc1~132^2~273^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=17420a7fe5e260b8f5076b9e9d820da629668f8e;p=thirdparty%2Fkernel%2Fstable.git net: dsa: lantiq_gswip: ignore SerDes modes in phylink_mac_config() We can safely ignore SerDes interface modes 1000Base-X, 2500Base-X and SGMII in phylink_mac_config() as they are being taken care of by the PCS and the SGMII port anyway doesn't have MII_CFG and MII_PCDU registers and hence gswip_phylink_mac_config() is already a no-op apart from outputing a misleading error message. Return early in case of SerDes interface modes to avoid printing that error message. Signed-off-by: Daniel Golle Reviewed-by: Hauke Mehrtens Link: https://patch.msgid.link/dcb066d6a02e6340314b5ff4f73937757a4f8eb3.1756520811.git.daniel@makrotopia.org Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/dsa/lantiq/lantiq_gswip.c b/drivers/net/dsa/lantiq/lantiq_gswip.c index acb6996356e9e..3e2a54569828e 100644 --- a/drivers/net/dsa/lantiq/lantiq_gswip.c +++ b/drivers/net/dsa/lantiq/lantiq_gswip.c @@ -1444,6 +1444,10 @@ static void gswip_phylink_mac_config(struct phylink_config *config, miicfg |= GSWIP_MII_CFG_LDCLKDIS; switch (state->interface) { + case PHY_INTERFACE_MODE_SGMII: + case PHY_INTERFACE_MODE_1000BASEX: + case PHY_INTERFACE_MODE_2500BASEX: + return; case PHY_INTERFACE_MODE_MII: case PHY_INTERFACE_MODE_INTERNAL: miicfg |= GSWIP_MII_CFG_MODE_MIIM;