lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8729016553E3654398EA69218DA29EEF15A81861@cnshjmbx02>
Date:   Wed, 22 Feb 2017 05:38:49 +0000
From:   YUAN Linyu <Linyu.Yuan@...atel-sbell.com.cn>
To:     Florian Fainelli <f.fainelli@...il.com>,
        "David S . Miller" <davem@...emloft.net>,
        Andrew Lunn <andrew@...n.ch>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "cugyly@....com" <cugyly@....com>
Subject: RE: create drivers/net/mdio and move mdio drivers into it

Hi Florian,

1. 
Let's go back to original topic,
Can we move all mdio dirvers into drivers/net/mdio ?
Last time you said half convinced.
If you insist not do it, l will follow your decision.

2.
Per may understanding, 
I don't know why create a struct mii_bus instance to represent a mdio device in current mdio driver.
Why not create a struct mdio_device instance, it's easy to understand.
(We can move part of member of mii_bus to mdio_device).

Then in mdio layer, there will mdio_device and mdio_driver.

Other module(dsa) base on mdio should not register mdio_driver directly.


thanks

> -----Original Message-----
> From: Florian Fainelli [mailto:f.fainelli@...il.com]
> Sent: Tuesday, February 21, 2017 6:31 AM
> To: YUAN Linyu; David S . Miller; Andrew Lunn
> Cc: netdev@...r.kernel.org; cugyly@....com
> Subject: Re: create drivers/net/mdio and move mdio drivers into it
> 
> 
> 
> On 02/19/2017 10:29 PM, YUAN Linyu wrote:
> >
> >
> >> -----Original Message-----
> >> From: Florian Fainelli [mailto:f.fainelli@...il.com]
> >> Sent: Monday, February 20, 2017 1:42 PM
> >> To: YUAN Linyu; David S . Miller; Andrew Lunn
> >> Cc: netdev@...r.kernel.org; cugyly@....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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ