From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: Paul Greenwalt <paul.greenwalt@intel.com>
Cc: aelior@marvell.com, andrew@lunn.ch,
intel-wired-lan@lists.osuosl.org, manishc@marvell.com,
netdev@vger.kernel.org
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v2 3/9] ethtool: Add missing ETHTOOL_LINK_MODE_ to forced speed map
Date: Mon, 21 Aug 2023 15:03:17 +0200 [thread overview]
Message-ID: <a059f997-4703-5b83-43ef-7790e53f93ca@intel.com> (raw)
In-Reply-To: <20230819094025.15196-1-paul.greenwalt@intel.com>
From: Paul Greenwalt <paul.greenwalt@intel.com>
Date: Sat, 19 Aug 2023 02:40:25 -0700
> The Ethtool forced speeds to Ethtool supported link modes map is missing
> some Ethtool forced speeds and ETHTOOL_LINK_MODE_. Add the all speeds
> and mapped link modes to provide a common implementation among drivers.
>
> Signed-off-by: Paul Greenwalt <paul.greenwalt@intel.com>
> ---
> include/linux/ethtool.h | 80 +++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 80 insertions(+)
>
> diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
> index 245fd4a8d85b..519d6ec73d98 100644
> --- a/include/linux/ethtool.h
> +++ b/include/linux/ethtool.h
> @@ -1069,12 +1069,33 @@ struct ethtool_forced_speed_map {
> .arr_size = ARRAY_SIZE(ethtool_forced_speed_##value), \
> }
>
> +static const u32 ethtool_forced_speed_10[] __initconst = {
> + ETHTOOL_LINK_MODE_10baseT_Full_BIT,
> + ETHTOOL_LINK_MODE_10baseT1L_Full_BIT,
> + ETHTOOL_LINK_MODE_10baseT1S_Full_BIT,
> +};
> +
> +static const u32 ethtool_forced_speed_100[] __initconst = {
> + ETHTOOL_LINK_MODE_100baseT_Full_BIT,
> + ETHTOOL_LINK_MODE_100baseFX_Half_BIT,
> + ETHTOOL_LINK_MODE_100baseFX_Full_BIT,
> +};
> +
> static const u32 ethtool_forced_speed_1000[] __initconst = {
> ETHTOOL_LINK_MODE_1000baseT_Full_BIT,
> ETHTOOL_LINK_MODE_1000baseKX_Full_BIT,
> ETHTOOL_LINK_MODE_1000baseX_Full_BIT,
> };
>
> +static const u32 ethtool_forced_speed_2500[] __initconst = {
> + ETHTOOL_LINK_MODE_2500baseT_Full_BIT,
> + ETHTOOL_LINK_MODE_2500baseX_Full_BIT,
> +};
> +
> +static const u32 ethtool_forced_speed_5000[] __initconst = {
> + ETHTOOL_LINK_MODE_5000baseT_Full_BIT,
> +};
> +
> static const u32 ethtool_forced_speed_10000[] __initconst = {
> ETHTOOL_LINK_MODE_10000baseT_Full_BIT,
> ETHTOOL_LINK_MODE_10000baseKR_Full_BIT,
> @@ -1084,10 +1105,12 @@ static const u32 ethtool_forced_speed_10000[] __initconst = {
> ETHTOOL_LINK_MODE_10000baseSR_Full_BIT,
> ETHTOOL_LINK_MODE_10000baseLR_Full_BIT,
> ETHTOOL_LINK_MODE_10000baseLRM_Full_BIT,
> + ETHTOOL_LINK_MODE_10000baseER_Full_BIT,
But some HW can support different link modes. I mean, it's not
guaranteed QLogic HW really does support ER mode even if Intel HW does
(same for others).
Or am I missing something?
> };
>
> static const u32 ethtool_forced_speed_20000[] __initconst = {
> ETHTOOL_LINK_MODE_20000baseKR2_Full_BIT,
> + ETHTOOL_LINK_MODE_20000baseMLD2_Full_BIT,
> };
Thanks,
Olek
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
next prev parent reply other threads:[~2023-08-21 13:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-19 9:40 [Intel-wired-lan] [PATCH iwl-next v2 3/9] ethtool: Add missing ETHTOOL_LINK_MODE_ to forced speed map Paul Greenwalt
2023-08-20 19:39 ` Andrew Lunn
2023-08-21 13:03 ` Alexander Lobakin [this message]
2023-08-21 13:03 ` kernel test robot
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=a059f997-4703-5b83-43ef-7790e53f93ca@intel.com \
--to=aleksander.lobakin@intel.com \
--cc=aelior@marvell.com \
--cc=andrew@lunn.ch \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=manishc@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=paul.greenwalt@intel.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