Skip to content

Commit

Permalink
net: WIZnet drivers: enable interrupts after napi_complete()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yongbae Park authored and David S. Miller committed Mar 10, 2015
1 parent 4736edc commit 5a3dba7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/wiznet/w5100.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/ethernet/wiznet/w5300.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5a3dba7

Please sign in to comment.