From: boris brezillon <b.brezillon@overkiz.com>
To: Boris BREZILLON <b.brezillon@overkiz.com>
Cc: Nick Bowler <nbowler@elliptictech.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org,
Grant Likely <grant.likely@secretlab.ca>,
Mark Brown <broonie@kernel.org>,
netdev@vger.kernel.org, "David S. Miller" <davem@davemloft.net>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [RFC PATCH] phylib: mdio: handle register/unregister/register sequence
Date: Thu, 22 Aug 2013 15:14:17 +0200 [thread overview]
Message-ID: <52160EA9.4060801@overkiz.com> (raw)
In-Reply-To: <1377174836-10569-1-git-send-email-b.brezillon@overkiz.com>
On 22/08/2013 14:33, Boris BREZILLON wrote:
> Hello,
>
> This patch is a proposal to support the register/unregister/register
> sequence on a given mdio bus.
I forgot to ask, if this limitation was made on purpose ?
In other terms: no one should ever try to register, unregister and
register again
a given mii_bus structure.
>
> 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(-)
>
next prev parent reply other threads:[~2013-08-22 13:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2013-08-22 15:27 ` Greg Kroah-Hartman
2013-08-22 15:38 ` boris brezillon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52160EA9.4060801@overkiz.com \
--to=b.brezillon@overkiz.com \
--cc=broonie@kernel.org \
--cc=davem@davemloft.net \
--cc=grant.likely@secretlab.ca \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nbowler@elliptictech.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).