Skip to contentSkip to conversation

net: mdio-mux: add bus name to bus id

PATCH Applied Heiner Kallweit 3 participants 3 messages Mar 6, 2022 – Mar 8, 2022

Subsystems (3)
lore
Share & tools
lore

Heiner Kallweit

author maintainer
#0 lore raw

PATCH 1/1 net: mdio-mux: add bus name to bus id

In case of DT-configured systems it may be hard to identify the PHY interrupt in the /proc/interrupts output. Therefore add the name to the id to make clearer that it's about a device on a muxed mdio bus. In my case:

Now: mdio_mux-0.e40908ff:08
Before: 0.e40908ff:08

---
 drivers/net/mdio/mdio-mux.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/mdio/mdio-mux.c +2 -2
index ebd001f0e..a881e3523 100644
@@ -168,8 +168,8 @@ int mdio_mux_init(struct device *dev,
 		cb->mii_bus->priv = cb;
 
 		cb->mii_bus->name = "mdio_mux";
-		snprintf(cb->mii_bus->id, MII_BUS_ID_SIZE, "%x.%x",
-			 pb->parent_id, v);
+		snprintf(cb->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x.%x",
+			 cb->mii_bus->name, pb->parent_id, v);
 		cb->mii_bus->parent = dev;
 		cb->mii_bus->read = mdio_mux_read;
 		cb->mii_bus->write = mdio_mux_write;
Signature · 1 line
2.35.1
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Heiner Kallweit

In case of DT-configured systems it may be hard to identify the PHY interrupt in the /proc/interrupts output. Therefore add the name to the id to make clearer that it's about a device on a muxed mdio bus. In my case:

Now: mdio_mux-0.e40908ff:08
Before: 0.e40908ff:08

Andrew

#2 lore raw
In reply to Heiner Kallweit
This patch was applied to netdev/net-next.git (master) by Paolo Abeni <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by Paolo Abeni <[email protected]>:

Quoted 9 lines · On Sun, 6 Mar 2022 15:22:34 +0100 you wrote:

In case of DT-configured systems it may be hard to identify the PHY interrupt in the /proc/interrupts output. Therefore add the name to the id to make clearer that it's about a device on a muxed mdio bus. In my case:

Now: mdio_mux-0.e40908ff:08
Before: 0.e40908ff:08

[...]

Here is the summary with links:
- [net-next] net: mdio-mux: add bus name to bus id

    https://git.kernel.org/netdev/net-next/c/1416ea0ddc14

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html