aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/wiznet
diff options
context:
space:
mode:
authorYongbae Park <yongbae2@gmail.com>2015-03-10 11:35:07 +0900
committerDavid S. Miller <davem@davemloft.net>2015-03-10 00:22:54 -0400
commit5a3dba7a5fcc02b78d92c35e2ca53f21ae3402c9 (patch)
treebd0fc66d8ae1a4dc7374fb79e017d739c78c0e38 /drivers/net/ethernet/wiznet
parentibmveth: enable interrupts after napi_complete() (diff)
downloadlinux-dev-5a3dba7a5fcc02b78d92c35e2ca53f21ae3402c9.tar.xz
linux-dev-5a3dba7a5fcc02b78d92c35e2ca53f21ae3402c9.zip
net: WIZnet drivers: enable interrupts after napi_complete()
The interrupt is enabled before napi_complete(). A network timeout occurs if the interrupt handler is called before napi_complete(). Fix the bug by enabling the interrupt after napi_complete(). Signed-off-by: Yongbae Park <yongbae2@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/wiznet')
-rw-r--r--drivers/net/ethernet/wiznet/w5100.c2
-rw-r--r--drivers/net/ethernet/wiznet/w5300.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/wiznet/w5100.c b/drivers/net/ethernet/wiznet/w5100.c
index a495931a66a1..0e0fbb5842b3 100644
--- a/drivers/net/ethernet/wiznet/w5100.c
+++ b/drivers/net/ethernet/wiznet/w5100.c
@@ -498,9 +498,9 @@ static int w5100_napi_poll(struct napi_struct *napi, int budget)
}
if (rx_count < budget) {
+ napi_complete(napi);
w5100_write(priv, W5100_IMR, IR_S0);
mmiowb();
- napi_complete(napi);
}
return rx_count;
diff --git a/drivers/net/ethernet/wiznet/w5300.c b/drivers/net/ethernet/wiznet/w5300.c
index 09322d9db578..4b310002258d 100644
--- a/drivers/net/ethernet/wiznet/w5300.c
+++ b/drivers/net/ethernet/wiznet/w5300.c
@@ -418,9 +418,9 @@ static int w5300_napi_poll(struct napi_struct *napi, int budget)
}
if (rx_count < budget) {
+ napi_complete(napi);
w5300_write(priv, W5300_IMR, IR_S0);
mmiowb();
- napi_complete(napi);
}
return rx_count;