Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4954673rwb; Sun, 4 Dec 2022 11:17:54 -0800 (PST) X-Google-Smtp-Source: AA0mqf66BNH/xFIORDrDU4I+9p6HNkJZVOWkVAZ0aKDR9KKDajzWQLz/TBAFgvG1orgX+FgeuCe2 X-Received: by 2002:a17:902:8c97:b0:189:13df:9dac with SMTP id t23-20020a1709028c9700b0018913df9dacmr60237828plo.34.1670181473742; Sun, 04 Dec 2022 11:17:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670181473; cv=none; d=google.com; s=arc-20160816; b=kB6LCtS4d3+QW6FFRrBS8lJzGl8yMN2KWcQZyNqrAhD/K6onReli4e/aMNG3oGpoe7 PePn46w+dtrsHzzKQ7M8x/9+0NezjttJ5FpZ+k4Bso+6SBxyzJWCfDKKG1LVruYlINiO cILssjW0sjMYvNMdX1OtTCzYncbbP5cUGVyGhCxiOSSMrUaWWWujUlKMgwj/SABm1t2Y FN5IulamX6czOHZf/xgPJpERA+k+W06hAlB7uXll5jb3ErGTs/fI/tFoQrqsghYbDnp3 2qCAkxOhvUrlm/JW6aISPH9PszkBBDKM4iglSVnA9o53mx8Ak/e9qMAz8DuC9AKriFKh Lw/Q== 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=kanHw+QnAHfcqLMCiNmShG/TYNfncj9Qwo4nIigwvSI=; b=RAJPlRapdLkJxdMy+b5OU3YyRuA5ECXTtPIXqQr4RAr5/jG4obRaulaZf825PRWOL3 ueF2MjZQ94cKrmBh6UCdvvLjZKtCPajlYwTTS5bfUBxxdHj3vLCoyjwOa6g3MzUpEZdH /Nys7Q+HrW+QyBeBEk88imtBWQ0vh0pd6pE2rZXpsIygIWa3FCRe6LNYftmi18W8Aw9B clKv4olqpqClYDkihuvqD6NJpOf3BqdIoXeltCShJDUGZHtva1SDPAbvUviEGix5T0yz uVDo3QYFclTrwUNbB1vCfUHHEnMXJAuoTOTkPXCBh5VFNu998AZ1LiWR9SlcXnu0PuoE NxHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=W16fe9xj; 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=NONE dis=NONE) header.from=lunn.ch Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w5-20020a17090a4f4500b0021858c46747si12571107pjl.124.2022.12.04.11.17.42; Sun, 04 Dec 2022 11:17:53 -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=@lunn.ch header.s=20171124 header.b=W16fe9xj; 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=NONE dis=NONE) header.from=lunn.ch Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230036AbiLDSsn (ORCPT + 83 others); Sun, 4 Dec 2022 13:48:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229917AbiLDSsk (ORCPT ); Sun, 4 Dec 2022 13:48:40 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB4B1BC3F; Sun, 4 Dec 2022 10:48:37 -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=kanHw+QnAHfcqLMCiNmShG/TYNfncj9Qwo4nIigwvSI=; b=W16fe9xjyWa+FvAn/nRHUWmxma 0TK2U7RCALTM/bQA3d6WjceAOtnWkqyb+QlNUD36tyzip2FnGqcRfq5ylVnU2Psgfnwgs7GmSB2Cx bvC6ZEe7jSFvDMNEKCC7GBMQ04oajA3I8ZsqkzHnvfncU1VjyyEdT+u4MqtSD5yVnVdw=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1p1u2K-004Kvw-OS; Sun, 04 Dec 2022 19:48:24 +0100 Date: Sun, 4 Dec 2022 19:48:24 +0100 From: Andrew Lunn To: "Russell King (Oracle)" Cc: Piergiorgio Beruto , 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,SPF_HELO_PASS,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 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. Andrew