aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Petter Selasky <hselasky@FreeBSD.org>2017-07-13 15:54:26 +0000
committerHans Petter Selasky <hselasky@FreeBSD.org>2017-07-13 15:54:26 +0000
commitd090984765f2971ef66a6ae85699006671c3dff5 (patch)
treed5f1f96347ad1bcd201875805c848cd3843ae7c5
parent37af404ef0f455b52b83b656f0d6e0cfc0299706 (diff)
downloadsrc-d090984765f2971ef66a6ae85699006671c3dff5.tar.gz
src-d090984765f2971ef66a6ae85699006671c3dff5.zip
MF11 r320947; MFC r320876:
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. Approved by: re (marius) Sponsored by: Mellanox Technologies
Notes
Notes: svn path=/releng/11.1/; revision=320949
-rw-r--r--sys/ofed/drivers/net/mlx4/en_rx.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/ofed/drivers/net/mlx4/en_rx.c b/sys/ofed/drivers/net/mlx4/en_rx.c
index 2711b22b8667..5e9ec86657b0 100644
--- a/sys/ofed/drivers/net/mlx4/en_rx.c
+++ b/sys/ofed/drivers/net/mlx4/en_rx.c
@@ -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;