stmmac: use an unique MDIO bus name.
authorFlorian Fainelli <florian@openwrt.org>
Mon, 9 Jan 2012 23:59:20 +0000 (23:59 +0000)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Jan 2012 00:35:01 +0000 (16:35 -0800)
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c

index ee85a14853f51ba21d68f79e97b16c04b3bc6481..96fa2da307630f1e46df75441af10c91f0fd4c79 100644 (file)
@@ -307,7 +307,7 @@ static int stmmac_init_phy(struct net_device *dev)
        priv->speed = 0;
        priv->oldduplex = -1;
 
-       snprintf(bus_id, MII_BUS_ID_SIZE, "%x", priv->plat->bus_id);
+       snprintf(bus_id, MII_BUS_ID_SIZE, "stmmac-%x", priv->plat->bus_id);
        snprintf(phy_id, MII_BUS_ID_SIZE + 3, PHY_ID_FMT, bus_id,
                 priv->plat->phy_addr);
        pr_debug("stmmac_init_phy:  trying to attach to %s\n", phy_id);
index 51f4412339627c4a09cbd1ac0fae90ddd1d4f40d..da4a1042523a633e5781f86df7ffe4e123c09910 100644 (file)
@@ -158,7 +158,8 @@ int stmmac_mdio_register(struct net_device *ndev)
        new_bus->read = &stmmac_mdio_read;
        new_bus->write = &stmmac_mdio_write;
        new_bus->reset = &stmmac_mdio_reset;
-       snprintf(new_bus->id, MII_BUS_ID_SIZE, "%x", mdio_bus_data->bus_id);
+       snprintf(new_bus->id, MII_BUS_ID_SIZE, "%s-%x",
+               new_bus->name, mdio_bus_data->bus_id);
        new_bus->priv = ndev;
        new_bus->irq = irqlist;
        new_bus->phy_mask = mdio_bus_data->phy_mask;