net: phy: Add c45_phy_ids sysfs directory entry
Subsystems (3)
PATCH v3 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 a new phy_mmd_group, and export the mmd<n>_device_id for the C45 device. These files are invisible to the C22 device.
---
v3: Make code more readable.
v2: Only one value 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 | 112 +++++++++++++++++- 2 files changed, 120 insertions(+), 2 deletions(-)
Documentation/ABI/testing/sysfs-class-net-phydev +10 -0
@@ -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: June 2025 +KernelVersion: 6.17 +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 +110 -2
121 lines not on this page · raw message
Signature · 1 line
2.25.1
Quoted 7 lines · Yajun Deng
The
phy_idfield only shows the PHY ID of the C22 device, and the C45 device did not store its PHY ID in this field.Add a new
phy_mmd_group, and export the mmd<n>_device_id for the C45 device. These files are invisible to the C22 device.Signed-off-by Yajun Deng <[email protected]>
Andrew
This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:
Hello:
This patch was applied to netdev/net-next.git (main) by Paolo Abeni <[email protected]>:
Quoted 9 lines · On Fri, 13 Jun 2025 21:19:03 +0800 you wrote:
The
phy_idfield only shows the PHY ID of the C22 device, and the C45 device did not store its PHY ID in this field.Add a new
phy_mmd_group, and export the mmd<n>_device_id for the C45 device. These files are invisible to the C22 device.Signed-off-by Yajun Deng <[email protected]>[...]
Here is the summary with links:
- [net-next,v3] net: phy: Add c45_phy_ids sysfs directory entry
https://git.kernel.org/netdev/net-next/c/170e4e3944aa
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html