Skip to contentSkip to conversation

net: phy: Add c45_phy_ids sysfs directory entry

PATCH Superseded Yajun Deng 2 participants 2 messages May 26, 2025

Subsystems (3)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Yajun Deng

author
#0 lore raw

PATCH v2 1/1 net: phy: Add c45_phy_ids sysfs directory entry

The phy_id field only shows the PHY ID of the C22 device, and the C45 device did not store its PHY ID in this field.

Add the new phy_mmd_group, and export the mmd<n>_device_id for the C45 device. These files are invisible to the C22 device.

---
v2: Only one vale for per file and invisible to the C22 device.
v1: https://lore.kernel.org/all/[email protected]/

---
 .../ABI/testing/sysfs-class-net-phydev        | 10 +++
 drivers/net/phy/phy_device.c                  | 62 ++++++++++++++++++-
 2 files changed, 70 insertions(+), 2 deletions(-)
Documentation/ABI/testing/sysfs-class-net-phydev +10 -0
index ac722dd5e694..c97029d77b16 100644
@@ -26,6 +26,16 @@ Description:
 		This ID is used to match the device with the appropriate
 		driver.
 
+What:		/sys/class/mdio_bus/<bus>/<device>/c45_phy_ids/mmd<n>_device_id
+Date:		May 2025
+KernelVersion:	6.16
+Contact:	[email protected]
+Description:
+		This attribute contains the 32-bit PHY Identifier as reported
+		by the device during bus enumeration, encoded in hexadecimal.
+		These C45 IDs are used to match the device with the appropriate
+		driver. These files are invisible to the C22 device.
+
 What:		/sys/class/mdio_bus/<bus>/<device>/phy_interface
 Date:		February 2014
 KernelVersion:	3.15
drivers/net/phy/phy_device.c +60 -2

71 lines not on this page · raw message

Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 7 lines · Yajun Deng

The phy_id field only shows the PHY ID of the C22 device, and the C45 device did not store its PHY ID in this field.

Add the new phy_mmd_group, and export the mmd<n>_device_id for the C45 device. These files are invisible to the C22 device.

## Form letter - net-next-closed

The merge window for v6.16 has begun and therefore net-next is closed for new drivers, features, code refactoring and optimizations. We are currently accepting bug fixes only.

Please repost when net-next reopens after June 8th.

RFC patches sent for review only are obviously welcome at any time.