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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3AA06C4167B for ; Thu, 30 Nov 2023 14:11:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345891AbjK3OLN (ORCPT ); Thu, 30 Nov 2023 09:11:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345844AbjK3OLM (ORCPT ); Thu, 30 Nov 2023 09:11:12 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8B6385; Thu, 30 Nov 2023 06:11:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=xrGDxVjBiy7pGNBE5oOMMvnk6VYQFSoFjjA2DKv6muM=; b=rEX41nldmv40f0DNOVJj3H45rw t4zA1ylJWlvA9W/3ulRx3KKe/i8dTncKpRJppD1Ih6xVZcFWzbGVccQAffNR/ozco/EWhK5Vq04ll TJsSKiN4ldW1cpuBhLLop5krQxxMIGfo3qdgXAK+BChgMNA/V4EP0APjQv/QDFUX6JrY=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1r8hku-001fii-QS; Thu, 30 Nov 2023 15:11:04 +0100 Date: Thu, 30 Nov 2023 15:11:04 +0100 From: Andrew Lunn To: Andrew Halaney Cc: Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Sagar Cheluvegowda Subject: Re: [PATCH net-next v2] net: phy: mdio_device: Reset device only when necessary Message-ID: <760c746a-5469-4f26-8fd9-5f48affe44a4@lunn.ch> References: <20231127-net-phy-reset-once-v2-1-448e8658779e@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231127-net-phy-reset-once-v2-1-448e8658779e@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 27, 2023 at 03:41:10PM -0600, Andrew Halaney wrote: > Currently the phy reset sequence is as shown below for a > devicetree described mdio phy on boot: > > 1. Assert the phy_device's reset as part of registering > 2. Deassert the phy_device's reset as part of registering > 3. Deassert the phy_device's reset as part of phy_probe > 4. Deassert the phy_device's reset as part of phy_hw_init > > The extra two deasserts include waiting the deassert delay afterwards, > which is adding unnecessary delay. > > This applies to both possible types of resets (reset controller > reference and a reset gpio) that can be used. > > Here's some snipped tracing output using the following command line > params "trace_event=gpio:* trace_options=stacktrace" illustrating > the reset handling and where its coming from: ... > Reported-by: Sagar Cheluvegowda > Signed-off-by: Andrew Halaney Reviewed-by: Andrew Lunn Andrew