public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Piergiorgio Beruto <piergiorgio.beruto@gmail.com>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	Oleksij Rempel <o.rempel@pengutronix.de>
Subject: Re: [PATCH net-next 2/4] phylib: Add support for 10BASE-T1S link modes and PLCA config
Date: Sun, 4 Dec 2022 19:12:03 +0100	[thread overview]
Message-ID: <Y4zi8ySOlmKP0kgg@lunn.ch> (raw)
In-Reply-To: <b2fffe32ffb0f6a6b4547e2e115bfad6c1139f70.1670119328.git.piergiorgio.beruto@gmail.com>

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

  parent reply	other threads:[~2022-12-04 18:12 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1670119328.git.piergiorgio.beruto@gmail.com>
2022-12-04  2:30 ` [PATCH net-next 1/4] net/ethtool: Add netlink interface for the PLCA RS Piergiorgio Beruto
2022-12-04  2:37   ` Randy Dunlap
2022-12-04  2:49     ` Piergiorgio Beruto
2022-12-04  3:01       ` Randy Dunlap
2022-12-04  2:30 ` [PATCH net-next 2/4] phylib: Add support for 10BASE-T1S link modes and PLCA config Piergiorgio Beruto
2022-12-04 16:45   ` Russell King (Oracle)
2022-12-04 18:04     ` Piergiorgio Beruto
2022-12-04 18:12   ` Andrew Lunn [this message]
2022-12-04 20:09     ` Piergiorgio Beruto
2022-12-04  2:31 ` [PATCH net-next 3/4] drivers/net/phy: Add driver for the onsemi NCN26000 10BASE-T1S PHY Piergiorgio Beruto
2022-12-04 16:52   ` Russell King (Oracle)
2022-12-04 17:23     ` Andrew Lunn
2022-12-04 18:00     ` Andrew Lunn
2022-12-04 20:11       ` Piergiorgio Beruto
2022-12-04 18:40     ` Piergiorgio Beruto
2022-12-04 18:58       ` Andrew Lunn
2022-12-04 19:48         ` Piergiorgio Beruto
2022-12-04  2:32 ` [PATCH net-next 4/4] driver/ncn26000: add PLCA support Piergiorgio Beruto
2022-12-04 17:06   ` Russell King (Oracle)
2022-12-04 17:36     ` Andrew Lunn
2022-12-04 18:48     ` Andrew Lunn
2022-12-04 20:09       ` Piergiorgio Beruto
2022-12-04 20:22         ` Russell King (Oracle)
2022-12-04 20:33           ` Piergiorgio Beruto
2022-12-04 20:29     ` Piergiorgio Beruto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y4zi8ySOlmKP0kgg@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=pabeni@redhat.com \
    --cc=piergiorgio.beruto@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox