diff options
author | Figo.zhang <zhangtianfei@leadcoretech.com> | 2010-06-07 17:13:22 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-06-11 02:14:08 -0400 |
commit | 349124a00754129a5f1e43efa84733e364bf3749 (patch) | |
tree | acff33465eb6b21aadca78657a7fa330d6987936 /drivers/net/8139too.c | |
parent | 07a0f0f07a68014c92c752a5598102372bddf46e (diff) |
net8139: fix a race at the end of NAPI
fix a race at the end of NAPI complete processing, it had
better do __napi_complete() first before re-enable interrupt.
Signed-off-by:Figo.zhang <figo1802@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/8139too.c')
-rw-r--r-- | drivers/net/8139too.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/8139too.c b/drivers/net/8139too.c index 80cd074d3817..97d8068b372b 100644 --- a/drivers/net/8139too.c +++ b/drivers/net/8139too.c | |||
@@ -2089,8 +2089,8 @@ static int rtl8139_poll(struct napi_struct *napi, int budget) | |||
2089 | * again when we think we are done. | 2089 | * again when we think we are done. |
2090 | */ | 2090 | */ |
2091 | spin_lock_irqsave(&tp->lock, flags); | 2091 | spin_lock_irqsave(&tp->lock, flags); |
2092 | RTL_W16_F(IntrMask, rtl8139_intr_mask); | ||
2093 | __napi_complete(napi); | 2092 | __napi_complete(napi); |
2093 | RTL_W16_F(IntrMask, rtl8139_intr_mask); | ||
2094 | spin_unlock_irqrestore(&tp->lock, flags); | 2094 | spin_unlock_irqrestore(&tp->lock, flags); |
2095 | } | 2095 | } |
2096 | spin_unlock(&tp->rx_lock); | 2096 | spin_unlock(&tp->rx_lock); |