netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH] phylib: mdio: handle register/unregister/register sequence
@ 2013-08-22 12:33 Boris BREZILLON
  2013-08-22 12:34 ` Boris BREZILLON
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Boris BREZILLON @ 2013-08-22 12:33 UTC (permalink / raw)
  To: David S. Miller, Mark Brown, Nick Bowler, Greg Kroah-Hartman,
	Grant Likely
  Cc: netdev, linux-kernel, linux-arm-kernel, Boris BREZILLON

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-08-22 15:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-22 12:33 [RFC PATCH] phylib: mdio: handle register/unregister/register sequence Boris BREZILLON
2013-08-22 12:34 ` Boris BREZILLON
2013-08-22 12:43 ` Florian Fainelli
2013-08-22 13:05   ` boris brezillon
2013-08-22 13:15     ` Florian Fainelli
2013-08-22 13:24       ` boris brezillon
2013-08-22 13:14 ` boris brezillon
2013-08-22 15:27 ` Greg Kroah-Hartman
2013-08-22 15:38   ` boris brezillon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).