diff options
-rw-r--r-- | drivers/net/ucc_geth.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/net/ucc_geth.c b/drivers/net/ucc_geth.c index 6ebefe951b95..3d1966c34d29 100644 --- a/drivers/net/ucc_geth.c +++ b/drivers/net/ucc_geth.c | |||
@@ -2300,8 +2300,6 @@ static void ucc_geth_stop(struct ucc_geth_private *ugeth) | |||
2300 | tempval &= ~(MACCFG1_ENABLE_RX | MACCFG1_ENABLE_TX); | 2300 | tempval &= ~(MACCFG1_ENABLE_RX | MACCFG1_ENABLE_TX); |
2301 | out_be32(&ug_regs->maccfg1, tempval); | 2301 | out_be32(&ug_regs->maccfg1, tempval); |
2302 | 2302 | ||
2303 | free_irq(ugeth->ug_info->uf_info.irq, ugeth->dev); | ||
2304 | |||
2305 | ucc_geth_memclean(ugeth); | 2303 | ucc_geth_memclean(ugeth); |
2306 | } | 2304 | } |
2307 | 2305 | ||
@@ -3759,21 +3757,20 @@ static int ucc_geth_open(struct net_device *dev) | |||
3759 | 3757 | ||
3760 | phy_start(ugeth->phydev); | 3758 | phy_start(ugeth->phydev); |
3761 | 3759 | ||
3762 | err = | 3760 | err = ugeth_enable(ugeth, COMM_DIR_RX_AND_TX); |
3763 | request_irq(ugeth->ug_info->uf_info.irq, ucc_geth_irq_handler, 0, | ||
3764 | "UCC Geth", dev); | ||
3765 | if (err) { | 3761 | if (err) { |
3766 | if (netif_msg_ifup(ugeth)) | 3762 | if (netif_msg_ifup(ugeth)) |
3767 | ugeth_err("%s: Cannot get IRQ for net device, aborting.", | 3763 | ugeth_err("%s: Cannot enable net device, aborting.", dev->name); |
3768 | dev->name); | ||
3769 | ucc_geth_stop(ugeth); | 3764 | ucc_geth_stop(ugeth); |
3770 | goto out_err; | 3765 | goto out_err; |
3771 | } | 3766 | } |
3772 | 3767 | ||
3773 | err = ugeth_enable(ugeth, COMM_DIR_RX_AND_TX); | 3768 | err = request_irq(ugeth->ug_info->uf_info.irq, ucc_geth_irq_handler, |
3769 | 0, "UCC Geth", dev); | ||
3774 | if (err) { | 3770 | if (err) { |
3775 | if (netif_msg_ifup(ugeth)) | 3771 | if (netif_msg_ifup(ugeth)) |
3776 | ugeth_err("%s: Cannot enable net device, aborting.", dev->name); | 3772 | ugeth_err("%s: Cannot get IRQ for net device, aborting.", |
3773 | dev->name); | ||
3777 | ucc_geth_stop(ugeth); | 3774 | ucc_geth_stop(ugeth); |
3778 | goto out_err; | 3775 | goto out_err; |
3779 | } | 3776 | } |
@@ -3799,6 +3796,8 @@ static int ucc_geth_close(struct net_device *dev) | |||
3799 | 3796 | ||
3800 | ucc_geth_stop(ugeth); | 3797 | ucc_geth_stop(ugeth); |
3801 | 3798 | ||
3799 | free_irq(ugeth->ug_info->uf_info.irq, ugeth->dev); | ||
3800 | |||
3802 | phy_disconnect(ugeth->phydev); | 3801 | phy_disconnect(ugeth->phydev); |
3803 | ugeth->phydev = NULL; | 3802 | ugeth->phydev = NULL; |
3804 | 3803 | ||