aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/gianfar.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-07-23 22:03:51 -0400
committerDavid S. Miller <davem@davemloft.net>2009-07-23 22:03:51 -0400
commit74d154189d597b91da4322996dbf4f5c3d1544ab (patch)
tree6f09861b5e2f875d2d8ea2127b16add9103221c6 /drivers/net/gianfar.c
parent5a6338db37885af06760d40cad589316e48431e9 (diff)
parentffafa60d496f80c250f2ae0340ae94434c0b0b4d (diff)
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.c24
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)
264 priv->device_flags |= FSL_GIANFAR_DEV_HAS_MAGIC_PACKET; 264 priv->device_flags |= FSL_GIANFAR_DEV_HAS_MAGIC_PACKET;
265 265
266 priv->phy_node = of_parse_phandle(np, "phy-handle", 0); 266 priv->phy_node = of_parse_phandle(np, "phy-handle", 0);
267 if (!priv->phy_node) {
268 u32 *fixed_link;
269
270 fixed_link = (u32 *)of_get_property(np, "fixed-link", NULL);
271 if (!fixed_link) {
272 err = -ENODEV;
273 goto err_out;
274 }
275 }
276 267
277 /* Find the TBI PHY. If it's not there, we don't support SGMII */ 268 /* Find the TBI PHY. If it's not there, we don't support SGMII */
278 priv->tbi_node = of_parse_phandle(np, "tbi-handle", 0); 269 priv->tbi_node = of_parse_phandle(np, "tbi-handle", 0);
@@ -658,13 +649,14 @@ static int init_phy(struct net_device *dev)
658 649
659 interface = gfar_get_interface(dev); 650 interface = gfar_get_interface(dev);
660 651
661 if (priv->phy_node) { 652 priv->phydev = of_phy_connect(dev, priv->phy_node, &adjust_link, 0,
662 priv->phydev = of_phy_connect(dev, priv->phy_node, &adjust_link, 653 interface);
663 0, interface); 654 if (!priv->phydev)
664 if (!priv->phydev) { 655 priv->phydev = of_phy_connect_fixed_link(dev, &adjust_link,
665 dev_err(&dev->dev, "error: Could not attach to PHY\n"); 656 interface);
666 return -ENODEV; 657 if (!priv->phydev) {
667 } 658 dev_err(&dev->dev, "could not attach to PHY\n");
659 return -ENODEV;
668 } 660 }
669 661
670 if (interface == PHY_INTERFACE_MODE_SGMII) 662 if (interface == PHY_INTERFACE_MODE_SGMII)