summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet
diff options
context:
space:
mode:
authorAndy Duan <fugang.duan@nxp.com>2017-02-07 14:10:54 +0800
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commita337ad6caa010185b6530ff253bfb9e5db22cfde (patch)
tree5ed0b09b37e07fdfc905e22a692043f1bba855aa /drivers/net/ethernet
parentbae4147f9c7c42cc409303b13ae9766310dd5ee7 (diff)
MLK-13893 net: fec: do defer probe when mii bus not registered
When two MACs share one mii bus, MAC driver should do defer probe when the mii bus not registered. Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r--drivers/net/ethernet/freescale/fec_main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index e7b351543a52..f280f921498f 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -2103,6 +2103,8 @@ static int fec_enet_mii_init(struct platform_device *pdev)
if (node) {
err = of_mdiobus_register(fep->mii_bus, node);
of_node_put(node);
+ } else if (fep->phy_node) {
+ err = -EPROBE_DEFER;
} else {
err = mdiobus_register(fep->mii_bus);
}
@@ -3631,8 +3633,10 @@ fec_probe(struct platform_device *pdev)
init_completion(&fep->mdio_done);
ret = fec_enet_mii_init(pdev);
- if (ret)
+ if (ret) {
+ dev_id = 0;
goto failed_mii_init;
+ }
/* Carrier starts down, phylib will bring it up */
netif_carrier_off(ndev);