From e5d6b589ce1c8456ccecdc3918bd24a8469972bd Mon Sep 17 00:00:00 2001 From: Hans Petter Selasky Date: Mon, 2 Oct 2017 12:20:55 +0000 Subject: [PATCH] Make sure the doorbell lock is valid for the i386 version of the mlx5en(4) driver. Tested by: gallatin @ MFC after: 1 week Sponsored by: Mellanox Technologies --- sys/dev/mlx5/mlx5_en/en.h | 4 ++-- sys/dev/mlx5/mlx5_en/mlx5_en_main.c | 2 +- sys/dev/mlx5/mlx5_en/mlx5_en_rx.c | 2 +- sys/dev/mlx5/mlx5_en/mlx5_en_tx.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/dev/mlx5/mlx5_en/en.h b/sys/dev/mlx5/mlx5_en/en.h index c3bcba7a022..376aafe8b99 100644 --- a/sys/dev/mlx5/mlx5_en/en.h +++ b/sys/dev/mlx5/mlx5_en/en.h @@ -800,12 +800,12 @@ mlx5e_tx_notify_hw(struct mlx5e_sq *sq, u32 *wqe, int bf_sz) } static inline void -mlx5e_cq_arm(struct mlx5e_cq *cq) +mlx5e_cq_arm(struct mlx5e_cq *cq, spinlock_t *dblock) { struct mlx5_core_cq *mcq; mcq = &cq->mcq; - mlx5_cq_arm(mcq, MLX5_CQ_DB_REQ_NOT, mcq->uar->map, NULL, cq->wq.cc); + mlx5_cq_arm(mcq, MLX5_CQ_DB_REQ_NOT, mcq->uar->map, dblock, cq->wq.cc); } extern const struct ethtool_ops mlx5e_ethtool_ops; diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c index e816eb1e270..b5277fd59fd 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c @@ -1408,7 +1408,7 @@ mlx5e_enable_cq(struct mlx5e_cq *cq, struct mlx5e_cq_param *param, int eq_ix) if (err) return (err); - mlx5e_cq_arm(cq); + mlx5e_cq_arm(cq, MLX5_GET_DOORBELL_LOCK(&cq->priv->doorbell_lock)); return (0); } diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c b/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c index 7c490deba86..62189d4a618 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_rx.c @@ -430,7 +430,7 @@ mlx5e_rx_cq_comp(struct mlx5_core_cq *mcq) mlx5e_post_rx_wqes(rq); } mlx5e_post_rx_wqes(rq); - mlx5e_cq_arm(&rq->cq); + mlx5e_cq_arm(&rq->cq, MLX5_GET_DOORBELL_LOCK(&rq->channel->priv->doorbell_lock)); tcp_lro_flush_all(&rq->lro); mtx_unlock(&rq->mtx); } diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c b/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c index fe0eb20ab07..6f20bd1fc35 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c @@ -574,7 +574,7 @@ mlx5e_tx_cq_comp(struct mlx5_core_cq *mcq) mtx_lock(&sq->comp_lock); mlx5e_poll_tx_cq(sq, MLX5E_BUDGET_MAX); - mlx5e_cq_arm(&sq->cq); + mlx5e_cq_arm(&sq->cq, MLX5_GET_DOORBELL_LOCK(&sq->priv->doorbell_lock)); mtx_unlock(&sq->comp_lock); }