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]
Message-ID: <ZwZHAZrqLY1EBRHM@shell.armlinux.org.uk>
Date: Wed, 9 Oct 2024 10:04:01 +0100
From: "Russell King (Oracle)" <linux@...linux.org.uk>
To: Vineeth Karumanchi <vineeth.karumanchi@....com>
Cc: nicolas.ferre@...rochip.com, claudiu.beznea@...on.dev,
	davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
	pabeni@...hat.com, robh@...nel.org, krzk+dt@...nel.org,
	conor+dt@...nel.org, andrew@...n.ch, netdev@...r.kernel.org,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
	git@....com
Subject: Re: [RFC PATCH net-next 3/5] net: macb: Update USX_CONTROL reg's
 bitfields and constants.

On Wed, Oct 09, 2024 at 11:09:44AM +0530, Vineeth Karumanchi wrote:
> New bitfeilds of USX_CONTROL register:
> - GEM_RX_SYNC: RX Reset: Reset the receive datapath.
> 
> Constants of the bitfeilds in USX_CONTROL reg:
> - HS_SPEED_*: Multiple speed constants of USX_SPEED bitfeild.
> - MACB_SERDES_RATE_*: Multiple serdes rate constants of
>   SERDES_RATE bitfeild.
> 
> Since MACB_SERDES_RATE_* and HS_SPEED_* are register constants,
> move them to the header file.
> 
> Signed-off-by: Vineeth Karumanchi <vineeth.karumanchi@....com>

...

> +/* Constants for USX_CONTROL */
> +#define HS_SPEED_10000M				4
> +#define HS_SPEED_5000M				3
> +#define HS_SPEED_2500M				2
> +#define HS_SPEED_1000M				1
> +#define MACB_SERDES_RATE_10G			1
> +#define MACB_SERDES_RATE_5G			0
> +#define MACB_SERDES_RATE_2_5G			0
> +#define MACB_SERDES_RATE_1G			0

I'm not sure having multiple definitions for the same value for the same
field makes sense. Maybe call it MACB_SERDES_RATE_5G_2G5_1G ?

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ