Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287706
b: refs/heads/master
c: 7a13f8f
h: refs/heads/master
v: v3
  • Loading branch information
Francesco Virlinzi authored and David S. Miller committed Feb 15, 2012
1 parent 5791867 commit 58f1cb0
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1cc5a735185a963ed9324a65e1f2db02bf52c0d4
refs/heads/master: 7a13f8f5b63652c035147aab5fcba7ee9101f1fb
16 changes: 16 additions & 0 deletions trunk/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1047,6 +1047,17 @@ static int stmmac_open(struct net_device *dev)
goto open_error;
}

/* Request the Wake IRQ in case of another line is used for WoL */
if (priv->wol_irq != dev->irq) {
ret = request_irq(priv->wol_irq, stmmac_interrupt,
IRQF_SHARED, dev->name, dev);
if (unlikely(ret < 0)) {
pr_err("%s: ERROR: allocating the ext WoL IRQ %d "
"(error: %d)\n", __func__, priv->wol_irq, ret);
goto open_error_wolirq;
}
}

/* Enable the MAC Rx/Tx */
stmmac_set_mac(priv->ioaddr, true);

Expand Down Expand Up @@ -1087,6 +1098,9 @@ static int stmmac_open(struct net_device *dev)

return 0;

open_error_wolirq:
free_irq(dev->irq, dev);

open_error:
#ifdef CONFIG_STMMAC_TIMER
kfree(priv->tm);
Expand Down Expand Up @@ -1127,6 +1141,8 @@ static int stmmac_release(struct net_device *dev)

/* Free the IRQ lines */
free_irq(dev->irq, dev);
if (priv->wol_irq != dev->irq)
free_irq(priv->wol_irq, dev);

/* Stop TX/RX DMA and clear the descriptors */
priv->hw->dma->stop_tx(priv->ioaddr);
Expand Down

0 comments on commit 58f1cb0

Please sign in to comment.