summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorPhil Reid <preid@electromag.com.au>2016-03-15 08:34:33 +0100
committerDavid S. Miller <davem@davemloft.net>2016-03-18 23:29:23 +0100
commitcc2fa619a738a052eb90ccbbbc48947a2e2aa1d3 (patch)
tree2c0ec8b1a3fed9a3876dd55e8f6283a70d37d499 /drivers/net
parentmediatek: unlock on error in mtk_tx_map() (diff)
downloadlinux-cc2fa619a738a052eb90ccbbbc48947a2e2aa1d3.tar.xz
linux-cc2fa619a738a052eb90ccbbbc48947a2e2aa1d3.zip
net: stmmac: Don't search for phys if mdio node is defined.
If a dt mdio entry has been added least assume that we wont search for phys attached. The DT and of_mdiobus_register already do this. This stops DSA phys being found and phys created for them, as this is handled by the DSA driver. Signed-off-by: Phil Reid <preid@electromag.com.au> Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
index efb54f356a67..ea76129dafc2 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
@@ -243,6 +243,9 @@ int stmmac_mdio_register(struct net_device *ndev)
goto bus_register_fail;
}
+ if (priv->plat->phy_node || mdio_node)
+ goto bus_register_done;
+
found = 0;
for (addr = 0; addr < PHY_MAX_ADDR; addr++) {
struct phy_device *phydev = mdiobus_get_phy(new_bus, addr);
@@ -298,6 +301,7 @@ int stmmac_mdio_register(struct net_device *ndev)
return -ENODEV;
}
+bus_register_done:
priv->mii = new_bus;
return 0;