Skip to content

Commit

Permalink
Revert "ramips: ethernet: fix to interrupt handling"
Browse files Browse the repository at this point in the history
This reverts commit 7ac4540.

The change reportedly causes regressions in ethernet performance.

Fixes: FS#3332
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
  • Loading branch information
jow- authored and araujorm committed Sep 18, 2020
1 parent 61720d7 commit cc6f5c5
Showing 1 changed file with 6 additions and 5 deletions.
Expand Up @@ -875,8 +875,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
Expand Down Expand Up @@ -969,6 +967,9 @@ static int fe_poll_rx(struct napi_struct *napi, int budget,
done++;
}

if (done < budget)
fe_reg_w32(rx_intr, FE_REG_FE_INT_STATUS);

return done;
}

Expand All @@ -984,8 +985,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);

Expand All @@ -1009,7 +1008,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;
Expand Down

0 comments on commit cc6f5c5

Please sign in to comment.