netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] dpaa_eth: don't use fixed_phy_change_carrier
@ 2025-06-16 21:24 Heiner Kallweit
  2025-06-16 22:47 ` Jacob Keller
  2025-06-19  1:40 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 5+ messages in thread
From: Heiner Kallweit @ 2025-06-16 21:24 UTC (permalink / raw)
  To: Andrew Lunn, Paolo Abeni, Jakub Kicinski, David Miller,
	Eric Dumazet, Simon Horman, Madalin Bucur,
	Russell King - ARM Linux
  Cc: netdev@vger.kernel.org, Joakim Tjernlund

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.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
index 23c23cca2..3edc8d142 100644
--- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
+++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
@@ -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,
-- 
2.49.0




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

* Re: [PATCH net-next] dpaa_eth: don't use fixed_phy_change_carrier
  2025-06-16 21:24 [PATCH net-next] dpaa_eth: don't use fixed_phy_change_carrier Heiner Kallweit
@ 2025-06-16 22:47 ` Jacob Keller
  2025-06-16 23:44   ` Andrew Lunn
  2025-06-19  1:40 ` patchwork-bot+netdevbpf
  1 sibling, 1 reply; 5+ messages in thread
From: Jacob Keller @ 2025-06-16 22:47 UTC (permalink / raw)
  To: Heiner Kallweit, Andrew Lunn, Paolo Abeni, Jakub Kicinski,
	David Miller, Eric Dumazet, Simon Horman, Madalin Bucur,
	Russell King - ARM Linux
  Cc: netdev@vger.kernel.org, Joakim Tjernlund



On 6/16/2025 2:24 PM, Heiner Kallweit wrote:
> 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.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> ---

Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>

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.

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

* Re: [PATCH net-next] dpaa_eth: don't use fixed_phy_change_carrier
  2025-06-16 22:47 ` Jacob Keller
@ 2025-06-16 23:44   ` Andrew Lunn
  2025-06-17 16:58     ` Jacob Keller
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Lunn @ 2025-06-16 23:44 UTC (permalink / raw)
  To: Jacob Keller
  Cc: Heiner Kallweit, Andrew Lunn, Paolo Abeni, Jakub Kicinski,
	David Miller, Eric Dumazet, Simon Horman, Madalin Bucur,
	Russell King - ARM Linux, netdev@vger.kernel.org,
	Joakim Tjernlund

On Mon, Jun 16, 2025 at 03:47:57PM -0700, Jacob Keller wrote:
> 
> 
> On 6/16/2025 2:24 PM, Heiner Kallweit wrote:
> > 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.
> > 
> > Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> > ---
> 
> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
> 
> 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

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

* Re: [PATCH net-next] dpaa_eth: don't use fixed_phy_change_carrier
  2025-06-16 23:44   ` Andrew Lunn
@ 2025-06-17 16:58     ` Jacob Keller
  0 siblings, 0 replies; 5+ messages in thread
From: Jacob Keller @ 2025-06-17 16:58 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Heiner Kallweit, Andrew Lunn, Paolo Abeni, Jakub Kicinski,
	David Miller, Eric Dumazet, Simon Horman, Madalin Bucur,
	Russell King - ARM Linux, netdev@vger.kernel.org,
	Joakim Tjernlund



On 6/16/2025 4:44 PM, Andrew Lunn wrote:
> On Mon, Jun 16, 2025 at 03:47:57PM -0700, Jacob Keller wrote:
>>
>>
>> On 6/16/2025 2:24 PM, Heiner Kallweit wrote:
>>> 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.
>>>
>>> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
>>> ---
>>
>> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
>>
>> 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

Thanks! Makes sense to keep it as a net-next cleanup then.

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

* Re: [PATCH net-next] dpaa_eth: don't use fixed_phy_change_carrier
  2025-06-16 21:24 [PATCH net-next] dpaa_eth: don't use fixed_phy_change_carrier Heiner Kallweit
  2025-06-16 22:47 ` Jacob Keller
@ 2025-06-19  1:40 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-06-19  1:40 UTC (permalink / raw)
  To: Heiner Kallweit
  Cc: andrew+netdev, pabeni, kuba, davem, edumazet, horms,
	madalin.bucur, linux, netdev, joakim.tjernlund

Hello:

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

On Mon, 16 Jun 2025 23:24:05 +0200 you wrote:
> 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.
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
> 
> [...]

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2025-06-19  1:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-16 21:24 [PATCH net-next] dpaa_eth: don't use fixed_phy_change_carrier Heiner Kallweit
2025-06-16 22:47 ` Jacob Keller
2025-06-16 23:44   ` Andrew Lunn
2025-06-17 16:58     ` Jacob Keller
2025-06-19  1:40 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).