From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932777AbbJPP4w (ORCPT ); Fri, 16 Oct 2015 11:56:52 -0400 Received: from vps0.lunn.ch ([178.209.37.122]:41768 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932677AbbJPP4u (ORCPT ); Fri, 16 Oct 2015 11:56:50 -0400 Date: Fri, 16 Oct 2015 17:56:44 +0200 From: Andrew Lunn To: Dinh Nguyen Cc: Florian Fainelli , David Daney , "David S. Miller" , david.daney@cavium.com, netdev@vger.kernel.org, "linux-kernel@vger.kernel.org" Subject: Re: SoCFPGA ethernet broken Message-ID: <20151016155644.GJ10146@lunn.ch> References: <562005AD.8020903@opensource.altera.com> <56200BD7.8020505@gmail.com> <56200E15.9080603@caviumnetworks.com> <56201158.8040806@opensource.altera.com> <56201AE7.2020103@gmail.com> <20151016033143.GA28207@lunn.ch> <20151016150345.GI10146@lunn.ch> 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 > So I think I'll move to inspect what Florian had suggested, and that was to look > at: drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c::stmmac_mdio_register I have a suspicion. If you look at the phy driver it does: static int ksz9021_config_init(struct phy_device *phydev) { const struct device *dev = &phydev->dev; const struct device_node *of_node = dev->of_node; if (!of_node && dev->parent->of_node) of_node = dev->parent->of_node; In your case, you don't have a phy node in your device tree, so of_node is NULL. So it looks in the parent device. phylib: Make PHYs children of their MDIO bus, not the bus' parent. changed what the parent is. It is now the mdio device. Before, i suspect it was the MAC. Hence it found your properties in the MAC node. What i think you might want to do is change this code. Rather than look a dev->parent->of_node; you might want phydev->attached_dev->dev->of_node. This assumes the phy has been attached to the MAC. I've no idea of the ordering, so maybe it has not been attached yet? dp83867.c has similar code. However quick grep did not find any mainline users with properties in the MAC node. If that is true, i would suggest removing the code looking in the parent for that phy driver. Andrew