On PHY state change the phylink_resolve() function can currently pass incorrect speed (and possibly duplex) parameter to MAC/PCS reconfiguration functions, because only PHY interface mode and pause are taken from PHY state. Example with a Marvell 88X3310 PHY connected to a SerDes port on Marvell 88E6393X switch: - PHY driver triggers state change due to PHY interface mode being changed from 10gbase-r to 2500base-x due to copper change in speed from 10Gbps to 2.5Gbps, but the PHY hasn't yet changed host interface itself, so it is still at 10gbase-r. - phylink_resolve() - phylink_mac_pcs_get_state() - this reports 10g link up - interface mode is updated to 2500base-x but speed is left at 10Gbps - phylink_major_config() - mv88e6xxx_mac_link_up() - .port_set_speed_duplex() - After this the SerDes port on the switch is left in correct interface mode, but is forcing incorrect speed (10Gbps, when it should be forcing 2.5Gbps), which makes it not work. - Only after this does the PHY actually change host interface, and the 2500base-x PCS in the switch driver gets link up interrupt, and so phylink_resolve() is called again, and calls phylink_mac_config() with correct speed & duplex, but since commit 64d47d50be7a ("net: dsa: mv88e6xxx: configure interface settings in mac_config") speed & duplex are not reconfigured in mv88e6xxx' .mac_config() implementation. To fix this, we need to revert commit 64d47d50be7a ("net: dsa: mv88e6xxx: configure interface settings in mac_config") in the mv88e6xxx driver, but that is not enough. Even if we revert this commit, we will still get the following dmesg output: mv88e6085 f212a200.mdio-mii:06 sfp: phy link up 2500base-x/2.5Gbps/Full/rx/tx mv88e6085 f212a200.mdio-mii:06 sfp: major config 2500base-x mv88e6085 f212a200.mdio-mii:06 sfp: phylink_mac_config: mode=inband/2500base-x/10Gbps/Full adv=0000000,00018000,0000306f pause=03 link=1 an=1 mv88e6085 f212a200.mdio-mii:06 sfp: Link is Up - 10Gbps/Full - flow control rx/tx IPv6: ADDRCONF(NETDEV_CHANGE): sfp: link becomes ready mv88e6085 f212a200.mdio-mii:06 sfp: mac link up mv88e6085 f212a200.mdio-mii:06 sfp: phylink_mac_config: mode=inband/2500base-x/2.5Gbps/Full adv=0000000,00018000,0000306f pause=03 link=1 an=1 The message sfp: Link is Up - 10Gbps/Full is incorrect, since the link is 2.5Gbps. To fix this, we also need to pass new link speed to to link_state in phylink code on interface change.