Author: hselasky Date: Thu Jul 13 15:12:01 2017 New Revision: 320946 URL: https://svnweb.freebsd.org/changeset/base/320946
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/9/sys/ofed/drivers/net/mlx4/en_rx.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/ofed/drivers/net/mlx4/en_rx.c ============================================================================== --- stable/9/sys/ofed/drivers/net/mlx4/en_rx.c Thu Jul 13 15:10:02 2017 (r320945) +++ stable/9/sys/ofed/drivers/net/mlx4/en_rx.c Thu Jul 13 15:12:01 2017 (r320946) @@ -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; _______________________________________________ svn-src-stable-9@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-stable-9 To unsubscribe, send any mail to "svn-src-stable-9-unsubscr...@freebsd.org"