sh-eth: use an unique MDIO bus name.
authorFlorian Fainelli <florian@openwrt.org>
Mon, 9 Jan 2012 23:59:17 +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/renesas/sh_eth.c

index fc9bda9bc36c841597b13e231941343ba9486ee2..6ece4295d78fd8cd16deafd28cf377f937b4aa92 100644 (file)
@@ -1702,7 +1702,8 @@ static int sh_mdio_init(struct net_device *ndev, int id,
        /* Hook up MII support for ethtool */
        mdp->mii_bus->name = "sh_mii";
        mdp->mii_bus->parent = &ndev->dev;
-       snprintf(mdp->mii_bus->id, MII_BUS_ID_SIZE, "%x", id);
+       snprintf(mdp->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
+               mdp->pdev->name, pdid);
 
        /* PHY IRQ */
        mdp->mii_bus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL);