Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp1147759lqb; Sat, 25 May 2024 07:47:33 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCViSuAg2E/AiRVGFSfcawrUkHsOgufo5q5UWWs1DX88P0rtwVHERUk7w7KWz61k2zibcQChW15ZxKGcuYRwZPkzBysDDS3Ftu9eSg5nHA== X-Google-Smtp-Source: AGHT+IEIjLXFPMjuv9j67xL/WMlMt3VQ+agPHctys3r+2m1jb/+9IlGq2zCoILUZg2ZsCZ5Hi5OT X-Received: by 2002:a05:622a:458c:b0:43e:f5b:7a78 with SMTP id d75a77b69052e-43fb0f122bcmr45516931cf.43.1716648453700; Sat, 25 May 2024 07:47:33 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716648453; cv=pass; d=google.com; s=arc-20160816; b=yepMM3O/B2+wW9Z1JedrmMB3cnHBTfwTpUq2J8wBipRG+zmn2BWr1oI3k5HusVQEWK EeOeyxFY7RldHHf/LtxY+4KOcjzJO/nYWB0XPndNGngzRYYp/EQ9Pjb7D4A9lYzaLOsc pQ0CJQFEs9j2/Xo8+mZ+Ft8e/zUG/dWJ47hohSuqZ6CM2ZP73hTzFcSIu8opusADCxiZ t5zeFgcmXg2ysjD/U2vlW/p7DKH/bI70ce8D+g9nSwwfYPrKpuU7GEBKftyqT+OrJXxI 5uLH4P1X/HU9GcnmgEqU0ftO1os5YD2OVfmdOryajHN6c0Ho+OIT7wZ73lP2PhhX2a0W m7Xg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=S39VWHs+4+yu6rI13z80G8Whc59XWseFYI8qC5dVnV8=; fh=HNzpv8LXfNLrLB0cN4Kuf5s8sBh3sSqHWMMhAtsxEYo=; b=SiQCJgk/Fii/6wMzkFy+LA++33rKRZSXtyjeunqty+eclFTIwps9m3hpIiB+FKQ7T5 dILQAyqC1ydEFUZKpl43W83sExId+MldhAj8hwxfkb/hq0/urofs5zqGlCPTbU7gcR4+ 0eP6glUJX2TE66FmCxNZm4eeDXIeVf1wbg2P3E5WUhteKbNfGFKFI99JB41/Tp4mhiZL PTlBB5j+nWyh3LVYKNOiD7DPdVdx9Xm5t59w8VY93iE7H2EzBM5VCDdHL+IYRd/fKaBF D2wRZToIKyP+7sJgz5BLe6G5OV3lzRhIHvpDlr2Sei6ammvBfPQ7Iwb+dQkw6dP2aXk4 +wUQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=cRxskZAt; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-189387-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189387-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-43fb18a6367si47520511cf.349.2024.05.25.07.47.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 25 May 2024 07:47:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-189387-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=cRxskZAt; arc=pass (i=1 spf=pass spfdomain=lunn.ch dkim=pass dkdomain=lunn.ch dmarc=pass fromdomain=lunn.ch); spf=pass (google.com: domain of linux-kernel+bounces-189387-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-189387-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lunn.ch Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 5DD1A1C20B82 for ; Sat, 25 May 2024 14:47:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6E6B45A4D5; Sat, 25 May 2024 14:47:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="cRxskZAt" Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CD6F31DA5F; Sat, 25 May 2024 14:47:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716648442; cv=none; b=lquj4C+9al7Y1Dlbgxp4cATmW+VUBeszHMuPUz0iAhUDQhsfkBbX+nmqFnOUo59ieofRuulEUfkpXuuaiJHh5E0Tzl2tft1SnnCf8p4khv0G/gEGN7WsB/WeNl8AIK+/QU6YYn2L6K+KGEsVRQdN6gk/F5jMvcy8OOo1rS3aXAc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716648442; c=relaxed/simple; bh=6SNUBZnUp2ArjVrrFS12NGWBhTJdFWYGEK88cZiZ2qw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Pu7HI1RR2V8+XLzJLzmQn3tewg3v3euriub9oCkgNFn2MGuPX3OPjAHOukqDTypGznmNGJASSHZs0hWZQAA8qnuAWCXKL185JtoG8z1dQBkqwO7uEUOZubpnnxtFk3trHMiMVTlsGWo/CId3Iniwdkli4+0pVC64av2bfvVDeyg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=cRxskZAt; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch 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=S39VWHs+4+yu6rI13z80G8Whc59XWseFYI8qC5dVnV8=; b=cRxskZAt0VbPLbJn8T2zCktqb6 2Fkbg2gxwpuW6v35cOL5uyINjv0HqJW6qc2oC+zCSNKPs+ShNuCLp6HUpit4RD47E92hxoU/HjvYE jwqk6rc6Uul7JFWGUTKpaYWcnZLfpbtQ9T77aD69teCDcW+cCKAWuMZqvBi+aFcYmuBw=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1sAsfh-00G095-Qn; Sat, 25 May 2024 16:46:57 +0200 Date: Sat, 25 May 2024 16:46:57 +0200 From: Andrew Lunn To: Piergiorgio Beruto Cc: Selvamani Rajagopal , "Parthiban.Veerasooran@microchip.com" , "davem@davemloft.net" , "edumazet@google.com" , "kuba@kernel.org" , "pabeni@redhat.com" , "horms@kernel.org" , "saeedm@nvidia.com" , "anthony.l.nguyen@intel.com" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "corbet@lwn.net" , "linux-doc@vger.kernel.org" , "robh+dt@kernel.org" , "krzysztof.kozlowski+dt@linaro.org" , "conor+dt@kernel.org" , "devicetree@vger.kernel.org" , "Horatiu.Vultur@microchip.com" , "ruanjinjie@huawei.com" , "Steen.Hegelund@microchip.com" , "vladimir.oltean@nxp.com" , "UNGLinuxDriver@microchip.com" , "Thorsten.Kummermehr@microchip.com" , "Nicolas.Ferre@microchip.com" , "benjamin.bigler@bernformulastudent.ch" Subject: Re: [PATCH net-next v4 00/12] Add support for OPEN Alliance 10BASE-T1x MACPHY Serial Interface Message-ID: <056f54b1-45d4-4ef8-872e-6321e3d98e7d@lunn.ch> References: <2d9f523b-99b7-485d-a20a-80d071226ac9@microchip.com> <6ba7e1c8-5f89-4a0e-931f-3c117ccc7558@lunn.ch> <8b9f8c10-e6bf-47df-ad83-eaf2590d8625@microchip.com> <44cd0dc2-4b37-4e2f-be47-85f4c0e9f69c@lunn.ch> <6e4c8336-2783-45dd-b907-6b31cf0dae6c@lunn.ch> <0581b64a-dd7a-43d7-83f7-657ae93cefe5@lunn.ch> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, May 24, 2024 at 10:08:54PM +0000, Piergiorgio Beruto wrote: > > Having a GPIO driver within the MAC driver is O.K. For hardware diagnostics you should be using devlink, which many MAC drivers have. So i don't see a need for the PHY driver to access MMS 12. > But the MAC driver might need to access MMS-es for vendor specific > stuff. In our case, there is a model specific register we need to > access during probe. Which is fine, and currently supported. Look at the Microchip driver, it access some registers at startup. The framwork just provides the core of moving packets around, and MDIO access. The rest is up to MAC driver. > Fair enough, let's keep it for "hacks" then. Still, I think there > are features that -initially- are kind of vendor specific, but in > the long run they turn into standards or de-facto standards. > I assume we want to help this happening (step-wise), don't we? Maybe, but maybe not. We have been developing MAC drivers for over 25 years. There are a number of mechanisms for exporting things to user space. We have to see if your features fit one of them. > For example, one big feature I think at some point we should > understand how to deal with, is topology discovery for multi-drop. > Maybe you've heard about it already, but in short it is a feature > that allows one PHY to measure the distance (or rather, the > propagation delay) to another node on the same multi-drop segment. > Knowing the cable Tpd (~5ns/m), this allows you to get also the physical distance. We already have something very similar to this. Cable testing results which make use of Time Domain Reflectromitery. I would look at re-using the API as much as possible. > In my view, we should probably create some PHY extensions in the > kernel to activate the physical layer part, leaving the "protocol" > to the userland. May I ask your opinion? Please look at how cable testing works. Andrew