From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DCEE7C433DF for ; Fri, 9 Oct 2020 00:51:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7199C22256 for ; Fri, 9 Oct 2020 00:51:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602204688; bh=190OkmOlV4NKcZKO680wP/wd4PHuciGQoJFi1Ef5OMU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=Jnh5YscRNxhACYT6Y0WVwsFQTSS4NiowQVARNkzqEsg0Tb3r2Sh7mqyiCqCTU9LiE /OokPOLHrIwVyc6gDEcw0aM2SHke4cV89p3EN8/xBABPKHVlSfwYwsGCS/3G4f+S/m A4n5cK31bwDYoEsQGiJAKCGhMugzRLO67HaOOza0= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729822AbgJIAv1 (ORCPT ); Thu, 8 Oct 2020 20:51:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:39568 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725979AbgJIAv1 (ORCPT ); Thu, 8 Oct 2020 20:51:27 -0400 Received: from kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com (unknown [163.114.132.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 61AFD22254; Fri, 9 Oct 2020 00:51:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1602204686; bh=190OkmOlV4NKcZKO680wP/wd4PHuciGQoJFi1Ef5OMU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=szMeBv0QHMNBQhfY2erGzJ9KOS1fpV/MevFqqnFDGgKg9omeI21rzTEO1M2AAsrXz v1II0e+03aP7UyApQTznqoKbG4TFlg0rAbPnoM8OtIo30ewPbQ20UyuUO/EZOcPTEz LcxgyBGR5BP9/Favfzo7c7ywztsckBgDDq9qm/YE= Date: Thu, 8 Oct 2020 17:51:24 -0700 From: Jakub Kicinski To: Marek Vasut Cc: netdev@vger.kernel.org, Andrew Lunn , Richard Leitner , Christoph Niedermaier , "David S . Miller" , NXP Linux Team , Shawn Guo Subject: Re: [PATCH][RESEND] net: fec: Fix PHY init after phy_reset_after_clk_enable() Message-ID: <20201008175124.08f3fe5e@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20201006135253.97395-1-marex@denx.de> References: <20201006135253.97395-1-marex@denx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, 6 Oct 2020 15:52:53 +0200 Marek Vasut wrote: > The phy_reset_after_clk_enable() does a PHY reset, which means the PHY > loses its register settings. The fec_enet_mii_probe() starts the PHY > and does the necessary calls to configure the PHY via PHY framework, > and loads the correct register settings into the PHY. Therefore, > fec_enet_mii_probe() should be called only after the PHY has been > reset, not before as it is now. > > Fixes: 1b0a83ac04e3 ("net: fec: add phy_reset_after_clk_enable() support") > Reviewed-by: Andrew Lunn > Tested-by: Richard Leitner > Signed-off-by: Marek Vasut Is moving the reset before fec_enet_mii_probe() the reason you need the second patch? net: fec: Fix phy_device lookup for phy_reset_after_clk_enable()