All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Kubecek <mkubecek@suse.cz>
To: Dan Murphy <dmurphy@ti.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH ethtool v2 2/2] Update link mode tables for fiber
Date: Fri, 25 Sep 2020 17:54:50 +0200	[thread overview]
Message-ID: <20200925155450.h3gvbba6b3qxqubi@lion.mk-sys.cz> (raw)
In-Reply-To: <20200924175610.22381-2-dmurphy@ti.com>

On Thu, Sep 24, 2020 at 12:56:10PM -0500, Dan Murphy wrote:
> Update the link mode tables to include 100base Fx Full and Half duplex
> modes.
> 
> Signed-off-by: Dan Murphy <dmurphy@ti.com>
> ---
>  ethtool.c          | 6 ++++++
>  netlink/settings.c | 2 ++
>  2 files changed, 8 insertions(+)
> 
> diff --git a/ethtool.c b/ethtool.c
> index ab9b4577cbce..2f71fa92bb09 100644
> --- a/ethtool.c
> +++ b/ethtool.c
> @@ -463,6 +463,8 @@ static void init_global_link_mode_masks(void)
>  		ETHTOOL_LINK_MODE_400000baseLR4_ER4_FR4_Full_BIT,
>  		ETHTOOL_LINK_MODE_400000baseDR4_Full_BIT,
>  		ETHTOOL_LINK_MODE_400000baseCR4_Full_BIT,
> +		ETHTOOL_LINK_MODE_100baseFX_Half_BIT,
> +		ETHTOOL_LINK_MODE_100baseFX_Full_BIT,
>  	};
>  	static const enum ethtool_link_mode_bit_indices
>  		additional_advertised_flags_bits[] = {
> @@ -659,6 +661,10 @@ static void dump_link_caps(const char *prefix, const char *an_prefix,
>  		  "200000baseDR4/Full" },
>  		{ 0, ETHTOOL_LINK_MODE_200000baseCR4_Full_BIT,
>  		  "200000baseCR4/Full" },
> +		{ 0, ETHTOOL_LINK_MODE_100baseFX_Half_BIT,
> +		  "100baseFx/Half" },
> +		{ 1, ETHTOOL_LINK_MODE_100baseFX_Full_BIT,
> +		  "100baseFx/Full" },
>  	};
>  	int indent;
>  	int did1, new_line_pend;

This table seems to be missing many other modes but I'll rather fix that
in a separate commit.

> diff --git a/netlink/settings.c b/netlink/settings.c
> index 3059d4d0d0b7..41a2e5af1945 100644
> --- a/netlink/settings.c
> +++ b/netlink/settings.c
> @@ -162,6 +162,8 @@ static const struct link_mode_info link_modes[] = {
>  	[ETHTOOL_LINK_MODE_400000baseLR4_ER4_FR4_Full_BIT] = __REAL(400000),
>  	[ETHTOOL_LINK_MODE_400000baseDR4_Full_BIT]	= __REAL(400000),
>  	[ETHTOOL_LINK_MODE_400000baseCR4_Full_BIT]	= __REAL(400000),
> +	[ETHTOOL_LINK_MODE_100baseFX_Half_BIT]		= __HALF_DUPLEX(100),
> +	[ETHTOOL_LINK_MODE_100baseFX_Full_BIT]		= __REAL(100),
>  };
>  const unsigned int link_modes_count = ARRAY_SIZE(link_modes);
>  

Please update also the table in ethtool.8.in

Michal

> -- 
> 2.28.0.585.ge1cfff676549
> 

      reply	other threads:[~2020-09-25 15:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-24 17:56 [PATCH ethtool v2 1/2] update UAPI header copies Dan Murphy
2020-09-24 17:56 ` [PATCH ethtool v2 2/2] Update link mode tables for fiber Dan Murphy
2020-09-25 15:54   ` Michal Kubecek [this message]

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=20200925155450.h3gvbba6b3qxqubi@lion.mk-sys.cz \
    --to=mkubecek@suse.cz \
    --cc=dmurphy@ti.com \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.