From: Florian Fainelli <f.fainelli@gmail.com>
To: YUAN Linyu <Linyu.Yuan@alcatel-sbell.com.cn>,
"David S . Miller" <davem@davemloft.net>,
Andrew Lunn <andrew@lunn.ch>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"cugyly@163.com" <cugyly@163.com>
Subject: Re: create drivers/net/mdio and move mdio drivers into it
Date: Mon, 20 Feb 2017 14:31:26 -0800 [thread overview]
Message-ID: <119144e3-d42e-e4dd-d95d-624e4816cbe3@gmail.com> (raw)
In-Reply-To: <8729016553E3654398EA69218DA29EEF15A80800@cnshjmbx02>
On 02/19/2017 10:29 PM, YUAN Linyu wrote:
>
>
>> -----Original Message-----
>> From: Florian Fainelli [mailto:f.fainelli@gmail.com]
>> Sent: Monday, February 20, 2017 1:42 PM
>> To: YUAN Linyu; David S . Miller; Andrew Lunn
>> Cc: netdev@vger.kernel.org; cugyly@163.com
>> Subject: Re: create drivers/net/mdio and move mdio drivers into it
>>> 4. support mdio auto probe phy device.
>>
>> That's already the case, even in a Device Tree enabled system if you
>> omit to provide a "reg" property for child nodes, the bus is
>> automatically scanned.
>>
> I check of_mdiobus_registe() which not do auto scan.
> Which function should I refer?
of_mdiobus_register() does this:
/* Loop over the child nodes and register a phy_device for each
phy */
for_each_available_child_of_node(np, child) {
addr = of_mdio_parse_addr(&mdio->dev, child);
if (addr < 0) {
scanphys = true;
continue;
}
if (of_mdiobus_child_is_phy(child))
of_mdiobus_register_phy(mdio, child, addr);
else
of_mdiobus_register_device(mdio, child, addr);
}
if (!scanphys)
return 0;
It does continue with scanning the PHY child nodes which don't have a
correct "reg" property set here.
--
Florian
next prev parent reply other threads:[~2017-02-20 22:31 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-20 0:20 create drivers/net/mdio and move mdio drivers into it YUAN Linyu
2017-02-20 5:03 ` Florian Fainelli
2017-02-20 5:23 ` YUAN Linyu
2017-02-20 5:42 ` Florian Fainelli
2017-02-20 6:10 ` YUAN Linyu
2017-02-20 6:15 ` Florian Fainelli
2017-02-20 6:26 ` YUAN Linyu
2017-02-20 22:30 ` Florian Fainelli
2017-02-20 6:29 ` YUAN Linyu
2017-02-20 22:31 ` Florian Fainelli [this message]
2017-02-21 0:47 ` YUAN Linyu
2017-02-22 5:38 ` YUAN Linyu
2017-02-22 10:21 ` Andrew Lunn
2017-02-23 0:10 ` YUAN Linyu
2017-02-23 9:30 ` Andrew Lunn
2017-02-23 9:51 ` YUAN Linyu
2017-02-23 10:29 ` Andrew Lunn
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=119144e3-d42e-e4dd-d95d-624e4816cbe3@gmail.com \
--to=f.fainelli@gmail.com \
--cc=Linyu.Yuan@alcatel-sbell.com.cn \
--cc=andrew@lunn.ch \
--cc=cugyly@163.com \
--cc=davem@davemloft.net \
--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).