Skip to contentSkip to conversation

net: mdio_bus: change the bus name to mdio

PATCH In review Yajun Deng 3 participants 4 messages Dec 19, 2024 – Dec 20, 2024

Subsystems (3)
lore
Share & tools
lore

Yajun Deng

author
#0 lore raw

PATCH v2 1/1 net: mdio_bus: change the bus name to mdio

Since all directories under the /sys/bus are bus, we don't need to add a bus suffix to mdio.

This is the only one directory with the bus suffix, sysfs-bus-mdio is now a testing ABI, and didn't have Users in it. This is the time to change it before it's moved to the stable ABI.

Change the bus name to mdio and update sysfs-bus-mdio.

---
v2: update sysfs-bus-mdio
v1: https://lore.kernel.org/all/[email protected]/

---
 Documentation/ABI/testing/sysfs-bus-mdio | 54 ++++++++++++------------
 drivers/net/phy/mdio_bus.c               |  2 +-
 2 files changed, 28 insertions(+), 28 deletions(-)
Documentation/ABI/testing/sysfs-bus-mdio +27 -27
index 38be04dfc05e..a1fad1d0b8fa 100644
@@ -1,72 +1,72 @@
-What:          /sys/bus/mdio_bus/devices/.../statistics/
+What:          /sys/bus/mdio/devices/.../statistics/
 What:          /sys/class/mdio_bus/.../statistics/
-Date:          January 2020
-KernelVersion: 5.6
+Date:          January 2025
+KernelVersion: 6.13
 Contact:       [email protected]
 Description:
 		This folder contains statistics about global and per
 		MDIO bus address statistics.
 
-What:          /sys/bus/mdio_bus/devices/.../statistics/transfers
+What:          /sys/bus/mdio/devices/.../statistics/transfers
 What:          /sys/class/mdio_bus/.../transfers
-Date:          January 2020
-KernelVersion: 5.6
+Date:          January 2025
+KernelVersion: 6.13
 Contact:       [email protected]
 Description:
 		Total number of transfers for this MDIO bus.
 
-What:          /sys/bus/mdio_bus/devices/.../statistics/errors
+What:          /sys/bus/mdio/devices/.../statistics/errors
 What:          /sys/class/mdio_bus/.../statistics/errors
-Date:          January 2020
-KernelVersion: 5.6
+Date:          January 2025
+KernelVersion: 6.13
 Contact:       [email protected]
 Description:
 		Total number of transfer errors for this MDIO bus.
 
-What:          /sys/bus/mdio_bus/devices/.../statistics/writes
+What:          /sys/bus/mdio/devices/.../statistics/writes
 What:          /sys/class/mdio_bus/.../statistics/writes
-Date:          January 2020
-KernelVersion: 5.6
+Date:          January 2025
+KernelVersion: 6.13
 Contact:       [email protected]
 Description:
 		Total number of write transactions for this MDIO bus.
 
-What:          /sys/bus/mdio_bus/devices/.../statistics/reads
+What:          /sys/bus/mdio/devices/.../statistics/reads
 What:          /sys/class/mdio_bus/.../statistics/reads
-Date:          January 2020
-KernelVersion: 5.6
+Date:          January 2025
+KernelVersion: 6.13
 Contact:       [email protected]
 Description:
 		Total number of read transactions for this MDIO bus.
 
-What:          /sys/bus/mdio_bus/devices/.../statistics/transfers_<addr>
+What:          /sys/bus/mdio/devices/.../statistics/transfers_<addr>
 What:          /sys/class/mdio_bus/.../statistics/transfers_<addr>
-Date:          January 2020
-KernelVersion: 5.6
+Date:          January 2025
+KernelVersion: 6.13
 Contact:       [email protected]
 Description:
 		Total number of transfers for this MDIO bus address.
 
-What:          /sys/bus/mdio_bus/devices/.../statistics/errors_<addr>
+What:          /sys/bus/mdio/devices/.../statistics/errors_<addr>
 What:          /sys/class/mdio_bus/.../statistics/errors_<addr>
-Date:          January 2020
-KernelVersion: 5.6
+Date:          January 2025
+KernelVersion: 6.13
 Contact:       [email protected]
 Description:
 		Total number of transfer errors for this MDIO bus address.
 
-What:          /sys/bus/mdio_bus/devices/.../statistics/writes_<addr>
+What:          /sys/bus/mdio/devices/.../statistics/writes_<addr>
 What:          /sys/class/mdio_bus/.../statistics/writes_<addr>
-Date:          January 2020
-KernelVersion: 5.6
+Date:          January 2025
+KernelVersion: 6.13
 Contact:       [email protected]
 Description:
 		Total number of write transactions for this MDIO bus address.
 
-What:          /sys/bus/mdio_bus/devices/.../statistics/reads_<addr>
+What:          /sys/bus/mdio/devices/.../statistics/reads_<addr>
 What:          /sys/class/mdio_bus/.../statistics/reads_<addr>
-Date:          January 2020
-KernelVersion: 5.6
+Date:          January 2025
+KernelVersion: 6.13
 Contact:       [email protected]
 Description:
 		Total number of read transactions for this MDIO bus address.
drivers/net/phy/mdio_bus.c +1 -1
index 7e2f10182c0c..20dd59208973 100644
@@ -1425,7 +1425,7 @@ static const struct attribute_group *mdio_bus_dev_groups[] = {
 };
 
 const struct bus_type mdio_bus_type = {
-	.name		= "mdio_bus",
+	.name		= "mdio",
 	.dev_groups	= mdio_bus_dev_groups,
 	.match		= mdio_bus_match,
 	.uevent		= mdio_uevent,
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 6 lines · Yajun Deng

Since all directories under the /sys/bus are bus, we don't need to add a bus suffix to mdio.

This is the only one directory with the bus suffix, sysfs-bus-mdio is now a testing ABI, and didn't have Users in it. This is the time to change it before it's moved to the stable ABI.

So are you saying nobody has udev scripts referencing MDIO devices? Nobody has scripts accessing the statistics? You don't expect anything in userspace to break because of this change?

I personally think it is too late to change this, something will break and somebody will report a regression.

Andrew

#2 lore raw
Quoted 8 lines · Andrew Lunn
Quoted 6 lines · Yajun Deng

Since all directories under the /sys/bus are bus, we don't need to add a bus suffix to mdio.

This is the only one directory with the bus suffix, sysfs-bus-mdio is now a testing ABI, and didn't have Users in it. This is the time to change it before it's moved to the stable ABI.

Quoted 6 lines

So are you saying nobody has udev scripts referencing MDIO devices? Nobody has scripts accessing the statistics? You don't expect anything in userspace to break because of this change?

I personally think it is too late to change this, something will break and somebody will report a regression.

It is too late, merging this patch would be breaking ABI and that is not acceptable.

Signature · 1 line
Florian
author
#3 lore raw
Quoted 22 lines · Florian Fainelli
Quoted 19 lines · Andrew Lunn
Quoted 11 lines · Yajun Deng

Since all directories under the /sys/bus are bus, we don't need to add a

bus suffix to mdio.

This is the only one directory with the bus suffix, sysfs-bus-mdio is

now a testing ABI, and didn't have Users in it. This is the time to change

it before it's moved to the stable ABI.

So are you saying nobody has udev scripts referencing MDIO devices?

Nobody has scripts accessing the statistics? You don't expect anything

Quoted 9 lines
Quoted 6 lines

in userspace to break because of this change?

I personally think it is too late to change this, something will break

and somebody will report a regression.

It is too late, merging this patch would be breaking ABI and that is not acceptable.

Okay, I got it.

Quoted 2 lines

-- Florian