Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754248AbbLVLGh (ORCPT ); Tue, 22 Dec 2015 06:06:37 -0500 Received: from vps0.lunn.ch ([178.209.37.122]:47768 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751765AbbLVLGg (ORCPT ); Tue, 22 Dec 2015 06:06:36 -0500 Date: Tue, 22 Dec 2015 12:06:34 +0100 From: Andrew Lunn To: Henri Roosen , David Miller Cc: f.fainelli@gmail.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] phy: micrel: Fix finding PHY properties in MAC node for KSZ9031. Message-ID: <20151222110634.GC2373@lunn.ch> References: <1450781920-26912-1-git-send-email-henri.roosen@ginzinger.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1450781920-26912-1-git-send-email-henri.roosen@ginzinger.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2326 Lines: 66 On Tue, Dec 22, 2015 at 11:58:40AM +0100, Henri Roosen wrote: > Commit 651df2183543 ("phy: micrel: Fix finding PHY properties in MAC > node.") only fixes finding PHY properties in MAC node for KSZ9021. This > commit applies the same fix for KSZ9031. > > Signed-off-by: Henri Roosen Fixes: 8b63ec1837fa ("phylib: Make PHYs children of their MDIO bus, not the bus' parent.") Acked-by: Andrew Lunn Andrew > --- > drivers/net/phy/micrel.c | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c > index e13ad6c..fc6c058 100644 > --- a/drivers/net/phy/micrel.c > +++ b/drivers/net/phy/micrel.c > @@ -470,9 +470,18 @@ static int ksz9031_config_init(struct phy_device *phydev) > "txd2-skew-ps", "txd3-skew-ps" > }; > static const char *control_skews[2] = {"txen-skew-ps", "rxdv-skew-ps"}; > + const struct device *dev_walker; > > - 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); > > if (of_node) { > ksz9031_of_load_skew_values(phydev, of_node, > -- > 2.1.4 > > > ________________________________ > > Ginzinger electronic systems GmbH > Gewerbegebiet Pirath 16 > 4952 Weng im Innkreis > www.ginzinger.com > > Firmenbuchnummer: FN 364958d > Firmenbuchgericht: Ried im Innkreis > UID-Nr.: ATU66521089 > > ________________________________ > *** WEIHNACHTSURLAUB VON DONNERSTAG, DEN 24. DEZEMBER 2015 BIS MITTWOCH, DEN 6. JAENNER 2016 *** > *** CHRISTMAS VACATION FROM THURSDAY, THE 24 DECEMBER 2015 TO WEDNESDAY, 6 JANUARY 2016 *** -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/