lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 20 Aug 2023 21:39:19 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Paul Greenwalt <paul.greenwalt@...el.com>
Cc: intel-wired-lan@...ts.osuosl.org, netdev@...r.kernel.org,
	pawel.chmielewski@...el.com, aelior@...vell.com,
	manishc@...vell.com
Subject: Re: [PATCH iwl-next v2 3/9] ethtool: Add missing ETHTOOL_LINK_MODE_
 to forced speed map

On Sat, Aug 19, 2023 at 02:40:25AM -0700, Paul Greenwalt wrote:
> 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,

Is this supposed to list all 10Mbps link modes? Or only full duplex
modes?

settings[] has:

	PHY_SETTING(     10, FULL,     10baseT_Full		),
	PHY_SETTING(     10, HALF,     10baseT_Half		),
	PHY_SETTING(     10, FULL,     10baseT1L_Full		),
	PHY_SETTING(     10, FULL,     10baseT1S_Full		),
	PHY_SETTING(     10, HALF,     10baseT1S_Half		),
	PHY_SETTING(     10, HALF,     10baseT1S_P2MP_Half	),

> +};
> +
> +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,
> +};

	PHY_SETTING(    100, FULL,    100baseT_Full		),
	PHY_SETTING(    100, FULL,    100baseT1_Full		),
	PHY_SETTING(    100, HALF,    100baseT_Half		),
	PHY_SETTING(    100, HALF,    100baseFX_Half		),
	PHY_SETTING(    100, FULL,    100baseFX_Full		),

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ