From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-gx0-f172.google.com (mail-gx0-f172.google.com [209.85.217.172]) by ozlabs.org (Postfix) with ESMTP id 50A25DDF05 for ; Tue, 28 Apr 2009 23:37:39 +1000 (EST) Received: by gxk20 with SMTP id 20so1080112gxk.9 for ; Tue, 28 Apr 2009 06:37:37 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20090428.021203.74435054.davem@davemloft.net> References: <20090427153612.5108.10877.stgit@localhost.localdomain> <20090427173606.GA10292@ld0162-tx32.am.freescale.net> <20090428.021203.74435054.davem@davemloft.net> From: Grant Likely Date: Tue, 28 Apr 2009 07:37:16 -0600 Message-ID: Subject: Re: [PATCH] net: Fix ucc_geth.c handling of phy 'interface' property. To: David Miller Content-Type: text/plain; charset=ISO-8859-1 Cc: Joakim.Tjernlund@transmode.se, linuxppc-dev@ozlabs.org, afleming@freescale.com, netdev@vger.kernel.org, scottwood@freescale.com List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue, Apr 28, 2009 at 3:12 AM, David Miller wrote: > From: Grant Likely > Date: Mon, 27 Apr 2009 11:50:20 -0600 > >> On Mon, Apr 27, 2009 at 11:36 AM, Scott Wood w= rote: >>> On Mon, Apr 27, 2009 at 09:36:13AM -0600, Grant Likely wrote: >>>> From: Grant Likely >>>> >>>> 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. =A0This patch removes the offending blurb= . >>> [snip] >>>> =A0 =A0 =A0 prop =3D of_get_property(np, "phy-connection-type", NULL); >>>> =A0 =A0 =A0 if (!prop) { >>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* handle interface property present in ol= d trees */ >>>> - =A0 =A0 =A0 =A0 =A0 =A0 if (!phy) >>>> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 return -ENODEV; >>>> - >>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 prop =3D of_get_property(phy, "interface",= NULL); >>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 if (prop !=3D NULL) { >>>> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 phy_interface =3D 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). =A0I can see it breaking fixed link >>> device trees, though. >> >> Sorry, you're right. =A0I got myself confused when I was writing the >> description. =A0This patch fixes breakage when using a fixed-link and >> there is no phy-connection-type property. > > Patch applied with commit message fixed up. Thanks David g. --=20 Grant Likely, B.Sc., P.Eng. Secret Lab Technologies Ltd.