mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
4736edc764
commit
5a3dba7a5f
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue