From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH v3 net 1/1] net: macb: Fix regression breaking non-MDIO fixed-link PHYs Date: Sat, 25 Aug 2018 17:31:02 -0700 (PDT) Message-ID: <20180825.173102.333761398996346302.davem@davemloft.net> References: <20180821153548.11223-1-a.fatoum@pengutronix.de> <20180821153548.11223-2-a.fatoum@pengutronix.de> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: andrew@lunn.ch, nicolas.ferre@microchip.com, kernel@pengutronix.de, netdev@vger.kernel.org, mdf@kernel.org, brad.mouring@ni.com, f.fainelli@gmail.com To: a.fatoum@pengutronix.de Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:60596 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725751AbeHZELo (ORCPT ); Sun, 26 Aug 2018 00:11:44 -0400 In-Reply-To: <20180821153548.11223-2-a.fatoum@pengutronix.de> Sender: netdev-owner@vger.kernel.org List-ID: From: Ahmad Fatoum Date: Tue, 21 Aug 2018 17:35:48 +0200 > commit 739de9a1563a ("net: macb: Reorganize macb_mii bringup") broke > initializing macb on the EVB-KSZ9477 eval board. > There, of_mdiobus_register was called even for the fixed-link representing > the RGMII-link to the switch with the result that the driver attempts to > enumerate PHYs on a non-existent MDIO bus: > > libphy: MACB_mii_bus: probed > mdio_bus f0028000.ethernet-ffffffff: fixed-link has invalid PHY address > mdio_bus f0028000.ethernet-ffffffff: scan phy fixed-link at address 0 > [snip] > mdio_bus f0028000.ethernet-ffffffff: scan phy fixed-link at address 31 > > The "MDIO" bus registration succeeds regardless, having claimed the reset GPIO, > and calling of_phy_register_fixed_link later on fails because it tries > to claim the same GPIO: > > macb f0028000.ethernet: broken fixed-link specification > > Fix this by registering the fixed-link before calling mdiobus_register. > > Fixes: 739de9a1563a ("net: macb: Reorganize macb_mii bringup") > Signed-off-by: Ahmad Fatoum Applied and queued up for -stable, thanks.