Revert "ramips: ethernet: fix to interrupt handling"

Fixes 7620/7621 transmit timed out issue.
Close: #10920
This commit is contained in:
zfdx123 2023-02-12 18:55:17 +08:00 committed by aiamadeus
parent 545c2478aa
commit d519e5fd0d

View File

@ -889,8 +889,6 @@ static int fe_poll_rx(struct napi_struct *napi, int budget,
struct fe_rx_dma *rxd, trxd; struct fe_rx_dma *rxd, trxd;
int done = 0, pad; int done = 0, pad;
fe_reg_w32(rx_intr, FE_REG_FE_INT_STATUS);
if (netdev->features & NETIF_F_RXCSUM) if (netdev->features & NETIF_F_RXCSUM)
checksum_bit = soc->checksum_bit; checksum_bit = soc->checksum_bit;
else else
@ -983,6 +981,9 @@ release_desc:
done++; done++;
} }
if (done < budget)
fe_reg_w32(rx_intr, FE_REG_FE_INT_STATUS);
return done; return done;
} }
@ -997,8 +998,6 @@ static int fe_poll_tx(struct fe_priv *priv, int budget, u32 tx_intr,
u32 idx, hwidx; u32 idx, hwidx;
struct fe_tx_ring *ring = &priv->tx_ring; struct fe_tx_ring *ring = &priv->tx_ring;
fe_reg_w32(tx_intr, FE_REG_FE_INT_STATUS);
idx = ring->tx_free_idx; idx = ring->tx_free_idx;
hwidx = fe_reg_r32(FE_REG_TX_DTX_IDX0); hwidx = fe_reg_r32(FE_REG_TX_DTX_IDX0);
@ -1022,7 +1021,9 @@ static int fe_poll_tx(struct fe_priv *priv, int budget, u32 tx_intr,
if (idx == hwidx) { if (idx == hwidx) {
/* read hw index again make sure no new tx packet */ /* read hw index again make sure no new tx packet */
hwidx = fe_reg_r32(FE_REG_TX_DTX_IDX0); 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; *tx_again = 1;
} else { } else {
*tx_again = 1; *tx_again = 1;