lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 10 Sep 2020 17:22:10 +0530
From:   Vikas Singh <>
Cc:,,, Vikas Singh <>
Subject: [PATCH] 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

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 <>
 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);

Powered by blists - more mailing lists