From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932765AbbJPTjD (ORCPT ); Fri, 16 Oct 2015 15:39:03 -0400 Received: from vps0.lunn.ch ([178.209.37.122]:41943 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932508AbbJPTjB (ORCPT ); Fri, 16 Oct 2015 15:39:01 -0400 Date: Fri, 16 Oct 2015 21:38:54 +0200 From: Andrew Lunn To: Dinh Nguyen Cc: David Daney , Florian Fainelli , "David S. Miller" , david.daney@cavium.com, netdev@vger.kernel.org, "linux-kernel@vger.kernel.org" Subject: Re: SoCFPGA ethernet broken Message-ID: <20151016193854.GC28207@lunn.ch> References: <56201158.8040806@opensource.altera.com> <56201AE7.2020103@gmail.com> <20151016033143.GA28207@lunn.ch> <20151016150345.GI10146@lunn.ch> <20151016155644.GJ10146@lunn.ch> <56212A09.5080206@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 > > Maybe we need to walk up the hierarchy. > > > > Perhaps something like: > > > > const struct device *dev_walker; > > > > dev_walker = &phydev->dev; > > do { > > of_node = dev_walker->of_node; > > dev_walker = dev_walker->parent; > > } while (!of_node && dev_walker); > > > > The above code seems to have fixed the issue. What i don't like about this is that it allows you to put these properties in the mdio device node. These are phy properties, not mdio properties.... If phydev->attached_dev->dev->of_node works, that would be my preference. Andrew