aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2020-09-18 08:53:31 +0200
committerJo-Philipp Wich <jo@mein.io>2020-09-18 08:53:53 +0200
commit34a96529041d4e9502c490c66f8af0154187c6d2 (patch)
tree73ad025bac404a3542ea022a56b32ced4d9e66ca
parent29b4104d69bf91db17764dd885e9e111a373f08c (diff)
downloadupstream-34a96529041d4e9502c490c66f8af0154187c6d2.tar.gz
upstream-34a96529041d4e9502c490c66f8af0154187c6d2.tar.bz2
upstream-34a96529041d4e9502c490c66f8af0154187c6d2.zip
Revert "ramips: ethernet: fix to interrupt handling"
This reverts commit 7ac454014a11347887323a131415ac7032d53546. The change reportedly causes regressions in ethernet performance. Fixes: FS#3332 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
-rw-r--r--target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index 3541b11240..b2c3d32c55 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -876,8 +876,6 @@ static int fe_poll_rx(struct napi_struct *napi, int budget,
struct fe_rx_dma *rxd, trxd;
int done = 0, pad;
- fe_reg_w32(rx_intr, FE_REG_FE_INT_STATUS);
-
if (netdev->features & NETIF_F_RXCSUM)
checksum_bit = soc->checksum_bit;
else
@@ -970,6 +968,9 @@ release_desc:
done++;
}
+ if (done < budget)
+ fe_reg_w32(rx_intr, FE_REG_FE_INT_STATUS);
+
return done;
}
@@ -985,8 +986,6 @@ static int fe_poll_tx(struct fe_priv *priv, int budget, u32 tx_intr,
u32 idx, hwidx;
struct fe_tx_ring *ring = &priv->tx_ring;
- fe_reg_w32(tx_intr, FE_REG_FE_INT_STATUS);
-
idx = ring->tx_free_idx;
hwidx = fe_reg_r32(FE_REG_TX_DTX_IDX0);
@@ -1010,7 +1009,9 @@ static int fe_poll_tx(struct fe_priv *priv, int budget, u32 tx_intr,
if (idx == hwidx) {
/* read hw index again make sure no new tx packet */
hwidx = fe_reg_r32(FE_REG_TX_DTX_IDX0);
- if (idx != hwidx)
+ if (idx == hwidx)
+ fe_reg_w32(tx_intr, FE_REG_FE_INT_STATUS);
+ else
*tx_again = 1;
} else {
*tx_again = 1;