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
done++;
}
+ if (done < budget)
+ fe_reg_w32(rx_intr, FE_REG_FE_INT_STATUS);
+
return done;
}
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);
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;