summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorFrancois Romieu <romieu@fr.zoreil.com>2008-01-11 01:25:30 +0300
committerFrancois Romieu <romieu@fr.zoreil.com>2008-01-18 01:35:09 +0300
commit227bc24d675d80de1cfb3ab72891cc932dadbc3b (patch)
treeb84be422da6ae646f0a21de4937ab6cae18ae5a9 /drivers/net
parentd8c89eb3a12f0da96d049bd515c7fa3702e511c5 (diff)
downloadlinux-227bc24d675d80de1cfb3ab72891cc932dadbc3b.tar.xz
ipg: balance locking in irq handler
Spotted-by: <linux@horizon.com> Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ipg.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/ipg.c b/drivers/net/ipg.c
index dbd23bb65d1e..cd1650e99369 100644
--- a/drivers/net/ipg.c
+++ b/drivers/net/ipg.c
@@ -1630,6 +1630,8 @@ static irqreturn_t ipg_interrupt_handler(int irq, void *dev_inst)
#ifdef JUMBO_FRAME
ipg_nic_rxrestore(dev);
#endif
+ spin_lock(&sp->lock);
+
/* Get interrupt source information, and acknowledge
* some (i.e. TxDMAComplete, RxDMAComplete, RxEarly,
* IntRequested, MacControlFrame, LinkEvent) interrupts
@@ -1647,9 +1649,7 @@ static irqreturn_t ipg_interrupt_handler(int irq, void *dev_inst)
handled = 1;
if (unlikely(!netif_running(dev)))
- goto out;
-
- spin_lock(&sp->lock);
+ goto out_unlock;
/* If RFDListEnd interrupt, restore all used RFDs. */
if (status & IPG_IS_RFD_LIST_END) {
@@ -1733,9 +1733,9 @@ out_enable:
ipg_w16(IPG_IE_TX_DMA_COMPLETE | IPG_IE_RX_DMA_COMPLETE |
IPG_IE_HOST_ERROR | IPG_IE_INT_REQUESTED | IPG_IE_TX_COMPLETE |
IPG_IE_LINK_EVENT | IPG_IE_UPDATE_STATS, INT_ENABLE);
-
+out_unlock:
spin_unlock(&sp->lock);
-out:
+
return IRQ_RETVAL(handled);
}