Make sure the mlx4en RX DMA ring gets stamped with software ownership

in order to prevent the flow of QP to error in the firmware once
UPDATE_QP is called.

MFC after:	3 days
Sponsored by:	Mellanox Technologies
This commit is contained in:
Hans Petter Selasky 2017-07-10 19:26:50 +00:00
parent 3185adf0fd
commit 7bb7b27fb1

View file

@ -394,8 +394,14 @@ int mlx4_en_activate_rx_rings(struct mlx4_en_priv *priv)
ring->rx_mb_size = priv->rx_mb_size;
ring->stride = stride;
if (ring->stride <= TXBB_SIZE)
if (ring->stride <= TXBB_SIZE) {
/* Stamp first unused send wqe */
__be32 *ptr = (__be32 *)ring->buf;
__be32 stamp = cpu_to_be32(1 << STAMP_SHIFT);
*ptr = stamp;
/* Move pointer to start of rx section */
ring->buf += TXBB_SIZE;
}
ring->log_stride = ffs(ring->stride) - 1;
ring->buf_size = ring->size * ring->stride;