@@ -267,9 +267,6 @@ static bool mlxbf_gige_rx_packet(struct mlxbf_gige *priv, int *rx_pkts)
priv->stats.rx_truncate_errors++;
}
- rx_ci = readq(priv->base + MLXBF_GIGE_RX_CQE_PACKET_CI);
- rx_ci_rem = rx_ci % priv->rx_q_entries;
-
/* Let hardware know we've replenished one buffer */
rx_pi++;
@@ -282,6 +279,8 @@ static bool mlxbf_gige_rx_packet(struct mlxbf_gige *priv, int *rx_pkts)
rx_pi_rem = rx_pi % priv->rx_q_entries;
if (rx_pi_rem == 0)
priv->valid_polarity ^= 1;
+ rx_ci = readq(priv->base + MLXBF_GIGE_RX_CQE_PACKET_CI);
+ rx_ci_rem = rx_ci % priv->rx_q_entries;
if (skb)
netif_receive_skb(skb);
@@ -304,10 +303,6 @@ int mlxbf_gige_poll(struct napi_struct *napi, int budget)
mlxbf_gige_handle_tx_complete(priv);
- data = readq(priv->base + MLXBF_GIGE_RX_DMA);
- data &= ~MLXBF_GIGE_RX_DMA_EN;
- writeq(data, priv->base + MLXBF_GIGE_RX_DMA);
-
do {
remaining_pkts = mlxbf_gige_rx_packet(priv, &work_done);
} while (remaining_pkts && work_done < budget);
@@ -323,10 +318,6 @@ int mlxbf_gige_poll(struct napi_struct *napi, int budget)
data = readq(priv->base + MLXBF_GIGE_INT_MASK);
data &= ~MLXBF_GIGE_INT_MASK_RX_RECEIVE_PACKET;
writeq(data, priv->base + MLXBF_GIGE_INT_MASK);
-
- data = readq(priv->base + MLXBF_GIGE_RX_DMA);
- data |= MLXBF_GIGE_RX_DMA_EN;
- writeq(data, priv->base + MLXBF_GIGE_RX_DMA);
}
return work_done;
BugLink: https://bugs.launchpad.net/bugs/2047853 This reverts commit 03f5c9832adb5dccd9f320671721ce8138e0dbe4. Signed-off-by: David Thompson <davthompson@nvidia.com> --- .../ethernet/mellanox/mlxbf_gige/mlxbf_gige_rx.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-)