Skip to content

Commit 5a3dba7

Browse files
yongbaedavem330
authored andcommitted
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>
1 parent 4736edc commit 5a3dba7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/net/ethernet/wiznet/w5100.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,9 +498,9 @@ static int w5100_napi_poll(struct napi_struct *napi, int budget)
498498
}
499499

500500
if (rx_count < budget) {
501+
napi_complete(napi);
501502
w5100_write(priv, W5100_IMR, IR_S0);
502503
mmiowb();
503-
napi_complete(napi);
504504
}
505505

506506
return rx_count;

drivers/net/ethernet/wiznet/w5300.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,9 +418,9 @@ static int w5300_napi_poll(struct napi_struct *napi, int budget)
418418
}
419419

420420
if (rx_count < budget) {
421+
napi_complete(napi);
421422
w5300_write(priv, W5300_IMR, IR_S0);
422423
mmiowb();
423-
napi_complete(napi);
424424
}
425425

426426
return rx_count;

0 commit comments

Comments
 (0)