]> git.baikalelectronics.ru Git - kernel.git/commit
phy: micrel: Fix finding PHY properties in MAC node.
authorAndrew Lunn <andrew@lunn.ch>
Wed, 9 Dec 2015 18:56:31 +0000 (19:56 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 12 Dec 2015 01:31:15 +0000 (20:31 -0500)
commitf16313d0285420d534c037c8fe916da6bc5a0185
tree61737e65b1b4518913f7543a87d07bdec3d8afe8
parent55542b51865494a52f73b0b4f1d8aca68d932a62
phy: micrel: Fix finding PHY properties in MAC node.

commit fd221174a958 ("phylib: Make PHYs children of their MDIO bus,
not the bus' parent.")  changed the parenting of PHY devices, making
them a child of the MDIO bus, instead of the MAC device. This broken
the Micrel PHY driver which has a deprecated feature of allowing PHY
properties to be placed into the MAC node.

In order to find the MAC node, we need to walk up the tree of devices
until we find one with an OF node attached.

Reported-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Suggested-by: David Daney <david.daney@cavium.com>
Acked-by: David Daney <david.daney@cavium.com>
Fixes: fd221174a958 ("phylib: Make PHYs children of their MDIO bus, not the bus' parent.")
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/micrel.c