Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp2290445rdb; Thu, 21 Sep 2023 14:15:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFbidgMqVFQbMMxYaxYOzvAMjVom8IftsSnyB2Zq6gTJvDd+8iAXVbmUO7gZXRk7VCDfuij X-Received: by 2002:a05:6a20:12c5:b0:15d:8366:65be with SMTP id v5-20020a056a2012c500b0015d836665bemr1129869pzg.9.1695330948592; Thu, 21 Sep 2023 14:15:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695330948; cv=none; d=google.com; s=arc-20160816; b=HFpA9hI11+jJancrc5L6d0NRjEZ7PMfsyZfBf74STiH8reTZytepbajTmjpuUD4But IqYUVqF1SrTbvOUKwupuxO6jA5jc0kRqO5pOmgPE8oqXYsdhXaDvXYDyOa/jEB00KzX4 ef/QkfgPLLTEQiFLJ7mnG4kjdXSvCgvkkol9Hw/fgdy/hQG39F+92rlCrm8OQH5HuuIY qnHW9fsvCE177shVFaHy66kciVIFeArqbc+Pj1msFyobPDVSnYLgL2oFjWB9qukevPcU ja3Zgb865ndka6mDGOqpwWmzdN3i7wWJhlfArMEiR4Vhkc74Qa7Jzafx4YQG1p0g+1Yp v7wQ== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=etZ2gpA0uz+JRPag03uqb6cfh/kPa8Z3gAMOKitX9GI=; fh=7lCn/fOxb0XrJ8BENiXWOpTR8E1kdyrdqoMEnmh7kAs=; b=Hgx0uJWBCNIm2p5qrVFnOi1OOGLh+lQWG8/tXWK2W2v6r6gJKzHWWprI1I54eJ/Yc1 N9WGu6N1wnzn+EBkbYxAvT2Wiq4mS2kELuyAMlBfS6LXTW58qiV82P64XtYfkA5Jxs8S 9YbDt8cBhWbAef/W72r3H6cG3JnKQ4cVtsvB/9Ah51Phcr47S+hrZ9SGpwubhZxXxj71 m8T/R/sAVuMUWhl+zTB453OwfnkLYkQi2OWqXC3LXS/9UrkiQJ0CV/uwT32EGi49oI5H w4fPJifKJyy3Y01nMKQRoS9K+MB64/AcLGJW62QYYC/oqW314CXM1k72J801AWU3oIDR gXyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=XJFeAWsJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id z5-20020aa78885000000b0068e3efffe2csi2413447pfe.243.2023.09.21.14.15.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Sep 2023 14:15:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b=XJFeAWsJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id 231078328FE6; Thu, 21 Sep 2023 14:13:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231564AbjIUVNH (ORCPT + 99 others); Thu, 21 Sep 2023 17:13:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232266AbjIUVMY (ORCPT ); Thu, 21 Sep 2023 17:12:24 -0400 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 5078E98A72; Thu, 21 Sep 2023 10:56:52 -0700 (PDT) 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-Transfer-Encoding:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To: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=etZ2gpA0uz+JRPag03uqb6cfh/kPa8Z3gAMOKitX9GI=; b=XJFeAWsJK6qNPSOEXR7+0kE+V4 4M/gOJKBPlGa+X30hfCd+WanZJzjvHIg3FOF+0PiDMyYKdq2GmP3ET7jaqP+coWsJhapZAKkw8XBp YXoEu+OSuRKJy8kMvQA+1uK6bnykQqT3wiDi16tAorZtuVizYtC0+q1DOQqAlh1wAjC8THQ5j1tBb n/IVlVmgzyC3E/JOKzyKNxwUAzemhr/7mg2Mnn9ljY2801G2xkTtLiqJpDZMyMiXD40F4Rjw8bpZ1 iLzGICk+q44J1b1OKypm+kQ/qteOXGLyEtKJFXgJpGWWDjwMCPUvm9uR4EZYSUOWmQK0fR8ZT1pgq aMWFFDyg==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:46552) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qjJuR-0004g0-21; Thu, 21 Sep 2023 14:39:59 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1qjJuO-0003aT-Te; Thu, 21 Sep 2023 14:39:56 +0100 Date: Thu, 21 Sep 2023 14:39:56 +0100 From: "Russell King (Oracle)" To: Choong Yong Liang Cc: Andrew Lunn , Rajneesh Bhardwaj , David E Box , Hans de Goede , Mark Gross , Jose Abreu , Heiner Kallweit , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Marek =?iso-8859-1?Q?Beh=FAn?= , Jean Delvare , Guenter Roeck , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Maxime Coquelin , Richard Cochran , Philipp Zabel , Alexei Starovoitov , Daniel Borkmann , Jesper Dangaard Brouer , John Fastabend , Wong Vee Khee , Jon Hunter , Jesse Brandeburg , Revanth Kumar Uppala , Shenwei Wang , Andrey Konovalov , Jochen Henneberg , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, platform-driver-x86@vger.kernel.org, linux-hwmon@vger.kernel.org, bpf@vger.kernel.org, Voon Wei Feng , Tan Tee Min , Michael Sit Wei Hong , Lai Peter Jun Ann Subject: Re: [PATCH net-next v2 0/5] TSN auto negotiation between 1G and 2.5G Message-ID: References: <20230804084527.2082302-1-yong.liang.choong@linux.intel.com> <5bd05ba2-fd88-4e5c-baed-9971ff917484@lunn.ch> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Sender: Russell King (Oracle) 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_NONE,SPF_NONE,URIBL_BLOCKED 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, 21 Sep 2023 14:13:07 -0700 (PDT) On Thu, Sep 21, 2023 at 08:25:05PM +0800, Choong Yong Liang wrote: > > > On 4/8/2023 8:04 pm, Andrew Lunn wrote: > > On Fri, Aug 04, 2023 at 04:45:22PM +0800, Choong Yong Liang wrote: > > > Intel platforms’ integrated Gigabit Ethernet controllers support > > > 2.5Gbps mode statically using BIOS programming. In the current > > > implementation, the BIOS menu provides an option to select between > > > 10/100/1000Mbps and 2.5Gbps modes. Based on the selection, the BIOS > > > programs the Phase Lock Loop (PLL) registers. The BIOS also read the > > > TSN lane registers from Flexible I/O Adapter (FIA) block and provided > > > 10/100/1000Mbps/2.5Gbps information to the stmmac driver. But > > > auto-negotiation between 10/100/1000Mbps and 2.5Gbps is not allowed. > > > The new proposal is to support auto-negotiation between 10/100/1000Mbps > > > and 2.5Gbps . Auto-negotiation between 10, 100, 1000Mbps will use > > > in-band auto negotiation. Auto-negotiation between 10/100/1000Mbps and > > > 2.5Gbps will work as the following proposed flow, the stmmac driver reads > > > the PHY link status registers then identifies the negotiated speed. > > > Based on the speed stmmac driver will identify TSN lane registers from > > > FIA then send IPC command to the Power Management controller (PMC) > > > through PMC driver/API. PMC will act as a proxy to programs the > > > PLL registers. > > > > Have you considered using out of band for all link modes? You might > > end up with a cleaner architecture, and not need any phylink/phylib > > hacks. > > > > Andrew > Hi Andrew, > > After conducting a comprehensive study, it seems that implementing > out-of-band for all link modes might not be feasible. I may have missed some > key aspects during my analysis. You need to provide details of why you think it's not feasible, because you're making those reading your message have to guess. We _do_ have cases where this is already supported. The DM7052 SFP module for example has a BCM84881 PHY on board that has no in-band support, so always has to use out-of-band. This module supports 10G, 5G, 2.5G, 1G, 100M and 10M speeds. It switches its interface between 10G, 2500base-X and SGMII mode. It's been supported in Linux for a while with MAC/PCS that implement phylink _correctly_. I wouldn't call stmmac a proper phylink implementation, especially when it comes to switching between different interfaces. My attempt at starting to clean up the stmmac code was thwarted by niggly review comments (over whether %u or %d should be used to print a _signed integer_ that stmmac stupidly implicitly casts to an unsigned integer. That lead me to decide that stmmac was beyond being cleaned up, so I junked the large patch set of improvements that I had - along with multiple issues that I had found in the driver. Someone else needs to sort stmmac out, and I suspect that may be a pre-requisit for your changes so that stmmac operates _correctly_ with phylink. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!