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] [day] [month] [year] [list]
Date:	Thu, 08 May 2014 09:40:18 +0200
From:	Daniel Mack <daniel@...que.org>
To:	Florian Fainelli <f.fainelli@...il.com>
CC:	David Miller <davem@...emloft.net>,
	netdev <netdev@...r.kernel.org>,
	Grant Likely <grant.likely@...aro.org>,
	Rob Herring <robh+dt@...nel.org>,
	Mugunthan V N <mugunthanvnm@...com>
Subject: Re: [PATCH] net: mdio: of_mdio: check for already registered phy
 before creating new instances

Hi Florian,

On 05/07/2014 07:26 PM, Florian Fainelli wrote:
> 2014-05-07 9:01 GMT-07:00 Daniel Mack <zonque@...il.com>:

>> Another solution would be to split mdiobus_register() and
>> create a mdiobus_register_noscan() or something, and then call that from
>> of_mdiobus_register().
> 
> That, or have a specific MDIO bus controller node boolean property
> such as  "mdio-bus-autoscan" or something similar which will tell
> of_mdiobus_register() not to override the phy_mask since the MDIO bus
> controller is capable of auto-detecting the PHYs present.
> 
> This should not be too controversial as we should really be describing
> a feature of the hardware here.

Hmm. Actually, we can't easily disable autoscanning for DT boards, with
or without the opt-in via "mdio-bus-autoscan", because that would force
all DT users to at least add this property, or add the sub-nodes
explicitly. Also, with "mdio-bus-autoscan", sub-nodes of the bus would
not be linked to the drivers' of_node pointer, which is confusing.

>From a DT user point of view, I believe that the behaviour with my patch
applied is most convenient: if sub-nodes are given, and their 'reg'
properties match the addresses of auto-probed phys, they are linked to
the existing instances, so their properties can be used by the drivers.
The only nasty detail is that, as the code stands, dev->of_node is not
available at the phy driver's .probe() callback but earliest in
.config_init().

I'll see if I find a nicer implementation.


Thanks,
Daniel

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ