summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorSiddharth Vadapalli <[email protected]>2025-11-21 18:51:53 +0530
committerTom Rini <[email protected]>2025-11-27 09:27:03 -0600
commitcc0ce9e8c494d20e75258584807aaaac4cc514bd (patch)
tree8ffdb627ed9fd61b1574f5747921dd9dc673c692 /drivers
parente3b7dd93d39e1c0a6bcf95d13b3ac4e8035c5db2 (diff)
net: ti: am65-cpsw-nuss: Ignore disabled ethernet ports
Currently, the bind callback of the driver namely am65_cpsw_nuss_bind() registers all ethernet ports including the ones that have been disabled in the device-tree. Since the ports that have been disabled are ought to be ignored, fix the implementation to register only the enabled ports as indicated by their 'status' in their respective device-tree node. Fixes: 3943531a5468 ("net: ti: am65-cpsw-nuss: Define bind method for CPSW driver") Reported-by: Wadim Egorov <[email protected]> Closes: https://patch.msgid.link/[email protected] Signed-off-by: Siddharth Vadapalli <[email protected]>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ti/am65-cpsw-nuss.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ti/am65-cpsw-nuss.c b/drivers/net/ti/am65-cpsw-nuss.c
index 7a88f76fd09..84a3e44ecbc 100644
--- a/drivers/net/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ti/am65-cpsw-nuss.c
@@ -819,6 +819,10 @@ static int am65_cpsw_nuss_bind(struct udevice *dev)
ofnode_for_each_subnode(node, ports_np) {
const char *node_name;
+ /* Ignore disabled ports */
+ if (!ofnode_is_enabled(node))
+ continue;
+
node_name = ofnode_get_name(node);
ret = device_bind_driver_to_node(dev, "am65_cpsw_nuss_port", node_name, node,