ixp4xx-eth: fix PHY name to match MDIO bus name
authorFlorian Fainelli <florian@openwrt.org>
Mon, 13 Feb 2012 01:23:24 +0000 (01:23 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Feb 2012 21:04:09 +0000 (16:04 -0500)
Commit 0869b3a4: ixp4xx-eth: use an unique MDIO bus name changed
the MDIO bus name from "0" to "ixp4xx-eth-0", as a result the PHY
name is not longer appropriate and will not match the MDIO bus name
so PHY connection will not succeed, fix that.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/xscale/ixp4xx_eth.c

index 72a854f05bb8042cf8392c518377652e8af62daf..41a8b5a9849e00f8e03cfa1c541f2134e3af6557 100644 (file)
@@ -1416,7 +1416,8 @@ static int __devinit eth_init_one(struct platform_device *pdev)
        __raw_writel(DEFAULT_CORE_CNTRL, &port->regs->core_control);
        udelay(50);
 
-       snprintf(phy_id, MII_BUS_ID_SIZE + 3, PHY_ID_FMT, "0", plat->phy);
+       snprintf(phy_id, MII_BUS_ID_SIZE + 3, PHY_ID_FMT,
+               mdio_bus->id, plat->phy);
        port->phydev = phy_connect(dev, phy_id, &ixp4xx_adjust_link, 0,
                                   PHY_INTERFACE_MODE_MII);
        if (IS_ERR(port->phydev)) {