[PATCH] gianfar: Use new PHY_ID_FMT macro
authorKumar Gala <galak@gate.crashing.org>
Wed, 11 Jan 2006 19:27:33 +0000 (11:27 -0800)
committerJeff Garzik <jgarzik@pobox.com>
Thu, 12 Jan 2006 21:31:52 +0000 (16:31 -0500)
Make the driver produce the string used by phy_connect and have board specific
code pass the integer mii bus id and phy device id for the specific controller
instance.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
drivers/net/gianfar.c
include/linux/fsl_devices.h

index 637b73ad5e900759f5657ea1ee6172ed82852487..0c18dbd67d3b0b95074c6e2b192d65339eaa478f 100644 (file)
@@ -399,12 +399,15 @@ static int init_phy(struct net_device *dev)
                priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_GIGABIT ?
                SUPPORTED_1000baseT_Full : 0;
        struct phy_device *phydev;
+       char phy_id[BUS_ID_SIZE];
 
        priv->oldlink = 0;
        priv->oldspeed = 0;
        priv->oldduplex = -1;
 
-       phydev = phy_connect(dev, priv->einfo->bus_id, &adjust_link, 0);
+       snprintf(phy_id, BUS_ID_SIZE, PHY_ID_FMT, priv->einfo->bus_id, priv->einfo->phy_id);
+
+       phydev = phy_connect(dev, phy_id, &adjust_link, 0);
 
        if (IS_ERR(phydev)) {
                printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name);
index a7a2b855ba725f4314d77afc363ca6bce7b1fd2c..a9f1cfd096ff1cec7f50745688a11651e45ff29a 100644 (file)
@@ -50,7 +50,8 @@ struct gianfar_platform_data {
 
        /* board specific information */
        u32 board_flags;
-       const char *bus_id;
+       u32 bus_id;
+       u32 phy_id;
        u8 mac_addr[6];
 };