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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <9446c349e725cf97021e8f205333d825d48de362.camel@gmail.com>
Date: Wed, 12 Nov 2025 08:32:36 -0800
From: Alexander H Duyck <alexander.duyck@...il.com>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
Cc: netdev@...r.kernel.org, kuba@...nel.org, kernel-team@...a.com, 
	andrew+netdev@...n.ch, hkallweit1@...il.com, pabeni@...hat.com, 
	davem@...emloft.net
Subject: Re: [net-next PATCH v3 02/10] net: phy: Rename MDIO_CTRL1_SPEED for
 2.5G and 5G to reflect PMA values

On Wed, 2025-11-12 at 10:42 +0000, Russell King (Oracle) wrote:
> On Mon, Nov 10, 2025 at 08:01:10AM -0800, Alexander Duyck wrote:
> > From: Alexander Duyck <alexanderduyck@...com>
> > 
> > The 2.5G and 5G values are not consistent between the PCS CTRL1 and PMA
> > CTRL1 values. In order to avoid confusion between the two I am updating the
> > values to include "PMA" in the name similar to values used in similar
> > places.
> 
> As this us UAPI, please _add_ new values with _PCS_ and _PMA_ infixes
> rather than renaming existing definitionsi.
> 
> Thanks.

Sorry about that. I had overlooked that this was UAPI.

Would something like the following add-on work, or would you prefer I
just don't touch the existing defines?

diff --git a/include/uapi/linux/mdio.h b/include/uapi/linux/mdio.h
index 75ed41fc46c6..e80bcad1b278 100644
--- a/include/uapi/linux/mdio.h
+++ b/include/uapi/linux/mdio.h
@@ -116,6 +116,14 @@
 #define MDIO_CTRL1_SPEED10G            (MDIO_CTRL1_SPEEDSELEXT | 0x00)
 /* 10PASS-TS/2BASE-TL */
 #define MDIO_CTRL1_SPEED10P2B          (MDIO_CTRL1_SPEEDSELEXT | 0x04)
+/* The MDIO_CTRL1_SPEED_XXX values for everything past 10PASS-TS/2BASE-TL do
+ * not match between the PCS and PMA values. For this reason any additions past
+ * this point should be PMA or PCS specific. The following 2 defines are
+ * workarounds for values added before this was caught. They should be
+ * considered deprecated.
+ */
+#define MDIO_CTRL1_SPEED2_5G           MDIO_PMA_CTRL1_SPEED2_5G
+#define MDIO_CTRL1_SPEED5G             MDIO_PMA_CTRL1_SPEED5G
 /* 100 Gb/s */
 #define MDIO_PMA_CTRL1_SPEED100G       (MDIO_CTRL1_SPEEDSELEXT | 0x0c)
 /* 25 Gb/s */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ