mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net-next] net: ti: icssg_prueth: populate netdev of_node
@ 2024-08-07 12:12 Matthias Schiffer
  2024-08-07 12:13 ` MD Danish Anwar
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Matthias Schiffer @ 2024-08-07 12:12 UTC (permalink / raw)
  To: MD Danish Anwar, Roger Quadros, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: linux-arm-kernel, netdev, linux-kernel, linux, Matthias Schiffer

Allow of_find_net_device_by_node() to find icssg_prueth ports and make
the individual ports' of_nodes available in sysfs.

Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
---

Tested on a TI AM64x SoC. I don't have a device using the icssg_prueth_sr1
variant of the driver, but as this part of icssg_prueth.c and
icssg_prueth_sr1.c is identical, it seems like a good idea to make the
same change in both variants.

 drivers/net/ethernet/ti/icssg/icssg_prueth.c     | 1 +
 drivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/ti/icssg/icssg_prueth.c b/drivers/net/ethernet/ti/icssg/icssg_prueth.c
index 9dc9de39bb8f0..53a3e44b99a20 100644
--- a/drivers/net/ethernet/ti/icssg/icssg_prueth.c
+++ b/drivers/net/ethernet/ti/icssg/icssg_prueth.c
@@ -857,6 +857,7 @@ static int prueth_netdev_init(struct prueth *prueth,
 	}
 	ether_addr_copy(emac->mac_addr, ndev->dev_addr);
 
+	ndev->dev.of_node = eth_node;
 	ndev->min_mtu = PRUETH_MIN_PKT_SIZE;
 	ndev->max_mtu = PRUETH_MAX_MTU;
 	ndev->netdev_ops = &emac_netdev_ops;
diff --git a/drivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c b/drivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c
index 54b7e27608ce8..292f04d29f4f7 100644
--- a/drivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c
+++ b/drivers/net/ethernet/ti/icssg/icssg_prueth_sr1.c
@@ -847,6 +847,7 @@ static int prueth_netdev_init(struct prueth *prueth,
 	}
 	ether_addr_copy(emac->mac_addr, ndev->dev_addr);
 
+	ndev->dev.of_node = eth_node;
 	ndev->min_mtu = PRUETH_MIN_PKT_SIZE;
 	ndev->max_mtu = PRUETH_MAX_MTU;
 	ndev->netdev_ops = &emac_netdev_ops;
-- 
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
https://www.tq-group.com/


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

* Re: [PATCH net-next] net: ti: icssg_prueth: populate netdev of_node
  2024-08-07 12:12 [PATCH net-next] net: ti: icssg_prueth: populate netdev of_node Matthias Schiffer
@ 2024-08-07 12:13 ` MD Danish Anwar
  2024-08-07 13:35 ` Andrew Lunn
  2024-08-09  3:30 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: MD Danish Anwar @ 2024-08-07 12:13 UTC (permalink / raw)
  To: Matthias Schiffer, Roger Quadros, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni
  Cc: linux-arm-kernel, netdev, linux-kernel, linux



On 07/08/24 5:42 pm, Matthias Schiffer wrote:
> Allow of_find_net_device_by_node() to find icssg_prueth ports and make
> the individual ports' of_nodes available in sysfs.
> 
> Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>

Reviewed-by: MD Danish Anwar <danishanwar@ti.com>

-- 
Thanks and Regards,
Danish

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

* Re: [PATCH net-next] net: ti: icssg_prueth: populate netdev of_node
  2024-08-07 12:12 [PATCH net-next] net: ti: icssg_prueth: populate netdev of_node Matthias Schiffer
  2024-08-07 12:13 ` MD Danish Anwar
@ 2024-08-07 13:35 ` Andrew Lunn
  2024-08-09  3:30 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2024-08-07 13:35 UTC (permalink / raw)
  To: Matthias Schiffer
  Cc: MD Danish Anwar, Roger Quadros, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, linux-arm-kernel, netdev,
	linux-kernel, linux

On Wed, Aug 07, 2024 at 02:12:15PM +0200, Matthias Schiffer wrote:
> Allow of_find_net_device_by_node() to find icssg_prueth ports and make
> the individual ports' of_nodes available in sysfs.
> 
> Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

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

* Re: [PATCH net-next] net: ti: icssg_prueth: populate netdev of_node
  2024-08-07 12:12 [PATCH net-next] net: ti: icssg_prueth: populate netdev of_node Matthias Schiffer
  2024-08-07 12:13 ` MD Danish Anwar
  2024-08-07 13:35 ` Andrew Lunn
@ 2024-08-09  3:30 ` patchwork-bot+netdevbpf
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-08-09  3:30 UTC (permalink / raw)
  To: Matthias Schiffer
  Cc: danishanwar, rogerq, davem, edumazet, kuba, pabeni,
	linux-arm-kernel, netdev, linux-kernel, linux

Hello:

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

On Wed,  7 Aug 2024 14:12:15 +0200 you wrote:
> Allow of_find_net_device_by_node() to find icssg_prueth ports and make
> the individual ports' of_nodes available in sysfs.
> 
> Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
> ---
> 
> Tested on a TI AM64x SoC. I don't have a device using the icssg_prueth_sr1
> variant of the driver, but as this part of icssg_prueth.c and
> icssg_prueth_sr1.c is identical, it seems like a good idea to make the
> same change in both variants.
> 
> [...]

Here is the summary with links:
  - [net-next] net: ti: icssg_prueth: populate netdev of_node
    https://git.kernel.org/netdev/net-next/c/eb3ab13d997a

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] 4+ messages in thread

end of thread, other threads:[~2024-08-09  3:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-07 12:12 [PATCH net-next] net: ti: icssg_prueth: populate netdev of_node Matthias Schiffer
2024-08-07 12:13 ` MD Danish Anwar
2024-08-07 13:35 ` Andrew Lunn
2024-08-09  3:30 ` 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

all inboxes | Powered by JetHome®