From: Heiner Kallweit Date: Wed, 12 Nov 2025 21:06:13 +0000 (+0100) Subject: net: phy: fixed_phy: remove setting supported/advertised modes from fixed_phy_register X-Git-Tag: v6.19-rc1~170^2~152 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5860bb1ce0ddb9c5c964f7b46a8f0c4a48f919b1;p=thirdparty%2Fkernel%2Flinux.git net: phy: fixed_phy: remove setting supported/advertised modes from fixed_phy_register This code was added with 34b31da486a5 ("phy: fixed_phy: Set supported speed in phydev") 10 yrs ago. The commit message of this change mentions a use case involving callback adjust_link of struct dsa_switch_driver. This struct doesn't exist any longer, and in general usage of the legacy fixed PHY has been removed from DSA with the switch to phylink. Note: Supported and advertised modes are now set by phy_probe() when the fixed PHY is attached to the netdev and bound to the genphy driver. Signed-off-by: Heiner Kallweit Link: https://patch.msgid.link/3abaa3c5-fbb9-4052-9346-6cb096a25878@gmail.com Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/phy/fixed_phy.c b/drivers/net/phy/fixed_phy.c index 715f0356f895f..1ad77f542c1fa 100644 --- a/drivers/net/phy/fixed_phy.c +++ b/drivers/net/phy/fixed_phy.c @@ -19,7 +19,6 @@ #include #include #include -#include #include "swphy.h" @@ -184,29 +183,6 @@ struct phy_device *fixed_phy_register(const struct fixed_phy_status *status, phy->mdio.dev.of_node = np; phy->is_pseudo_fixed_link = true; - switch (status->speed) { - case SPEED_1000: - linkmode_set_bit(ETHTOOL_LINK_MODE_1000baseT_Half_BIT, - phy->supported); - linkmode_set_bit(ETHTOOL_LINK_MODE_1000baseT_Full_BIT, - phy->supported); - fallthrough; - case SPEED_100: - linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Half_BIT, - phy->supported); - linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT, - phy->supported); - fallthrough; - case SPEED_10: - default: - linkmode_set_bit(ETHTOOL_LINK_MODE_10baseT_Half_BIT, - phy->supported); - linkmode_set_bit(ETHTOOL_LINK_MODE_10baseT_Full_BIT, - phy->supported); - } - - phy_advertise_supported(phy); - ret = phy_device_register(phy); if (ret) { phy_device_free(phy);