Skip to contentSkip to conversation

net: phy: Add sysfs attribute for PHY c45 identifiers.

PATCH NAK Jianhui Zhao 3 participants 3 messages Jun 16, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v5 1/1 net: phy: Add sysfs attribute for PHY c45 identifiers.

If a phydevice use c45, its phy_id property is always 0, so this adds a c45_ids sysfs attribute group contains mmd id attributes from mmd0 to mmd31 to MDIO devices. Note that only mmd with valid value will exist. This attribute group can be useful when debugging problems related to phy drivers.

Likes this:
/sys/bus/mdio_bus/devices/mdio-bus:05/c45_ids/mmd1 /sys/bus/mdio_bus/devices/mdio-bus:05/c45_ids/mmd2
...
/sys/bus/mdio_bus/devices/mdio-bus:05/c45_ids/mmd31

---
V4 -> V5: Remove cast operation and use macro to convert attribute to a phy_c45_devid_attribute. V3 -> V4: Only mmd with valid value will exist.
V2 -> V3: Use the most efficient implementation.
V1 -> V2: putting all 32 values in a subdirectory, one file per MMD

 .../ABI/testing/sysfs-class-net-phydev        |  10 ++
 drivers/net/phy/phy_device.c                  | 124 +++++++++++++++++-
 2 files changed, 133 insertions(+), 1 deletion(-)
Documentation/ABI/testing/sysfs-class-net-phydev +10 -0
index ac722dd5e694..58a0a150229d 100644
@@ -63,3 +63,13 @@ Description:
 		only used internally by the kernel and their placement are
 		not meant to be stable across kernel versions. This is intended
 		for facilitating the debugging of PHY drivers.
+
+What:		/sys/class/mdio_bus/<bus>/<device>/c45_ids/mmd<n>
+Date:		November 2023
+KernelVersion:	6.4
+Contact:	[email protected]
+Description:
+		This attribute group c45_ids contains mmd id attributes from mmd0 to mmd31
+		as reported by the device during bus enumeration, encoded in hexadecimal.
+		Note that only mmd with valid value will exist. This ID is used to match
+		the device with the appropriate driver.
drivers/net/phy/phy_device.c +123 -1

130 lines not on this page · raw message

Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 12 lines · Jianhui Zhao

If a phydevice use c45, its phy_id property is always 0, so this adds a c45_ids sysfs attribute group contains mmd id attributes from mmd0 to mmd31 to MDIO devices. Note that only mmd with valid value will exist. This attribute group can be useful when debugging problems related to phy drivers.

Likes this:
/sys/bus/mdio_bus/devices/mdio-bus:05/c45_ids/mmd1 /sys/bus/mdio_bus/devices/mdio-bus:05/c45_ids/mmd2
...
/sys/bus/mdio_bus/devices/mdio-bus:05/c45_ids/mmd31

Quoted 3 lines

Did you read Russells comments? And Jakubs? Please don't ignore them.

Andrew

---
pw-bot: cr

#2 lore raw
In reply to Jianhui Zhao
Quoted 12 lines · Jianhui Zhao

If a phydevice use c45, its phy_id property is always 0, so this adds a c45_ids sysfs attribute group contains mmd id attributes from mmd0 to mmd31 to MDIO devices. Note that only mmd with valid value will exist. This attribute group can be useful when debugging problems related to phy drivers.

Likes this:
/sys/bus/mdio_bus/devices/mdio-bus:05/c45_ids/mmd1 /sys/bus/mdio_bus/devices/mdio-bus:05/c45_ids/mmd2
...
/sys/bus/mdio_bus/devices/mdio-bus:05/c45_ids/mmd31

Quoted 3 lines

NAK, because you haven't listened to all of the feedback that's been given to you.

1. You haven't taken on my suggestion for reformatting the if().
2. You haven't updated my Reviewed-by, which in any case was conditional on the acceptance of all of my review comments.
3. You haven't removed Andrew's reviewed-by which he hasn't given you, and thus your commit message is a lie.
4. You haven't obeyed the "do not repost in under 24 hours"

I do not expect to see you post a V6 before at the very earliest Monday, and if you do, I will NAK it purely on that point, and you will get an even stronger email from me.

Stop adding unnecessarily to reviewers workloads.

Thanks.

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