aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/gianfar.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/gianfar.c')
-rw-r--r--drivers/net/gianfar.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c
index 146f9513aea5..0c18dbd67d3b 100644
--- a/drivers/net/gianfar.c
+++ b/drivers/net/gianfar.c
@@ -84,6 +84,7 @@
84#include <linux/ip.h> 84#include <linux/ip.h>
85#include <linux/tcp.h> 85#include <linux/tcp.h>
86#include <linux/udp.h> 86#include <linux/udp.h>
87#include <linux/in.h>
87 88
88#include <asm/io.h> 89#include <asm/io.h>
89#include <asm/irq.h> 90#include <asm/irq.h>
@@ -398,12 +399,15 @@ static int init_phy(struct net_device *dev)
398 priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_GIGABIT ? 399 priv->einfo->device_flags & FSL_GIANFAR_DEV_HAS_GIGABIT ?
399 SUPPORTED_1000baseT_Full : 0; 400 SUPPORTED_1000baseT_Full : 0;
400 struct phy_device *phydev; 401 struct phy_device *phydev;
402 char phy_id[BUS_ID_SIZE];
401 403
402 priv->oldlink = 0; 404 priv->oldlink = 0;
403 priv->oldspeed = 0; 405 priv->oldspeed = 0;
404 priv->oldduplex = -1; 406 priv->oldduplex = -1;
405 407
406 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);
407 411
408 if (IS_ERR(phydev)) { 412 if (IS_ERR(phydev)) {
409 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);