aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/dsa-uclass.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/net/dsa-uclass.c b/net/dsa-uclass.c
index 88a8ea9..7898f30 100644
--- a/net/dsa-uclass.c
+++ b/net/dsa-uclass.c
@@ -272,6 +272,7 @@ static int dsa_port_probe(struct udevice *pdev)
struct dsa_port_pdata *port_pdata;
struct dsa_priv *dsa_priv;
struct udevice *master;
+ int ret;
port_pdata = dev_get_parent_plat(pdev);
dsa_priv = dev_get_uclass_priv(dev);
@@ -285,6 +286,14 @@ static int dsa_port_probe(struct udevice *pdev)
return -ENODEV;
/*
+ * Probe the master device. We depend on the master device for proper
+ * operation and we also need it for MAC inheritance below.
+ */
+ ret = device_probe(master);
+ if (ret)
+ return ret;
+
+ /*
* Inherit port's hwaddr from the DSA master, unless the port already
* has a unique MAC address specified in the environment.
*/