[PATCH] net: Fix ucc_geth.c handling of phy 'interface' property.

Scott Wood scottwood at freescale.com
Tue Apr 28 03:36:06 EST 2009


On Mon, Apr 27, 2009 at 09:36:13AM -0600, Grant Likely wrote:
> From: Grant Likely <grant.likely at secretlab.ca>
> 
> Previous rework to ucc_geth.c to add of_mdio support (net: Rework
> ucc_geth driver to use of_mdio infrastructure) added a block of
> code which broke older openfirmware device trees which use an
> 'interface' property in the phy node to describe the connection
> between the MAC and the PHY.  This patch removes the offending blurb.
[snip]
>  	prop = of_get_property(np, "phy-connection-type", NULL);
>  	if (!prop) {
>  		/* handle interface property present in old trees */
> -		if (!phy)
> -			return -ENODEV;
> -
>  		prop = of_get_property(phy, "interface", NULL);
>  		if (prop != NULL) {
>  			phy_interface = enet_to_phy_interface[*prop];

The above test only makes a difference when there is no phy node -- so I
don't see how it was breaking device trees that had a phy node (with or
without an "interface" property).  I can see it breaking fixed link
device trees, though.

-Scott



More information about the Linuxppc-dev mailing list