svn commit: r320947 - stable/11/sys/ofed/drivers/net/mlx4
Hans Petter Selasky
hselasky at FreeBSD.org
Thu Jul 13 15:16:47 UTC 2017
Author: hselasky
Date: Thu Jul 13 15:16:45 2017
New Revision: 320947
URL: https://svnweb.freebsd.org/changeset/base/320947
Log:
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.
Sponsored by: Mellanox Technologies
Modified:
stable/11/sys/ofed/drivers/net/mlx4/en_rx.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/ofed/drivers/net/mlx4/en_rx.c
==============================================================================
--- stable/11/sys/ofed/drivers/net/mlx4/en_rx.c Thu Jul 13 15:12:01 2017 (r320946)
+++ stable/11/sys/ofed/drivers/net/mlx4/en_rx.c Thu Jul 13 15:16:45 2017 (r320947)
@@ -394,8 +394,14 @@ int mlx4_en_activate_rx_rings(struct mlx4_en_priv *pri
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;
More information about the svn-src-all
mailing list