Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4919696rwb; Sun, 4 Dec 2022 10:32:42 -0800 (PST) X-Google-Smtp-Source: AA0mqf6fvVBOls6aoWVNJCUwf1NeBKe5/Uc8ehARSpVvfWMID5oX157uykQNlfFM6CZh1hMBVbvb X-Received: by 2002:a17:906:7d50:b0:79e:4880:dd83 with SMTP id l16-20020a1709067d5000b0079e4880dd83mr56956846ejp.166.1670178762354; Sun, 04 Dec 2022 10:32:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670178762; cv=none; d=google.com; s=arc-20160816; b=RvzPFuexknFrB5KUdN/fOxhvdm3Z/Tg/ZqWrLBML0RDHD8veMw96OeAR6Q3b15+SoM F6lTzLBKdJq2eSRGcNRcgK2RftzCDUyl93Gnb9ZC1zbQB/eWPk0HAhmFB0Onii54OoT2 rcq1eM8jUOh5nBE7U+pThq1JdGWNXULHPTNYo/bQqwrTAY60SVpfkTFoJGNejQPSnNZI 0RPJOMpZFjnoJljtwsTf/Su0v0SW8m+rsutjjIDW4lmhfY8zkQ2u7NYXG3hZgqgiSWrK BzV/ER12d5CQod3CAAg44tg1Ifw90WS5/0MdomSmVhO1rBt9yk1/GRhxjLp692RE9M5F nrrg== 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=pNpSIjrPHu2XuHRkXM+DZlFuYn+Q9k1ix/5mVSzNS1M=; b=GCX3YpqOzDn0IKGLjJxMeKnFqZFpCKR5bWY5o9l1EPvC4SY4UCwibJkcbfyXLA8u9s mbxdnlfEmw+EOSpFB/ilEVh2oBx+CJhUamzvaWUeL/WRLdxCU98qVjcKDCV/eWwGRPPS jybPSoQpBchPvInHHOeZvNrfSXzDbuXuZUZE/g0ooIJhfsIoq1a6Ju1GJS7iilGU6shH 4I+PDNaZc/0X9g8TL7BaSs/UgWZaqR2EOL6RNlix4o/jL6oaIUl+Eq1cj4j33yvKO7hu h8dyBOVilfiu6jq1BhuYZAybWg7j8+qwqs0UjiEUOVtDiWxhgLRefJ/Yvj3vOnnEkatm GwQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=RQeCL75p; 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 go16-20020a1709070d9000b0077d26491a9csi12114153ejc.141.2022.12.04.10.32.23; Sun, 04 Dec 2022 10:32:42 -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=RQeCL75p; 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 S230261AbiLDSMN (ORCPT + 82 others); Sun, 4 Dec 2022 13:12:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230156AbiLDSML (ORCPT ); Sun, 4 Dec 2022 13:12:11 -0500 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9660A11149; Sun, 4 Dec 2022 10:12:10 -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=pNpSIjrPHu2XuHRkXM+DZlFuYn+Q9k1ix/5mVSzNS1M=; b=RQeCL75pnV+jtEYcOLfN1SmQiR 3MMItYj8BCAIiXI+i2MzPPlKSju/j4QtjiiLboVZnuCguDJL+mF1UKyCHU0SuTaU6n9ymclRcUGz+ 3V7IfM6hUjnr2HwbEg8IJ4/QL7NaoFjuuqshOjmiY5TZQuBB9ySadUwtjBI1J64NRb0k=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1p1tT9-004Kr8-DE; Sun, 04 Dec 2022 19:12:03 +0100 Date: Sun, 4 Dec 2022 19:12:03 +0100 From: Andrew Lunn To: Piergiorgio Beruto Cc: Heiner Kallweit , Russell King , "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 2/4] phylib: Add support for 10BASE-T1S link modes and PLCA config Message-ID: References: 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 03:30:52AM +0100, Piergiorgio Beruto wrote: > This patch adds the required connection between netlink ethtool and > phylib to resolve PLCA get/set config and get status messages. > Additionally, it adds the link modes for the IEEE 802.3cg Clause 147 > 10BASE-T1S Ethernet PHY. Please break this patch up. > const char *phy_speed_to_str(int speed) > { > - BUILD_BUG_ON_MSG(__ETHTOOL_LINK_MODE_MASK_NBITS != 99, > + BUILD_BUG_ON_MSG(__ETHTOOL_LINK_MODE_MASK_NBITS != 102, > "Enum ethtool_link_mode_bit_indices and phylib are out of sync. " > "If a speed or mode has been added please update phy_speed_to_str " > "and the PHY settings array.\n"); > --- a/include/uapi/linux/ethtool.h > +++ b/include/uapi/linux/ethtool.h > @@ -1741,6 +1741,9 @@ enum ethtool_link_mode_bit_indices { > ETHTOOL_LINK_MODE_800000baseDR8_2_Full_BIT = 96, > ETHTOOL_LINK_MODE_800000baseSR8_Full_BIT = 97, > ETHTOOL_LINK_MODE_800000baseVR8_Full_BIT = 98, > + ETHTOOL_LINK_MODE_10baseT1S_Full_BIT = 99, > + ETHTOOL_LINK_MODE_10baseT1S_Half_BIT = 100, > + ETHTOOL_LINK_MODE_10baseT1S_P2MP_Half_BIT = 101, > > /* must be last entry */ > __ETHTOOL_LINK_MODE_MASK_NBITS > diff --git a/net/ethtool/common.c b/net/ethtool/common.c > index 21cfe8557205..c586db0c5e68 100644 > --- a/net/ethtool/common.c > +++ b/net/ethtool/common.c > @@ -208,6 +208,9 @@ const char link_mode_names[][ETH_GSTRING_LEN] = { > __DEFINE_LINK_MODE_NAME(800000, DR8_2, Full), > __DEFINE_LINK_MODE_NAME(800000, SR8, Full), > __DEFINE_LINK_MODE_NAME(800000, VR8, Full), > + __DEFINE_LINK_MODE_NAME(10, T1S, Full), > + __DEFINE_LINK_MODE_NAME(10, T1S, Half), > + __DEFINE_LINK_MODE_NAME(10, T1S_P2MP, Half), > }; > static_assert(ARRAY_SIZE(link_mode_names) == __ETHTOOL_LINK_MODE_MASK_NBITS); > > @@ -366,6 +371,9 @@ const struct link_mode_info link_mode_params[] = { > __DEFINE_LINK_MODE_PARAMS(800000, DR8_2, Full), > __DEFINE_LINK_MODE_PARAMS(800000, SR8, Full), > __DEFINE_LINK_MODE_PARAMS(800000, VR8, Full), > + __DEFINE_LINK_MODE_PARAMS(10, T1S, Full), > + __DEFINE_LINK_MODE_PARAMS(10, T1S, Half), > + __DEFINE_LINK_MODE_PARAMS(10, T1S_P2MP, Half), > }; > static_assert(ARRAY_SIZE(link_mode_params) == __ETHTOOL_LINK_MODE_MASK_NBITS); This is one logical change, so makes one patch, for example. You are aiming for lots of simple, easy to review, well described, obviously correct patches. Andrew