mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 14:13:16 +00:00
ramips: fix ethernet driver tx completion polling
- budget is decremented with completed frames, so don't check if done is smaller - ACK the interrupt before processing further frames to fix a small race condition. Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 44234
This commit is contained in:
parent
12c7c25398
commit
10c8d8c483
@ -902,11 +902,11 @@ txpoll_again:
|
|||||||
if (!done)
|
if (!done)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (done < budget) {
|
if (budget) {
|
||||||
|
fe_reg_w32(tx_intr, FE_REG_FE_INT_STATUS);
|
||||||
hwidx = fe_reg_r32(FE_REG_TX_DTX_IDX0);
|
hwidx = fe_reg_r32(FE_REG_TX_DTX_IDX0);
|
||||||
if (idx != hwidx)
|
if (idx != hwidx)
|
||||||
goto txpoll_again;
|
goto txpoll_again;
|
||||||
fe_reg_w32(tx_intr, FE_REG_FE_INT_STATUS);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
netdev_completed_queue(netdev, done, bytes_compl);
|
netdev_completed_queue(netdev, done, bytes_compl);
|
||||||
|
Loading…
Reference in New Issue
Block a user