net: dsa: probe master device
authorMichael Walle <michael@walle.cc>
Wed, 24 Feb 2021 16:40:40 +0000 (17:40 +0100)
committerPriyanka Jain <priyanka.jain@nxp.com>
Fri, 5 Mar 2021 04:55:42 +0000 (10:25 +0530)
commite5d7d119287ed1bc867e77225660c1ac9bb51072
tree5658910da0c5b80f7063cc43eae17b099e31e71c
parenta02dcbbb5a8e24a3f6cd3e7f158e1953b82d5e2e
net: dsa: probe master device

DSA needs to have the master device probed first for MAC inheritance.
Until now, it only works by chance because the only user (LS1028A SoC)
will probe the master device first. The probe order is given by the PCI
device ordering, thus it works because the master device has a "smaller"
BDF then the switch device.

Explicitly probe the master device in dsa_port_probe().

Fixes: fc054d563bfb ("net: Introduce DSA class for Ethernet switches")
Signed-off-by: Michael Walle <michael@walle.cc>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
net/dsa-uclass.c