dpaa_eth: don't use fixed_phy_change_carrier
Subsystems (3)
PATCH 1/1 dpaa_eth: don't use fixed_phy_change_carrier
This effectively reverts 6e8b0ff1ba4c ("dpaa_eth: Add change_carrier() for Fixed PHYs"). Usage of fixed_phy_change_carrier() requires that fixed_phy_register() has been called before, directly or indirectly. And that's not the case in this driver.
--- drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 -- 1 file changed, 2 deletions(-)
drivers/net/ethernet/freescale/dpaa/dpaa_eth.c +0 -2
@@ -28,7 +28,6 @@#include <linux/percpu.h> #include <linux/dma-mapping.h> #include <linux/sort.h> -#include <linux/phy_fixed.h> #include <linux/bpf.h> #include <linux/bpf_trace.h> #include <soc/fsl/bman.h>
@@ -3150,7 +3149,6 @@ static const struct net_device_ops dpaa_ops = { .ndo_stop = dpaa_eth_stop, .ndo_tx_timeout = dpaa_tx_timeout, .ndo_get_stats64 = dpaa_get_stats64, - .ndo_change_carrier = fixed_phy_change_carrier, .ndo_set_mac_address = dpaa_set_mac_address, .ndo_validate_addr = eth_validate_addr, .ndo_set_rx_mode = dpaa_set_rx_mode,
Signature · 1 line
2.49.0
Quoted 7 lines · Heiner Kallweit
This effectively reverts
6e8b0ff1ba4c("dpaa_eth: Addchange_carrier()for Fixed PHYs"). Usage offixed_phy_change_carrier()requires thatfixed_phy_register()has been called before, directly or indirectly. And that's not the case in this driver.Signed-off-by Heiner Kallweit <[email protected]>---
Is this harmful to leave set if fixed_phy_register() is not called? If so then this could be net + a fixes tag instead of net-next.
Quoted 8 lines · Jacob Keller
Quoted 5 lines · Heiner Kallweit
This effectively reverts
6e8b0ff1ba4c("dpaa_eth: Addchange_carrier()for Fixed PHYs"). Usage offixed_phy_change_carrier()requires thatfixed_phy_register()has been called before, directly or indirectly. And that's not the case in this driver.
Quoted 7 lines
Quoted 2 lines
Signed-off-by Heiner Kallweit <[email protected]>---
Reviewed-by Jacob Keller <[email protected]>Is this harmful to leave set if
fixed_phy_register()is not called? If so then this could be net + a fixes tag instead of net-next.
It appears to be used if you echo something to /sys/class/net/eth42/carrier. It will return EINVAL.
The same will happen if you use do_set_proto_down() via rtnetlink.
Apart from the EINVAL returned to userspace, nothing bad will happen. So i don't think this needs a Fixes: tag.
Andrew
Quoted 20 lines · Andrew Lunn
Quoted 8 lines · Jacob Keller
Quoted 5 lines · Heiner Kallweit
This effectively reverts
6e8b0ff1ba4c("dpaa_eth: Addchange_carrier()for Fixed PHYs"). Usage offixed_phy_change_carrier()requires thatfixed_phy_register()has been called before, directly or indirectly. And that's not the case in this driver.Quoted 7 lines
Quoted 2 lines
Signed-off-by Heiner Kallweit <[email protected]>---
Reviewed-by Jacob Keller <[email protected]>Is this harmful to leave set if
fixed_phy_register()is not called? If so then this could be net + a fixes tag instead of net-next.It appears to be used if you echo something to
/sys/class/net/eth42/carrier. It will return EINVAL.
Quoted 6 lines
The same will happen if you use
do_set_proto_down()via rtnetlink.Apart from the EINVAL returned to userspace, nothing bad will happen. So i don't think this needs a Fixes: tag.
Andrew
Thanks! Makes sense to keep it as a net-next cleanup then.
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 8 lines · On Mon, 16 Jun 2025 23:24:05 +0200 you wrote:
This effectively reverts
6e8b0ff1ba4c("dpaa_eth: Addchange_carrier()for Fixed PHYs"). Usage offixed_phy_change_carrier()requires thatfixed_phy_register()has been called before, directly or indirectly. And that's not the case in this driver.Signed-off-by Heiner Kallweit <[email protected]>[...]
Here is the summary with links:
- [net-next] dpaa_eth: don't use fixed_phy_change_carrier
https://git.kernel.org/netdev/net-next/c/d8155c1df5c8
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html