Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4508776rdh; Wed, 29 Nov 2023 03:35:54 -0800 (PST) X-Google-Smtp-Source: AGHT+IF+5VSNDZ8Qesjh51AyyEFYBFfqRdLpKLVxfslmWJdkGq9aXtpptIhUEVrlZqqaLA88KF4m X-Received: by 2002:a05:6a00:2e06:b0:6c2:cb9a:885e with SMTP id fc6-20020a056a002e0600b006c2cb9a885emr18615074pfb.15.1701257753767; Wed, 29 Nov 2023 03:35:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701257753; cv=none; d=google.com; s=arc-20160816; b=Wy77euETqucxV08W6A1mPSltWzSJi63cl4L+wKkaX/GV1dVW0109vGNg8T9SdVEwMk i+FPpqUmBOLxGaDLHc+/Fo0MjVA/tKvZ5Aog9LaFd+2z2ILQabVmINtvZHbLFw5pm+bp jv2KclPFc+t7SjZ3XDKrxboXT5Y/mG8Ic6aTc74hCpkHl1w/y8wZxwMMiVGPb0SLmUvA /hX9sP0GjqtWT784POKkw1hBg21qRE09nEkhBhVDL5FI6hieTTTslyb7wFNatF6uWYHd YTZoVqjPHnXhbUlV+IpgQP3I7OFm2IhUu4lGul30imUiiCkHuJoEpvW9m8n1JPYJJuxr 9Yyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=rqS+h/QhB+l3YOA1zOKZSiEXB38gEHQM7lW0MLULbqg=; fh=oUQXlm9N18NE8BciMxTG8yakJePvyLDL7KOQwgHv8WI=; b=j5b/Sh/1o+FCICzuay0gbAFMxz+43HDKvKktB3HUowBoo8hwZApsUQggeLz6ZT9Q2z PXZdQw5u8u8JjqNeS6+T4Wo8LBLOrd0opMwaVKBDpuDOoSDn3JfaSqsgfK9TGawOkHaM 3K4sW4ig8c0g76eu+/2LY1Uhbe+Je4FT0OAni5+dRg+Smvpc6IbcQWB4nRzVW1aGEMjS SgNCHN4cIaXnUbez5nt3NkYOr2eayVBxuqVHQ8vZF14ns0rsF+sBeM+gKHQVdDl119HS VI5MjevwitT3O5QHhX3QCsgK8/xXpghGKNNztmZn4CQqaYN2HeQ+ODjRLX+6POVD/RvJ qv7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=vuzdJXag; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id j15-20020a056a00130f00b006cbae9e5105si14146752pfu.113.2023.11.29.03.35.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 03:35:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=vuzdJXag; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id C1C2F8074434; Wed, 29 Nov 2023 03:35:48 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232916AbjK2Lf2 (ORCPT + 99 others); Wed, 29 Nov 2023 06:35:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43918 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230048AbjK2LfN (ORCPT ); Wed, 29 Nov 2023 06:35:13 -0500 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4715DA; Wed, 29 Nov 2023 03:35:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=rqS+h/QhB+l3YOA1zOKZSiEXB38gEHQM7lW0MLULbqg=; b=vuzdJXagBK8d7m5cAmLL0Boojc QyyhacdZgGAZS2j6Hit5ht9BRy5aUqNw+7TaK/yQcKNNG4Gm5VsmU2C6r5zrPk/c/RODcxSIfcXY9 t2CNXc8fL009N6jI30245Z1FtuxIezXE7Y6p60LWcBLeq4wP+NwYmJ7Hshxq4tJkyfufrqe0mCr5D 3v1TfYbAfnmkZ8Q413fHNagFsWg0usjA/RDbJ23DsP0gt9j6dwHVt5sdiS/xpwfY+e+pSi48774LV HmanbcFoR+0rnLz7cQaWEEbQDX7fTJYYbgwCY+ru11YjTTU9idzi1TTVscPzF8L3jBz5lFphvE34g Gy9+ohPw==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:48210) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1r8IqR-0000Iz-2l; Wed, 29 Nov 2023 11:35:08 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1r8IqS-0003xO-Ap; Wed, 29 Nov 2023 11:35:08 +0000 Date: Wed, 29 Nov 2023 11:35:08 +0000 From: "Russell King (Oracle)" To: Sneh Shah Cc: Vinod Koul , Bhupesh Sharma , Alexandre Torgue , Jose Abreu , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@quicinc.com, Andrew Halaney Subject: Re: [PATCH net] net: stmmac: update Rx clk divider for 10M SGMII Message-ID: References: <20231124050818.1221-1-quic_snehshah@quicinc.com> <47c9eb95-ff6a-4432-a7ef-1f3ebf6f593f@quicinc.com> <3bf6f666-b58a-460f-88f5-ad8ec08bfbbc@quicinc.com> <474a8942-e22f-4899-acb9-f794d01fdfe9@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <474a8942-e22f-4899-acb9-f794d01fdfe9@quicinc.com> Sender: Russell King (Oracle) X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 groat.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 (groat.vger.email [0.0.0.0]); Wed, 29 Nov 2023 03:35:48 -0800 (PST) On Wed, Nov 29, 2023 at 04:56:53PM +0530, Sneh Shah wrote: > > > On 11/27/2023 3:35 PM, Russell King (Oracle) wrote: > > On Mon, Nov 27, 2023 at 03:17:20PM +0530, Sneh Shah wrote: > >> On 11/27/2023 2:09 PM, Russell King (Oracle) wrote: > >>> On Mon, Nov 27, 2023 at 11:25:34AM +0530, Sneh Shah wrote: > >>>> On 11/24/2023 2:42 PM, Russell King (Oracle) wrote: > >>>>> The next concern I have is that you're only doing this for SPEED_10. > >>>>> If it needs to be programmed for SPEED_10 to work, and not any of the > >>>>> other speeds, isn't this something that can be done at initialisation > >>>>> time? If it has to be done depending on the speed, then don't you need > >>>>> to do this for each speed with an appropriate value? > >>>> > >>>> This field programming is required only for 10M speed in for SGMII mode. other speeds are agnostic to this field. Hence we are programming it always when SGMII link comes up in 10M mode. init driver data for ethqos is common for sgmii and rgmii. As this fix is specific to SGMII we can't add this to init driver data. > >>> > >>> I wasn't referring to adding it to driver data. I was asking whether it > >>> could be done in the initialisation path. > >>> > >> No, IOMACRO block is configured post phylink up regardless of RGMII or SGMII mode. We are not updating them at driver initialization time itself. > > > > What reason (in terms of the hardware) requires you to do this every > > time you select 10M speed? Does the hardware change the value in the > > register? > > > Yes, the hardware changes the value in register every time the interface is toggled. That is the reason we have ethqos_configure_sgmii function to configure registers whenever there is link activity. That is sufficient reason to write it each time - and it would be good to mention this in a comment above the write in ethqos_configure_sgmii(). Thanks. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!