diff options
author | Felix Fietkau <nbd@openwrt.org> | 2015-02-01 08:20:37 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2015-02-01 08:20:37 +0000 |
commit | 10c8d8c4833c178b4a30871f020637c7ba94d014 (patch) | |
tree | 29dbe725c921e04cf3d63eb103a1c9e0097227dc /target/linux/ramips/files | |
parent | 12c7c25398d1f5a7588aabe61eb053a1026e9854 (diff) | |
download | mtk-20170518-10c8d8c4833c178b4a30871f020637c7ba94d014.zip mtk-20170518-10c8d8c4833c178b4a30871f020637c7ba94d014.tar.gz mtk-20170518-10c8d8c4833c178b4a30871f020637c7ba94d014.tar.bz2 |
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
Diffstat (limited to 'target/linux/ramips/files')
-rw-r--r-- | target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c index 9900a5e..12c6cca 100644 --- a/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c +++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c @@ -902,11 +902,11 @@ txpoll_again: if (!done) 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); if (idx != hwidx) goto txpoll_again; - fe_reg_w32(tx_intr, FE_REG_FE_INT_STATUS); } netdev_completed_queue(netdev, done, bytes_compl); |