net: WIZnet drivers: enable interrupts after napi_complete()
Subsystems (3)
PATCH 1/1 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 <[email protected]>
--- drivers/net/ethernet/wiznet/w5100.c | 4 ++-- drivers/net/ethernet/wiznet/w5300.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/wiznet/w5100.c +2 -2
@@ -498,9 +498,9 @@ static int w5100_napi_poll(struct napi_struct *napi, int budget) }if (rx_count < budget) { -w5100_write (priv,W5100_IMR ,IR_S0 ); -mmiowb ();napi_complete (napi); +w5100_write (priv,W5100_IMR ,IR_S0 ); +mmiowb (); }return rx_count;
drivers/net/ethernet/wiznet/w5300.c +1 -1
@@ -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;
Signature · 1 line
1.9.1
From: Yongbae Park <[email protected]>
Date: Tue, 10 Mar 2015 11:35:07 +0900
Quoted 6 lines
The interrupt is enabled before
napi_complete(). A network timeout occurs if the interrupt handler is called beforenapi_complete().Fix the bug by enabling the interrupt after
napi_complete().Signed-off-by Yongbae Park <[email protected]>
Applied.