For DT case, auto-probe of c45 devices with extended scanning in xgmac_mdio works well but scanning and registration of these devices (PHY's) fails in case of ACPI mainly because of MDIO bus "fwnode" is not set appropriately. This patch is based on https://www.spinics.net/lists/netdev/msg662173.html
This change will update the "fwnode" while MDIO bus get registered and allow lookup for registered PHYs on MDIO bus from other drivers while probing. Signed-off-by: Vikas Singh <vikas.si...@puresoftware.com> --- drivers/net/ethernet/freescale/xgmac_mdio.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/freescale/xgmac_mdio.c b/drivers/net/ethernet/freescale/xgmac_mdio.c index 98be51d..8217d17 100644 --- a/drivers/net/ethernet/freescale/xgmac_mdio.c +++ b/drivers/net/ethernet/freescale/xgmac_mdio.c @@ -268,6 +268,10 @@ static int xgmac_mdio_probe(struct platform_device *pdev) bus->read = xgmac_mdio_read; bus->write = xgmac_mdio_write; bus->parent = &pdev->dev; + + if (!is_of_node(pdev->dev.fwnode)) + bus->dev.fwnode = bus->parent->fwnode; + bus->probe_capabilities = MDIOBUS_C22_C45; snprintf(bus->id, MII_BUS_ID_SIZE, "%pa", &res->start); -- 2.7.4