]> 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)
commit345704e344f76c971091be0e53249479b624f9a0
tree61737e65b1b4518913f7543a87d07bdec3d8afe8
parentcfff81352b9e6dab0f094998b4a90bb3fb5a2014
phy: micrel: Fix finding PHY properties in MAC node.

commit dbd94939bf34 ("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: dbd94939bf34 ("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