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: <E3964CA5-5DD3-4479-B6B9-27982D1A0908@gmail.com>
Date:	Wed, 09 Dec 2015 13:40:25 -0800
From:	Florian Fainelli <f.fainelli@...il.com>
To:	Andrew Lunn <andrew@...n.ch>, David Miller <davem@...emloft.net>
CC:	netdev <netdev@...r.kernel.org>, dinguyen@...nsource.altera.com,
	david.daney@...ium.com
Subject: Re: [PATCHv2 net] phy: micrel: Fix finding PHY properties in MAC node.



On December 9, 2015 10:56:31 AM PST, Andrew Lunn <andrew@...n.ch> wrote:
>commit 8b63ec1837fa ("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@...nsource.altera.com>
>Suggested-by: David Daney <david.daney@...ium.com>
>Acked-by: David Daney <david.daney@...ium.com>
>Fixes: 8b63ec1837fa ("phylib: Make PHYs children of their MDIO bus, not
>the bus' parent.")
>Signed-off-by: Andrew Lunn <andrew@...n.ch>
>---

>-	if (!of_node && dev->parent->of_node)
>-		of_node = dev->parent->of_node;
>+	/* The Micrel driver has a deprecated option to place phy OF
>+	 * properties in the MAC node. Walk up the tree of devices to
>+	 * find a device with an OF node.
>+	 */
>+	dev_walker = &phydev->dev;
>+	do {
>+		of_node = dev_walker->of_node;
>+		dev_walker = dev_walker->parent;
>+
>+	} while (!of_node && dev_walker);

Looks good to me, can we also issuing à warning so people get a chance to update their Device Tree?

Acked-by: Florian Fainelli <f.fainelli@...il.com>
> 
> 	if (of_node) {
> 		ksz9021_load_values_from_of(phydev, of_node,

-- 
Florian
--
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