net: ethernet: freescale: Add device "fwnode" while MDIO bus get registered
Subsystems (2)
PATCH 1/1 net: ethernet: freescale: Add device "fwnode" while MDIO bus get registered
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.
--- drivers/net/ethernet/freescale/xgmac_mdio.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/ethernet/freescale/xgmac_mdio.c +4 -0
@@ -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);
Signature · 1 line
2.7.4
Quoted 7 lines · Vikas Singh
For DT case, auto-probe of c45 devices with extended scanning in
xgmac_mdioworks 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.htmlThis change will update the "fwnode" while MDIO bus get registered and allow lookup for registered PHYs on MDIO bus from other drivers while probing.
Vikas
How are you describing the MDIO bus in ACPI? Do you have a proposed standard document for submission to UEFI?
Sorry, had to ask. Networking and ACPI is not in a good place right now, and it will need some standardization before things get better.
Andrew