Re: [PATCH] net: Phy: Add PHY lookup support on MDIO bus in case of ACPI probe
From: Florian Fainelli <f.fainelli@gmail.com>
Date: 2020-08-01 05:08:44
On 7/31/2020 9:53 PM, Vikas Singh wrote:
Hi Andrew, As i have already mentioned that this patch is based on https://www.spinics.net/lists/netdev/msg662173.html, <https://www.spinics.net/lists/netdev/msg662173.html> When MDIO bus gets registered itself along with devices on it , the function mdiobus_register() inside of_mdiobus_register(), brings up all the PHYs on the mdio bus and attach them to the bus with the help of_mdiobus_link_mdiodev() inside mdiobus_scan() . Additionally it has been discussed with the maintainers that the mdiobus_register() function should be capable of handling both ACPI & DTB stuff without any change to existing implementation. Now of_mdiobus_link_mdiodev() inside mdiobus_scan() see if the auto-probed phy has a corresponding child in the bus node, and set the "of_node" pointer in DT case. But lacks to set the "fwnode" pointer in ACPI case which is resulting in mdiobus_register() failure as an end result theoretically. Now this patch set (changes) will attempt to fill this gap and generalise the mdiobus_register() implementation for both ACPI & DT with no duplicacy or redundancy.
Please reply in plain text and do not top-post, thank you. -- Florian