[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a059f997-4703-5b83-43ef-7790e53f93ca@intel.com>
Date: Mon, 21 Aug 2023 15:03:17 +0200
From: Alexander Lobakin <aleksander.lobakin@...el.com>
To: Paul Greenwalt <paul.greenwalt@...el.com>
CC: <intel-wired-lan@...ts.osuosl.org>, <andrew@...n.ch>,
<aelior@...vell.com>, <manishc@...vell.com>, <netdev@...r.kernel.org>
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v2 3/9] ethtool: Add missing
ETHTOOL_LINK_MODE_ to forced speed map
From: Paul Greenwalt <paul.greenwalt@...el.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@...el.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
Powered by blists - more mailing lists