Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp5231781rdb; Wed, 13 Dec 2023 02:58:24 -0800 (PST) X-Google-Smtp-Source: AGHT+IHXiT17Ee+IxE75JlQwSVm5HvAOqhNBSpyrS57sXps3HTao/72KnDTBS2YFbR9l4/MXRx44 X-Received: by 2002:a05:6a20:e12a:b0:187:5db4:168c with SMTP id kr42-20020a056a20e12a00b001875db4168cmr10339586pzb.31.1702465103948; Wed, 13 Dec 2023 02:58:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702465103; cv=none; d=google.com; s=arc-20160816; b=Qh9IFOFx2eIq7gFsvJup5tOdsUWpHxYkcu8MdmIM0F9yFd15qzsHCPEfKYmcA2U16Z OKELa2mTTA4q/MCfwUwWx+7lEUCd/UL/qVbHGfDW/hg5mvJ3snJP3OGINuJzWgvfCoWb WxCHXMH7dLL/0f+S36ppdBqGgu5IgSzq4LtNVgKjzIz+ElSMgzCGFl1K922Un984EzEw REK9z1F80nrlqKUM7rPf2C3qN0MWFr/JJk4nRUhAtCaXTedDBNSGOPES4j6vFGDQhVEY HX311rzDzWBG8xYqoQnxiyJ9PlpnpVQl5bTvt0bGOz1G71MlaCNQ7hVo9oGYqUYhRM3n 9nSQ== 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=mGIQDTPQtHNZfQHDhzO46ShItOaXBrTUkfxx2nG5SQY=; fh=zwFw9PW6mbY9Vr0qK45SbZt2L4dpXcyIP5dk8m3h+GM=; b=dey4Qh2xZlrU1BLQnsLj2VIu67DPp86BRNmnKSoR7o9ttbK5WHFOQVReRC2Yo7cmjC 9Sky+nmQrfQSPQAAm/SrPkLFmCkdwz4pIcA0/jDBg650ylr54uqrGzWQXBzJ2S4EdXoF fminL/GGTsGEHp53/gA75fF7nWZOAe7nZMmSUFl0HME2xUc97ZZsn3tiJH2m3M1NTvrW L+49HlSoQpyOCWYqBu6CRBR2t6jfMPzAy1LWyeMq+6M174dc10jqcPkcMICvlIF4yI6f 73WDt3uBRISjEuRhncI20Cph/bZn/1RicIhijqOfBgcoEEHV0h21xilggVWBT8y9dYqN fAqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=u7wVbB2p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id b10-20020a056a00114a00b006ce4de73f9bsi9237527pfm.117.2023.12.13.02.58.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Dec 2023 02:58:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=u7wVbB2p; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id 368EF8045C4F; Wed, 13 Dec 2023 02:58:21 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378279AbjLMK6B (ORCPT + 99 others); Wed, 13 Dec 2023 05:58:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378217AbjLMK57 (ORCPT ); Wed, 13 Dec 2023 05:57:59 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2ED9112A; Wed, 13 Dec 2023 02:58:01 -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=mGIQDTPQtHNZfQHDhzO46ShItOaXBrTUkfxx2nG5SQY=; b=u7wVbB2pV5gntyL4PYXEwy2kdJ u/EwwnGsIUcLsYSsvJRCle6GQ8iC3RZSiPxEj9f8pG+3hewpcncW/zHnPcttRW+nebLpb9zUkZ/6S 5sydG1e30JK1vCa+ujf9NWPiO2Wdou9AWl7gCyzTEOFIWZzawGXVS7KPBK2OrQPper4I=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1rDMw4-002oEF-E9; Wed, 13 Dec 2023 11:57:52 +0100 Date: Wed, 13 Dec 2023 11:57:52 +0100 From: Andrew Lunn To: Justin Chen Cc: netdev@vger.kernel.org, Doug Berger , Florian Fainelli , Broadcom internal kernel review list , Heiner Kallweit , Russell King , "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: 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: <20231213000249.2020835-1-justin.chen@broadcom.com> 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 agentk.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 (agentk.vger.email [0.0.0.0]); Wed, 13 Dec 2023 02:58:21 -0800 (PST) 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. Andrew