Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp5005612rwb; Sun, 4 Dec 2022 12:24:17 -0800 (PST) X-Google-Smtp-Source: AA0mqf6Fsjlc+ULOmShIEDjXNPy2kW4TSIpLQ/QR5j2hjmYVrqP6mAJtZ8nw6sCWug/SZ2O5EtZt X-Received: by 2002:a17:906:442:b0:7ad:7d4a:ec2c with SMTP id e2-20020a170906044200b007ad7d4aec2cmr52050252eja.710.1670185456897; Sun, 04 Dec 2022 12:24:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670185456; cv=none; d=google.com; s=arc-20160816; b=j3jg3z1RgTv/bzwEGx2G/LWfKFjIh7vsD0uXJfIVgSsliUAoZvjcAEqC/bRNBwSLoz naTFk6DVIPybP8wOpM3eCSTzYjy7to3DIQX7MrZA+m2O8ogwXJuLLJYq9McHGQHqCATH /PCW6XfzfD3p3dNS+4udivGu2HeHH+X4JunGqFs+yf5el+cMS9upJAAxeagvc/eYEXuS DtvLfW9q4Vljko5CAgo5CwfXF1sAIMoaRads1kc7C4toY/FtjgdiOV2lkt4/NeWlEdk0 1Gt254qL165E+binIYYM+lGbJEkAnx/O5fIC92oYlR9ifZAnyuzTHKwSjjtx8e7kc6U8 2TsA== 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=vkl5Py1oRMWrCzqnFnPy3sf0zNxYTULfKlMFBdBWZN0=; b=HgoOnD7TrApxY0akca1RnJBnjjsuVe5J/KkttseT83IZySTmQYneiRb16H4CDZAGtS Q+p+s0e6aEuwqENiQREj7NmWx/SQKj6xK1g5nqNpR4Au/21st9vI5YdfLRPqIC2wfR7N uM1HYahRJHIlJypcXN/tqueUwbIWV5fb7e0kLwKj7fIbvH66sEkB03PKZkIqfojsJk1H owz6yf1DhH8McKm7brOC0yEQ62X8WnZY1rAaMoU9DpB+oeZj960PoxwejXa9psYIKBXi 8Qbsn6SsKL3OWQRPxlrPoan99pUrdZ2GTdLn+hTOiaHzQilab3JD2m6PCZNmcb4OpZIp wdbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="FOu/gaqw"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ne30-20020a1709077b9e00b007b5911c9b13si12129758ejc.831.2022.12.04.12.23.56; Sun, 04 Dec 2022 12:24:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="FOu/gaqw"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230221AbiLDUJE (ORCPT + 82 others); Sun, 4 Dec 2022 15:09:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230142AbiLDUJD (ORCPT ); Sun, 4 Dec 2022 15:09:03 -0500 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3D8A5FAE0; Sun, 4 Dec 2022 12:09:02 -0800 (PST) Received: by mail-ej1-x636.google.com with SMTP id ud5so23269219ejc.4; Sun, 04 Dec 2022 12:09:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=vkl5Py1oRMWrCzqnFnPy3sf0zNxYTULfKlMFBdBWZN0=; b=FOu/gaqweHGuxVi5iHwCoYTw7jKFehqERkZ63OWsEkaSNSO0BdTGuicXRG7XwE21wE FzM1BG2EcR3BpyE2fhnbT4laDj/hUmH6FE+z9mdBa29i/yKKIGwERDasuivaCiu7UPIc UPqzGxZwXreJJoYInkg/4OmQy24G8I334Pj+eaJZSOVBZoioS8CDh6OYqCSRLbe65kHB TKUGaBJSiaw+SfAIRq4CBHB9pW22I/xPYUfM54ooi9gN7rjeiZ4NOkiNIMLG8VeA/JTJ na15udw6DCKh3NopTh4U35zXB2LVb2hbUiiqRlDl+p884PLCXEHKfTTLqwqNtljVKHxN NQJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=vkl5Py1oRMWrCzqnFnPy3sf0zNxYTULfKlMFBdBWZN0=; b=MKUsE7FjqkiE9ijwhERRMWWrbatyW0M2eJC1olzkEL8HXu2oz6ADoFGJjPAjZdi0fl iJlFPDUhRS9jPXK0KXVn/4ec4NpkcduFwB3ScjlkfkEDCDohFvuAcNTIWErgJ/eStR1Y AOLXpJhj3wxeRHK4dSuS567BK8ShqbrI/ncERmIkZ1cmg9/09ccOz/0MnX6TRxorqCTr Kpd7duNuEJugyM8P4hb2Hc+2Fx/Ujo4qe8hQJ6fWla19/MHqZ/9Pb1a6Y8OL8hpATuqI LpJ8qBb2zOxfGSwX57mxcff0C7FmGj+Kq52mcs2ru6raFmh3vfQU3wXhs93Z2g/mMspq pl7A== X-Gm-Message-State: ANoB5pnzuvPwtMGW+SDz71QYUKw3pd+wqeCBFTURyClKEWEOS1NK7yXO NoJblTR7HCxyqhO8797XBrg= X-Received: by 2002:a17:906:38cd:b0:7be:4d3c:1a44 with SMTP id r13-20020a17090638cd00b007be4d3c1a44mr32659821ejd.543.1670184540686; Sun, 04 Dec 2022 12:09:00 -0800 (PST) Received: from gvm01 (net-2-45-26-236.cust.vodafonedsl.it. [2.45.26.236]) by smtp.gmail.com with ESMTPSA id x10-20020a1709060a4a00b00741a251d9e8sm5485906ejf.171.2022.12.04.12.08.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 04 Dec 2022 12:09:00 -0800 (PST) Date: Sun, 4 Dec 2022 21:09:08 +0100 From: Piergiorgio Beruto To: Andrew Lunn Cc: "Russell King (Oracle)" , Heiner Kallweit , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Oleksij Rempel Subject: Re: [PATCH net-next 4/4] driver/ncn26000: add PLCA support Message-ID: References: <38623984f6235a1521e6b0ad2ea958abc84ad708.1670119328.git.piergiorgio.beruto@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 On Sun, Dec 04, 2022 at 07:48:24PM +0100, Andrew Lunn wrote: > On Sun, Dec 04, 2022 at 05:06:50PM +0000, Russell King (Oracle) wrote: > > On Sun, Dec 04, 2022 at 03:32:06AM +0100, Piergiorgio Beruto wrote: > > > --- a/include/uapi/linux/mdio.h > > > +++ b/include/uapi/linux/mdio.h > > > @@ -26,6 +26,7 @@ > > > #define MDIO_MMD_C22EXT 29 /* Clause 22 extension */ > > > #define MDIO_MMD_VEND1 30 /* Vendor specific 1 */ > > > #define MDIO_MMD_VEND2 31 /* Vendor specific 2 */ > > > +#define MDIO_MMD_OATC14 MDIO_MMD_VEND2 > > > > If this is in the vendor 2 register set, I doubt that this is a feature > > described by IEEE 802.3, since they allocated the entirety of this MMD > > over to manufacturers to do whatever they please with this space. > > > > If this is correct, then these definitions have no place being in this > > generic header file, since they are likely specific to the vendors PHY. > > Piergiorgio can give you the full details. > > As i understand it, IEEE 802.3 defines the basic functionality, but > did not extend the standard to define the registers. > > The Open Alliance member got together and added the missing parts, and > published an Open Alliance document. > > Piergiorgio, i suggest you add a header file for these defines, named > to reflect that the Open Alliance defined them. And put in a comment, > explaining their origin, maybe a link to the standard. I also don't > think this needs to be a uapi header, they are not needed outside of > the kernel. > > I also would not use MDIO_MMD_OATC14, but rather MDIO_MMD_VEND2. There > is no guarantee they are not being used for other things, and > MDIO_MMD_VEND2 gives a gentle warning about this. Thanks Andrew for commenting on this one. This is right, in the IEEE 802.3cg group we could not allocate an MMD for the PLCA reconciliation sublayer because of an 'unfriendly' wording in Clause 45 ruling out Reconciliation Sublayers from what can be configured via registers. Clause 45 says you can have registers for the PHY, while it should have said 'Physical Layer" and there is a subtle difference between the two words. PLCA, for example, is part of the Physical Layer but not of the PHY. Since we could not change that wording, we had to define configuration parameters in Clause 30, and let organizations outside the IEEE define memory maps for PHYs that integrate PLCA. The OPEN Alliance SIG (see the reference in the patches) defined registers for the PLCA RS in MMD31, which is in fact vendor-specific from an IEEE perspective, but part of it is now standardized in the OPEN Alliance. So unfortunately we have to live with this somehow. So ok, I can separate these definitions into a different non-UAPI header as Andrew is suggesting. I'll do this in the next patchset. Thanks, Piergiorgio