aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/files/drivers/net/ethernet/ralink
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2015-02-01 08:20:37 +0000
committerFelix Fietkau <nbd@openwrt.org>2015-02-01 08:20:37 +0000
commit9763f432cfdd75b799d8c9aa10c8eb5277746275 (patch)
treeaad73371e4bd2ad0affcc3be392e602f97b97e36 /target/linux/ramips/files/drivers/net/ethernet/ralink
parent45dce2ab93345f7840230ce9902379d47938a899 (diff)
downloadupstream-9763f432cfdd75b799d8c9aa10c8eb5277746275.tar.gz
upstream-9763f432cfdd75b799d8c9aa10c8eb5277746275.tar.bz2
upstream-9763f432cfdd75b799d8c9aa10c8eb5277746275.zip
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> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@44234 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ramips/files/drivers/net/ethernet/ralink')
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/ralink_soc_eth.c4
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 9900a5e508..12c6ccaf98 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);