diff options
author | David S. Miller <davem@davemloft.net> | 2009-07-24 04:03:51 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-07-24 04:03:51 +0200 |
commit | 74d154189d597b91da4322996dbf4f5c3d1544ab (patch) | |
tree | 6f09861b5e2f875d2d8ea2127b16add9103221c6 /drivers/net/gianfar.c | |
parent | Fix typos in comments in via-velocity header. (diff) | |
parent | ixgbe: remove unnecessary call to device_init_wakeup (diff) | |
download | linux-74d154189d597b91da4322996dbf4f5c3d1544ab.tar.xz linux-74d154189d597b91da4322996dbf4f5c3d1544ab.zip |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/wireless/iwmc3200wifi/netdev.c
net/wireless/scan.c
Diffstat (limited to 'drivers/net/gianfar.c')
-rw-r--r-- | drivers/net/gianfar.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index b2db449966e2..056ba4625780 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c @@ -264,15 +264,6 @@ static int gfar_of_init(struct net_device *dev) priv->device_flags |= FSL_GIANFAR_DEV_HAS_MAGIC_PACKET; priv->phy_node = of_parse_phandle(np, "phy-handle", 0); - if (!priv->phy_node) { - u32 *fixed_link; - - fixed_link = (u32 *)of_get_property(np, "fixed-link", NULL); - if (!fixed_link) { - err = -ENODEV; - goto err_out; - } - } /* Find the TBI PHY. If it's not there, we don't support SGMII */ priv->tbi_node = of_parse_phandle(np, "tbi-handle", 0); @@ -658,13 +649,14 @@ static int init_phy(struct net_device *dev) interface = gfar_get_interface(dev); - if (priv->phy_node) { - priv->phydev = of_phy_connect(dev, priv->phy_node, &adjust_link, - 0, interface); - if (!priv->phydev) { - dev_err(&dev->dev, "error: Could not attach to PHY\n"); - return -ENODEV; - } + priv->phydev = of_phy_connect(dev, priv->phy_node, &adjust_link, 0, + interface); + if (!priv->phydev) + priv->phydev = of_phy_connect_fixed_link(dev, &adjust_link, + interface); + if (!priv->phydev) { + dev_err(&dev->dev, "could not attach to PHY\n"); + return -ENODEV; } if (interface == PHY_INTERFACE_MODE_SGMII) |