Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5610503rdb; Wed, 13 Dec 2023 14:01:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IFptTY9p217BILGmW1c7DrNAivInMuFA8AsuVFH1MrhIApJcmVUjMNy+3/0M6Otz4YUSD+a X-Received: by 2002:a05:6a00:80a:b0:6cb:bb61:5686 with SMTP id m10-20020a056a00080a00b006cbbb615686mr4723401pfk.31.1702504882745; Wed, 13 Dec 2023 14:01:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702504882; cv=none; d=google.com; s=arc-20160816; b=vHFVGMXBZjLpDR3f85OCabe1apqjo2w6zeBO1EiwCpxoobHkdCctHIW70FHKuOzpNb KahdJboORKcM/pppfD85qmqonGMCZkLK3yA6bksczE1u4jyaTmW11zuaVbpvrLoh1bc1 hoKjjLQeqEax+iYoLBCwhvr4TEY5yk4VBTs3TZEYzjdcuHFiEdsg1DUZdRfTEXZy0Mo5 Pfw4l5uoFtlGPAlpy69CAWWSRI5FE9usF2nVcD351upxSVx8Pe+B4c9FbgNQTCHsDHm0 vjhLM4tFLlZZ9fP+zq5xGiGqrJxUKEmiJFEHOoO8vvMURwgQZyQyWJvVWp/cu8a+YJ8V WaWg== 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=cJnDldXUMVBXHPmZzYrdgqvYdMUeT9OgJCCFvtyCOEU=; fh=/gGlo2WFQQ9a9K+Y/uecy/Hf5dpkJJNSz2vUurtJjFQ=; b=iqKkUmlV7e85x3YNX3mZY75ZndtQzE0WB88+OnOLZQ08EJ2j8u74PpHajM53CSvSNk 3dmciiztmSOmfPG1+2aclBiZ9q3xB9LyzNNtmzoa+Pb5FR/P9FbKUIh1UD03W7DeCfG5 obxZMHNRyooeNd069FuKLQtJHnjHRYCrbABmM5+LXyuWnlVfhQdWZwaRkx5xPMfoun/C NLfEpukZuhHTO7I5/O32oF7CuQlaoFp9zOMawk3Vs4q97rTIE7U4VAlN/DNPpsHWd5Kc DMgt31vIY7iOUv4bzJwXCtG5T2AybTWdlvpc64sSYhghtIzTULJ6Btpb+wHO4+JjjYWV eZTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=ZG2RL06N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id ay4-20020a056a00300400b006cd8754211esi10155986pfb.250.2023.12.13.14.01.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 14:01:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=ZG2RL06N; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 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 lipwig.vger.email (Postfix) with ESMTP id AB9A28038B54; Wed, 13 Dec 2023 14:01:02 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1442741AbjLMWAq (ORCPT + 99 others); Wed, 13 Dec 2023 17:00:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230004AbjLMWAp (ORCPT ); Wed, 13 Dec 2023 17:00:45 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E4AB100; Wed, 13 Dec 2023 14:00:51 -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=cJnDldXUMVBXHPmZzYrdgqvYdMUeT9OgJCCFvtyCOEU=; b=ZG2RL06Ny69UkzRtQRCv4x2JZi NjHYO7rghvqANL0SpfwjBfRtZi3a9B5fNH4sa+2Hf7p+aOYd6vZPLEm8H2hoMwGNbz8g4ZIZDPnRH OYsP2dkgBrI5/xqKaK5K41MY71IanHPsK2/yzYD8uUwHlEb6ZnOK6QSch4sEWLwmKfDs=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rDXHT-002rUq-4l; Wed, 13 Dec 2023 23:00:39 +0100 Date: Wed, 13 Dec 2023 23:00:39 +0100 From: Andrew Lunn To: "Russell King (Oracle)" Cc: Justin Chen , netdev@vger.kernel.org, Doug Berger , Florian Fainelli , Broadcom internal kernel review list , Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , open list Subject: Re: [PATCH] net: mdio: mdio-bcm-unimac: Delay before first poll Message-ID: <9c51ecda-4930-4c27-91d6-407efd860aa9@lunn.ch> References: <20231213000249.2020835-1-justin.chen@broadcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email 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 (lipwig.vger.email [0.0.0.0]); Wed, 13 Dec 2023 14:01:02 -0800 (PST) On Wed, Dec 13, 2023 at 03:01:09PM +0000, Russell King (Oracle) wrote: > On Wed, Dec 13, 2023 at 11:57:52AM +0100, Andrew Lunn wrote: > > On Tue, Dec 12, 2023 at 04:02:49PM -0800, Justin Chen wrote: > > > With a clock interval of 400 nsec and a 64 bit transactions (32 bit > > > preamble & 16 bit control & 16 bit data), it is reasonable to assume > > > the mdio transaction will take 25.6 usec. Add a 30 usec delay before > > > the first poll to reduce the chance of a 1000-2000 usec sleep. > > > > #define MDIO_C45 0 > > > > suggests the hardware can do C45? The timing works out different then. > > Maybe add a comment by the udelay() that is assumes C22, to give a > > clue to somebody who is adding C45 support the delay needs to be > > re-evaluated. > > Note, however, that the driver only supports C22 operations (it only > populates the read|write functions, not the c45 variants). Yes, i checked that. Which is why i used the wording 'a clue to somebody who is adding C45'. Not everybody adding such support would figure out the relevance of 30us and that it might not be optimal for C45. A comment might point them on the right line of thinking. That is all i was trying to say. Andrew