diff options
| author | Kumar Gala <galak@gate.crashing.org> | 2006-01-11 14:27:33 -0500 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@pobox.com> | 2006-01-12 16:31:52 -0500 |
| commit | 4d3248a29cb78b31bb0520eb99b4be620e810a40 (patch) | |
| tree | b33b6a028b926c9a260be42534ddf9b998dbb9b2 | |
| parent | a4d00f179fcec7065fe5742e9cebd6500886070f (diff) | |
[PATCH] gianfar: Use new PHY_ID_FMT macro
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>
| -rw-r--r-- | drivers/net/gianfar.c | 5 | ||||
| -rw-r--r-- | include/linux/fsl_devices.h | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index 637b73ad5e90..0c18dbd67d3b 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
| @@ -399,12 +399,15 @@ static int init_phy(struct net_device *dev) | |||
| 399 | priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_GIGABIT ? | 399 | priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_GIGABIT ? |
| 400 | SUPPORTED_1000baseT_Full : 0; | 400 | SUPPORTED_1000baseT_Full : 0; |
| 401 | struct phy_device *phydev; | 401 | struct phy_device *phydev; |
| 402 | char phy_id[BUS_ID_SIZE]; | ||
| 402 | 403 | ||
| 403 | priv->oldlink = 0; | 404 | priv->oldlink = 0; |
| 404 | priv->oldspeed = 0; | 405 | priv->oldspeed = 0; |
| 405 | priv->oldduplex = -1; | 406 | priv->oldduplex = -1; |
| 406 | 407 | ||
| 407 | phydev = phy_connect(dev, priv->einfo->bus_id, &adjust_link, 0); | 408 | snprintf(phy_id, BUS_ID_SIZE, PHY_ID_FMT, priv->einfo->bus_id, priv->einfo->phy_id); |
| 409 | |||
| 410 | phydev = phy_connect(dev, phy_id, &adjust_link, 0); | ||
| 408 | 411 | ||
| 409 | if (IS_ERR(phydev)) { | 412 | if (IS_ERR(phydev)) { |
| 410 | printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name); | 413 | printk(KERN_ERR "%s: Could not attach to PHY\n", dev->name); |
diff --git a/include/linux/fsl_devices.h b/include/linux/fsl_devices.h index a7a2b855ba72..a9f1cfd096ff 100644 --- a/include/linux/fsl_devices.h +++ b/include/linux/fsl_devices.h | |||
| @@ -50,7 +50,8 @@ struct gianfar_platform_data { | |||
| 50 | 50 | ||
| 51 | /* board specific information */ | 51 | /* board specific information */ |
| 52 | u32 board_flags; | 52 | u32 board_flags; |
| 53 | const char *bus_id; | 53 | u32 bus_id; |
| 54 | u32 phy_id; | ||
| 54 | u8 mac_addr[6]; | 55 | u8 mac_addr[6]; |
| 55 | }; | 56 | }; |
| 56 | 57 | ||
