From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754394AbcBNXVe (ORCPT ); Sun, 14 Feb 2016 18:21:34 -0500 Received: from mail.pqgruber.com ([178.189.19.235]:35723 "EHLO mail.pqgruber.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753028AbcBNXVa (ORCPT ); Sun, 14 Feb 2016 18:21:30 -0500 Date: Mon, 15 Feb 2016 00:21:26 +0100 From: Clemens Gruber To: Andrew Lunn Cc: netdev@vger.kernel.org, Florian Fainelli , linux-kernel@vger.kernel.org, "David S . Miller" Subject: Re: [PATCH] phy: marvell: Fix reg-init bug on 88E1510 Message-ID: <20160214232125.GA17835@archie.tuxnet.lan> References: <1455481885-11395-1-git-send-email-clemens.gruber@pqgruber.com> <20160214204822.GB4802@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160214204822.GB4802@lunn.ch> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 14, 2016 at 09:48:22PM +0100, Andrew Lunn wrote: > On Sun, Feb 14, 2016 at 09:31:25PM +0100, Clemens Gruber wrote: > > The function marvell_of_reg_init was called too late, in > > m88e1510_config_aneg. This function was not reached, due to the phy > > state machine being stuck at waiting for interrupts (which were not > > enabled and off by default on the 88E1510) > > It lead to the ethernet link not coming up at boot. > > > > This commit moves the call of marvell_of_reg_init to config_init. > > Now, a marvell,reg-init option to enable PHY interrupts on pin LED[2] is > > set early on and the phy state machine does not get stuck anymore. > > Tested on i.MX6Q boards with Marvell 88E1510 PHYs. > > This looks like a good fix for you board. But maybe we should look at > the bigger picture. How about calling your new > > > +static int m88e1510_config_init(struct phy_device *phydev) > > +{ > > + int err; > > + > > + err = marvell_of_reg_init(phydev); > > + if (err < 0) > > + return err; > > + > > + return 0; > > +} > > marvell_config_init() and adding it to all PHYs which don't have a > specific config_init function. > > We then get more consistent behaviour across Marvell PHYs. Sounds good. I'll send a new patch tomorrow! Thanks, Clemens