Messages in this thread | | | Date | Thu, 28 Apr 2016 10:07:05 -0500 | From | Josh Cartwright <> | Subject | Re: [PATCH] net: macb: do not scan PHYs manually |
| |
On Thu, Apr 28, 2016 at 09:19:47AM -0500, Nathan Sullivan wrote: > Since of_mdiobus_register and mdiobus_register will scan automatically,
This is only partially true. of_mdiobus_register() only scans for PHYs with device tree presence (starting with nodes which specify an address, then continuing for nodes without an address specifier).
So, this patch will regress any platform currently relying on a PHY being found/probed even though it has no representation as a device tree node. I don't have enough history with this driver to make a judgement as to whether or not there are any users of this functionality.
> do not manually scan for PHY devices in the macb ethernet driver. Doing > so will result in many nonexistent PHYs on the MDIO bus if the MDIO > lines are floating or grounded, such as when they are not used.
Just a restatement/elaboration of the problem in an attempt to provide more context:
The assumption being made is that the phy associated with a given macb instance exists on that instance's controlled mdio bus. This assumption doesn't hold true on some dual-ethernet Zynq 7000-series based designs where both phys exist on the same MDIO bus (for pinning reasons, or whatever).
MDIO macb0 ----+----- phy0, addrX | +----- phy1, addrY
macb1 ----- {MDIO lines NC, not pinmuxed}
(In this case, the phy associated with macb1 is phy1, which exists on the MDIO bus controlled by the macb0 instance).
HTH,
Josh [unhandled content-type:application/pgp-signature] | |