diff mbox series

[SRU,J:linux-bluefield,v1,1/2] Revert "UBUNTU: SAUCE: Fix OOB handling RX packets in heavy traffic"

Message ID 768f1bb03983a88cd69d846a35fd434dd8dce22b.1704218827.git.davthompson@nvidia.com
State New
Headers show
Series mlxbf_gige: replace SAUCE patch for RX race condition | expand

Commit Message

David Thompson Jan. 2, 2024, 6:16 p.m. UTC
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(-)
diff mbox series

Patch

diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_rx.c b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_rx.c
index 52a0314ec229..d82feeabb061 100644
--- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_rx.c
+++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_rx.c
@@ -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;