Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp3546968rwb; Fri, 16 Dec 2022 17:11:19 -0800 (PST) X-Google-Smtp-Source: AA0mqf4K0iG6SmTbyeTr/2tLcM7lOcyEsC/09gfL78hmtZ/BVQom7YxHF6nITpED1fhBsnloAqnq X-Received: by 2002:a17:90b:46d5:b0:21d:ef10:d6ca with SMTP id jx21-20020a17090b46d500b0021def10d6camr33195564pjb.45.1671239479313; Fri, 16 Dec 2022 17:11:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671239479; cv=none; d=google.com; s=arc-20160816; b=fYhs9/pHfQppAIAd9saIA1WB0QQh0xf7YMw29e5VmJy8uk6hfoQfn5gB8Ue8egYPCp 1wJWf8yofvU1JVqxkh1/Rx7YdVnX+jhBXeZm4F/pphQhAVwBve7dRTUDCRk0JIasUQk7 /D7rd92a269jlJAvfTcMw982L7yu2wqydQAB3ZN54EKJKOIM8FyYtx4cnH0GLHwaYXlp NMZaOXDHgcUrhHpmfgW7O76aI3uXOYAzN+EOU5i38O8H5N+5CF+6O2GfdFZd6yLvwSmz DUfzCz1mrZJnzE2uYnjlkKWnl9j9o/AQOj8vcgM6NCb0+ktCFcUc1sVjrwBeVK0bG5bl 9iTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date:dkim-signature; bh=Eo9BD39xovb+4SmlChbAPl02KDedlYTq0BQcBYiGyQo=; b=mjRc9lwH+jUl1UIUiEJFZIzOHiibPQuG0uzvUQ1fattBlzGOzIU4n/6agirgN3enXj QYAYp6cUgmaT1QEukMTUXUzvmtomWOt0cTdi08NRDawznFvX+2cgyd7W7VXh/ZY614HO 8oS5jwFIpoFzKwZYJhFjMScLKIeeyUyiWW2Xtc/yLGTCBfqBsL0XvJIuz7VEjccN3hdT w27Ak8XFnjP5cX+NLbSRKCiQlz5vY6kXTAz6AfvL8mRp4fCokvNOdR+NIf7Gb/BT4gsp QyBks2NUMYHvcsp69QwBYe9SI5Tb55ilHl/8tqgxdMnNC0NAj4lWSNxipKmPdnE4n3Pi CfPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=bWFvV7zw; 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 o1-20020a17090aac0100b001fe41707a2esi9101106pjq.90.2022.12.16.17.11.10; Fri, 16 Dec 2022 17:11:19 -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=bWFvV7zw; 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 S229844AbiLQAsT (ORCPT + 69 others); Fri, 16 Dec 2022 19:48:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229793AbiLQAsO (ORCPT ); Fri, 16 Dec 2022 19:48:14 -0500 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 232AB5E0AA; Fri, 16 Dec 2022 16:48:13 -0800 (PST) Received: by mail-ed1-x52a.google.com with SMTP id i15so5890492edf.2; Fri, 16 Dec 2022 16:48:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=Eo9BD39xovb+4SmlChbAPl02KDedlYTq0BQcBYiGyQo=; b=bWFvV7zwBAcLx+brYrQt77v7ozyes6O4mAD/+HzyiUXYbwd+fRfePdTuwAC30p7nBe wvwFw9MHqxrwBDo5nagBzqtYq43047ULStofn1l75uBpcepR57Elry4l+0T2FpYwxFkl oBu4IYFolOOXcPlXbOEw+GmtfVneqTYLf+2Kr+MQqM0ozYs7WZlV47tQyzGNRKV4Zwdw xIlNYxtX+jiuR0uAHWpERKUHjBoqMBolAqn7YJAWDlbUagG4tAbhOdyWyVc/B7KILB5N ThX9CsOpkKv5f3sKVOPxe2QV0Xu7TZhoSjj9tRHGgNTdFdcX7unzZtX2hzR3M5p1C2T/ psVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-disposition:mime-version:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Eo9BD39xovb+4SmlChbAPl02KDedlYTq0BQcBYiGyQo=; b=kaTsfeFXNLhAzBDTUPXyXhMfkQdPw5MSXJEMqYK/hp4EnW4MFf997QQqG/MUgMhHi4 k6NEfLwIYe7RcWajjeuTz55EqekZzSGszPWmvyzzYGcPQR+zpXw2mAtSyQoOoymMQaN5 2BsdSLqLl87CHvkiEeNOqf7NJwPwCbQ6SP3Xb9PEQ9p+3D4OzA2WhU44HVwZv9fRXSbc dIsJYzsJvV794Pyze+K0CWaskjUFz7ggcYsMUTsaALupF6zGR2RVbT7CATBbmAB0odt3 6Tzmx8MfX/vlruwfTzPQjSjDkLgPI/FDnYhikZNrGFFxuuwXw18258oAirMprpUsFJnP 3WUQ== X-Gm-Message-State: AFqh2krKc9jRZxIIERxfUNm1A+cVrjzfN5q6/nR1Gk2YTKpgVAkTUaYy JYHx4jxmLDoHCau9dfcOg3ObSJKMrpD8Z8Z6Qy4= X-Received: by 2002:aa7:c6c4:0:b0:472:2d7e:8c6d with SMTP id b4-20020aa7c6c4000000b004722d7e8c6dmr12034750eds.28.1671238091588; Fri, 16 Dec 2022 16:48:11 -0800 (PST) Received: from gvm01 (net-2-45-26-236.cust.vodafonedsl.it. [2.45.26.236]) by smtp.gmail.com with ESMTPSA id f4-20020a056402068400b0046951b43e84sm1410850edy.55.2022.12.16.16.48.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Dec 2022 16:48:11 -0800 (PST) Date: Sat, 17 Dec 2022 01:48:09 +0100 From: Piergiorgio Beruto To: Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Oleksij Rempel Subject: [PATCH v7 net-next 0/5] add PLCA RS support and onsemi NCN26000 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 This patchset adds support for getting/setting the Physical Layer Collision Avoidace (PLCA) Reconciliation Sublayer (RS) configuration and status on Ethernet PHYs that supports it. PLCA is a feature that provides improved media-access performance in terms of throughput, latency and fairness for multi-drop (P2MP) half-duplex PHYs. PLCA is defined in Clause 148 of the IEEE802.3 specifications as amended by 802.3cg-2019. Currently, PLCA is supported by the 10BASE-T1S single-pair Ethernet PHY defined in the same standard and related amendments. The OPEN Alliance SIG TC14 defines additional specifications for the 10BASE-T1S PHY, including a standard register map for PHYs that embeds the PLCA RS (see PLCA management registers at https://www.opensig.org/about/specifications/). The changes proposed herein add the appropriate ethtool netlink interface for configuring the PLCA RS on PHYs that supports it. A separate patchset further modifies the ethtool userspace program to show and modify the configuration/status of the PLCA RS. Additionally, this patchset adds support for the onsemi NCN26000 Industrial Ethernet 10BASE-T1S PHY that uses the newly added PLCA infrastructure. Piergiorgio Beruto (5): net/ethtool: add netlink interface for the PLCA RS drivers/net/phy: add the link modes for the 10BASE-T1S Ethernet PHY drivers/net/phy: add connection between ethtool and phylib for PLCA drivers/net/phy: add helpers to get/set PLCA configuration drivers/net/phy: add driver for the onsemi NCN26000 10BASE-T1S PHY Documentation/networking/ethtool-netlink.rst | 138 ++++++++++ MAINTAINERS | 14 + drivers/net/phy/Kconfig | 7 + drivers/net/phy/Makefile | 1 + drivers/net/phy/mdio-open-alliance.h | 46 ++++ drivers/net/phy/ncn26000.c | 171 ++++++++++++ drivers/net/phy/phy-c45.c | 183 ++++++++++++ drivers/net/phy/phy-core.c | 5 +- drivers/net/phy/phy.c | 172 ++++++++++++ drivers/net/phy/phy_device.c | 17 ++ drivers/net/phy/phylink.c | 6 +- include/linux/ethtool.h | 12 + include/linux/phy.h | 83 ++++++ include/uapi/linux/ethtool.h | 3 + include/uapi/linux/ethtool_netlink.h | 25 ++ net/ethtool/Makefile | 2 +- net/ethtool/common.c | 8 + net/ethtool/netlink.c | 29 ++ net/ethtool/netlink.h | 6 + net/ethtool/plca.c | 276 +++++++++++++++++++ 20 files changed, 1201 insertions(+), 3 deletions(-) create mode 100644 drivers/net/phy/mdio-open-alliance.h create mode 100644 drivers/net/phy/ncn26000.c create mode 100644 net/ethtool/plca.c -- 2.37.4