diff mbox series

[net-next] net: mdio-mux: add bus name to bus id

Message ID 00b4bb1e-98f9-b4e7-5549-e095a4701f66@gmail.com (mailing list archive)
State Accepted
Commit 1416ea0ddc1463fb8c9cf12b48f3df82a327e356
Delegated to: Netdev Maintainers
Headers show
Series [net-next] net: mdio-mux: add bus name to bus id | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 10 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Heiner Kallweit March 6, 2022, 2:22 p.m. UTC
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

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
---
 drivers/net/mdio/mdio-mux.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Andrew Lunn March 6, 2022, 3:17 p.m. UTC | #1
On Sun, Mar 06, 2022 at 03:22:34PM +0100, Heiner Kallweit 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
> 
> Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
patchwork-bot+netdevbpf@kernel.org March 8, 2022, 9:40 a.m. UTC | #2
Hello:

This patch was applied to netdev/net-next.git (master)
by Paolo Abeni <pabeni@redhat.com>:

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!
diff mbox series

Patch

diff --git a/drivers/net/mdio/mdio-mux.c b/drivers/net/mdio/mdio-mux.c
index ebd001f0e..a881e3523 100644
--- a/drivers/net/mdio/mdio-mux.c
+++ b/drivers/net/mdio/mdio-mux.c
@@ -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;