Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp334504rdb; Thu, 30 Nov 2023 06:11:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IFl4QhXfo4L5+6cxNeO8lRB626FP8yM40J3RVyfMYEIQm29hComUWU4O34hTyR5rz529izA X-Received: by 2002:a05:6870:9f05:b0:1f9:6832:e241 with SMTP id xl5-20020a0568709f0500b001f96832e241mr24909291oab.36.1701353511409; Thu, 30 Nov 2023 06:11:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701353511; cv=none; d=google.com; s=arc-20160816; b=t2hMJnYhvH9eKWP9Y10sftN6wkeFZ64w8Gs0SLSPfQcBvvNo9HJhXvtv/G8/T6oO4E /dEv3SEPhkm5TM7CygLuEhcWZ/U/kIqMXU0nJkii4zGzD0IqaV+iEJBzB4jw79QvuWuG Stp8qzqV4KHD4yxqXQTCjStExWl4FtTWR+pvV8CweZX0/UFE6CgpOy3H8w9rikxmhHZP hdQjpY9kNV1It1dcpzVwrO272MOjS7fKjNLEzWhsFEh3s7zeTiOJOg1CJBAcwLovn6QO KRqSISLg4lAi2twLka1YGmtJnPhTGTfwjRmGU2s3/Bu8La3IL2ueMdlnx9htTJYHscJM UD3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=xrGDxVjBiy7pGNBE5oOMMvnk6VYQFSoFjjA2DKv6muM=; fh=bz/EutmytOkbFttLRmL0EaB4VQ3UfkPvxChGhpLBRYg=; b=WzeVCHAf7bJiZHbUecFKPfB0A4lv+qZySdQZTS2aUsmrD8BilufCx2DF0eKSfRGi3m 6Nk5ZRrKcD3OVr7140iDeq7tsd+bYFmkxHCB9N1jmY4sFCpe4gVNPbUuP8r2gTJKy/1D SchJljvoxoO+EGOw0DW12eDCqUxvoCVb7RYexeeKaN5SclgsQvyYXtRav1kCvQ/qBC9W YSnfEqUpcwd7Rvx9ct5N32fBzv/fzZBc9m2q0reEsosFvm30gtG3e874NuPlTMUXzJvA 2VX4uLBEvEmmtS+xZlo+ijlcOr+uMY7hs+RBd9yFyn+08N5/m8De+9u16PFq0UOKoz4X fuhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=rEX41nld; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id p35-20020a0568708a2300b001fa13c2b69esi441672oaq.183.2023.11.30.06.11.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 06:11:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=rEX41nld; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 1D42880909D2; Thu, 30 Nov 2023 06:11:23 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345867AbjK3OLN (ORCPT + 99 others); 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> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Thu, 30 Nov 2023 06:11:23 -0800 (PST) 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