Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 155848
b: refs/heads/master
c: 1db780f
h: refs/heads/master
v: v3
  • Loading branch information
Anton Vorontsov authored and David S. Miller committed Jul 22, 2009
1 parent b818969 commit 33c1296
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: eedbc705f9a094560b8d08c58b6787a5420a76a1
refs/heads/master: 1db780f8c7d361fe1b7d29b9dc849b97955ae944
24 changes: 8 additions & 16 deletions trunk/drivers/net/gianfar.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -659,13 +650,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)
Expand Down

0 comments on commit 33c1296

Please sign in to comment.