[RFC PATCH] phylib: mdio: handle register/unregister/register sequence
From: Boris BREZILLON
Date: Thu Aug 22 2013 - 08:34:10 EST
Hello,
This patch is a proposal to support the register/unregister/register
sequence on a given mdio bus.
I use the register/unregister/register sequence to add a fallback when the
of_mdiobus_register (this function calls mdiobus_register with phy_mask
set to ~0) does not register any phy device (because the device tree does
not define any phy).
In this case I call mdiobus_unregister and then call mdiobus_register with
a phy_mask set to 0 to trigger a full mdio bus scan.
I'm not sure this is the right way to do it (this is why I added RFC in the
subject).
Could someone help me figuring out what I should use to implement my fallback ?
1) use the register/unregister/register sequence
2) reimplement the "for (i = 0; i < PHY_MAX_ADDR; i++)" mdiobus_scan loop
Thanks.
Best Regards,
Boris
Boris BREZILLON (1):
phylib: mdio: handle register/unregister/register sequence
drivers/net/phy/mdio_bus.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/