bcm63xx-enet: fix PHY name to match MDIO bus name
authorFlorian Fainelli <florian@openwrt.org>
Mon, 13 Feb 2012 01:23:21 +0000 (01:23 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Feb 2012 21:04:08 +0000 (16:04 -0500)
Commit 3e617506: bcm63xx_enet: use an unique MDIO bus name introduced
a regression in the PHY connection logic, since the PHY name was formatted
to expect the bus name to be "0" or "1", whereas it is now "bcm63xx-enet-0"
or "bcm63xx-enet-1".

Reported-by: Joel EJC <joel_ejc@yahoofr>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bcm63xx_enet.c

index 986019b2c8490726f74ad31770aeece308117168..c7ca7ec065eeea7dfe164f96384ec3aaf464809d 100644 (file)
@@ -797,7 +797,7 @@ static int bcm_enet_open(struct net_device *dev)
        if (priv->has_phy) {
                /* connect to PHY */
                snprintf(phy_id, sizeof(phy_id), PHY_ID_FMT,
-                        priv->mac_id ? "1" : "0", priv->phy_id);
+                        priv->mii_bus->id, priv->phy_id);
 
                phydev = phy_connect(dev, phy_id, bcm_enet_adjust_phy_link, 0,
                                     PHY_INTERFACE_MODE_MII);