Skip to content

Commit f1e6b11

Browse files
Eugenia Emantayevgregkh
authored andcommitted
net/mlx4_en: Fix bad WQE issue
commit 6496bbf0ec481966ef9ffe5b6660d8d1b55c60cc upstream. Single send WQE in RX buffer should be stamped with software ownership in order to prevent the flow of QP in error in FW once UPDATE_QP is called. Fixes: 9f519f6 ('mlx4_en: Not using Shared Receive Queues') Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com> Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 0a007f7 commit f1e6b11

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

  • drivers/net/ethernet/mellanox/mlx4

drivers/net/ethernet/mellanox/mlx4/en_rx.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,14 @@ int mlx4_en_activate_rx_rings(struct mlx4_en_priv *priv)
439439
ring->cqn = priv->rx_cq[ring_ind]->mcq.cqn;
440440

441441
ring->stride = stride;
442-
if (ring->stride <= TXBB_SIZE)
442+
if (ring->stride <= TXBB_SIZE) {
443+
/* Stamp first unused send wqe */
444+
__be32 *ptr = (__be32 *)ring->buf;
445+
__be32 stamp = cpu_to_be32(1 << STAMP_SHIFT);
446+
*ptr = stamp;
447+
/* Move pointer to start of rx section */
443448
ring->buf += TXBB_SIZE;
449+
}
444450

445451
ring->log_stride = ffs(ring->stride) - 1;
446452
ring->buf_size = ring->size * ring->stride;

0 commit comments

Comments
 (0)