Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <hkallweit1@gmail.com>
Link: https://patch.msgid.link/3abaa3c5-fbb9-4052-9346-6cb096a25878@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

Heiner Kallweit and committed by
Jakub Kicinski
5860bb1c 40ea4085

-24
-24
drivers/net/phy/fixed_phy.c
··· 19 19 #include <linux/of.h> 20 20 #include <linux/idr.h> 21 21 #include <linux/netdevice.h> 22 - #include <linux/linkmode.h> 23 22 24 23 #include "swphy.h" 25 24 ··· 182 183 of_node_get(np); 183 184 phy->mdio.dev.of_node = np; 184 185 phy->is_pseudo_fixed_link = true; 185 - 186 - switch (status->speed) { 187 - case SPEED_1000: 188 - linkmode_set_bit(ETHTOOL_LINK_MODE_1000baseT_Half_BIT, 189 - phy->supported); 190 - linkmode_set_bit(ETHTOOL_LINK_MODE_1000baseT_Full_BIT, 191 - phy->supported); 192 - fallthrough; 193 - case SPEED_100: 194 - linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Half_BIT, 195 - phy->supported); 196 - linkmode_set_bit(ETHTOOL_LINK_MODE_100baseT_Full_BIT, 197 - phy->supported); 198 - fallthrough; 199 - case SPEED_10: 200 - default: 201 - linkmode_set_bit(ETHTOOL_LINK_MODE_10baseT_Half_BIT, 202 - phy->supported); 203 - linkmode_set_bit(ETHTOOL_LINK_MODE_10baseT_Full_BIT, 204 - phy->supported); 205 - } 206 - 207 - phy_advertise_supported(phy); 208 186 209 187 ret = phy_device_register(phy); 210 188 if (ret) {