projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
123b365
)
net: dsa: Provide unique DSA slave MII bus names
author
Florian Fainelli
<
[email protected]
>
Tue, 7 Jun 2016 23:32:38 +0000
(16:32 -0700)
committer
David S. Miller
<
[email protected]
>
Wed, 8 Jun 2016 18:23:41 +0000
(11:23 -0700)
In case we have multiples trees and switches with the same index, we
need to add another discriminating id: the switch tree.
Reviewed-by: Andrew Lunn <
[email protected]
>
Reviewed-by: Vivien Didelot <
[email protected]
>
Signed-off-by: Florian Fainelli <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
net/dsa/slave.c
patch
|
blob
|
history
diff --git
a/net/dsa/slave.c
b/net/dsa/slave.c
index 15a4922618952b4c0de337e4253642e772d2fffe..a51dfedf0014dbf104de3e8811be5e7989de33a0 100644
(file)
--- a/
net/dsa/slave.c
+++ b/
net/dsa/slave.c
@@
-49,7
+49,8
@@
void dsa_slave_mii_bus_init(struct dsa_switch *ds)
ds->slave_mii_bus->name = "dsa slave smi";
ds->slave_mii_bus->read = dsa_slave_phy_read;
ds->slave_mii_bus->write = dsa_slave_phy_write;
- snprintf(ds->slave_mii_bus->id, MII_BUS_ID_SIZE, "dsa-%d", ds->index);
+ snprintf(ds->slave_mii_bus->id, MII_BUS_ID_SIZE, "dsa-%d.%d",
+ ds->dst->tree, ds->index);
ds->slave_mii_bus->parent = ds->dev;
ds->slave_mii_bus->phy_mask = ~ds->phys_mii_mask;
}