Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 136105
b: refs/heads/master
c: 7967590
h: refs/heads/master
i:
  136103: 5183206
v: v3
  • Loading branch information
Anton Vorontsov authored and David S. Miller committed Mar 27, 2009
1 parent c2c9150 commit af5a334
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 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: cc0be3227df9146968311308a9d19db1469ce1db
refs/heads/master: 79675900cbf2c4e67e95f94983ec4ee800b83739
21 changes: 11 additions & 10 deletions trunk/drivers/net/ucc_geth.c
Original file line number Diff line number Diff line change
Expand Up @@ -2009,6 +2009,9 @@ static void ucc_geth_stop(struct ucc_geth_private *ugeth)
/* Disable Rx and Tx */
clrbits32(&ug_regs->maccfg1, MACCFG1_ENABLE_RX | MACCFG1_ENABLE_TX);

phy_disconnect(ugeth->phydev);
ugeth->phydev = NULL;

ucc_geth_memclean(ugeth);
}

Expand Down Expand Up @@ -3345,6 +3348,14 @@ static int ucc_geth_open(struct net_device *dev)
return -EINVAL;
}

err = init_phy(dev);
if (err) {
if (netif_msg_ifup(ugeth))
ugeth_err("%s: Cannot initialize PHY, aborting.",
dev->name);
return err;
}

err = ucc_struct_init(ugeth);
if (err) {
if (netif_msg_ifup(ugeth))
Expand Down Expand Up @@ -3381,13 +3392,6 @@ static int ucc_geth_open(struct net_device *dev)
&ugeth->ug_regs->macstnaddr1,
&ugeth->ug_regs->macstnaddr2);

err = init_phy(dev);
if (err) {
if (netif_msg_ifup(ugeth))
ugeth_err("%s: Cannot initialize PHY, aborting.", dev->name);
goto out_err;
}

phy_start(ugeth->phydev);

err = ugeth_enable(ugeth, COMM_DIR_RX_AND_TX);
Expand Down Expand Up @@ -3430,9 +3434,6 @@ static int ucc_geth_close(struct net_device *dev)

free_irq(ugeth->ug_info->uf_info.irq, ugeth->dev);

phy_disconnect(ugeth->phydev);
ugeth->phydev = NULL;

netif_stop_queue(dev);

return 0;
Expand Down

0 comments on commit af5a334

Please sign in to comment.