All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net: phy: fixed_phy: remove setting supported/advertised modes from fixed_phy_register
@ 2025-11-12 21:06 Heiner Kallweit
  2025-11-18  1:10 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Heiner Kallweit @ 2025-11-12 21:06 UTC (permalink / raw)
  To: Russell King - ARM Linux, Andrew Lunn, Paolo Abeni,
	Jakub Kicinski, David Miller, Eric Dumazet
  Cc: netdev@vger.kernel.org

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>
---
 drivers/net/phy/fixed_phy.c | 24 ------------------------
 1 file changed, 24 deletions(-)

diff --git a/drivers/net/phy/fixed_phy.c b/drivers/net/phy/fixed_phy.c
index 715f0356f..1ad77f542 100644
--- a/drivers/net/phy/fixed_phy.c
+++ b/drivers/net/phy/fixed_phy.c
@@ -19,7 +19,6 @@
 #include <linux/of.h>
 #include <linux/idr.h>
 #include <linux/netdevice.h>
-#include <linux/linkmode.h>
 
 #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);
-- 
2.51.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] net: phy: fixed_phy: remove setting supported/advertised modes from fixed_phy_register
  2025-11-12 21:06 [PATCH net-next] net: phy: fixed_phy: remove setting supported/advertised modes from fixed_phy_register Heiner Kallweit
@ 2025-11-18  1:10 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-11-18  1:10 UTC (permalink / raw)
  To: Heiner Kallweit; +Cc: linux, andrew, pabeni, kuba, davem, edumazet, netdev

Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 12 Nov 2025 22:06:13 +0100 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - [net-next] net: phy: fixed_phy: remove setting supported/advertised modes from fixed_phy_register
    https://git.kernel.org/netdev/net-next/c/5860bb1ce0dd

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-11-18  1:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-12 21:06 [PATCH net-next] net: phy: fixed_phy: remove setting supported/advertised modes from fixed_phy_register Heiner Kallweit
2025-11-18  1:10 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.