diff mbox series

[net-next] net: ti: icssg_prueth: populate netdev of_node

Message ID 20240807121215.3178964-1-matthias.schiffer@ew.tq-group.com (mailing list archive)
State Accepted
Commit eb3ab13d997a2f12ec9d557b6ae2aea4e28e2bc3
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: ti: icssg_prueth: populate netdev of_node | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 7 this patch: 7
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers warning 1 maintainers not CCed: diogo.ivo@siemens.com
netdev/build_clang success Errors and warnings before: 7 this patch: 7
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 7 this patch: 7
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 14 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-08-08--03-00 (tests: 705)

Commit Message

Matthias Schiffer Aug. 7, 2024, 12:12 p.m. UTC
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(+)

Comments

MD Danish Anwar Aug. 7, 2024, 12:13 p.m. UTC | #1
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>
Andrew Lunn Aug. 7, 2024, 1:35 p.m. UTC | #2
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
patchwork-bot+netdevbpf@kernel.org Aug. 9, 2024, 3:30 a.m. UTC | #3
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!
diff mbox series

Patch

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;