summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/dev/mlx5/mlx5_en/en.h4
-rw-r--r--sys/dev/mlx5/mlx5_en/mlx5_en_main.c1
2 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/mlx5/mlx5_en/en.h b/sys/dev/mlx5/mlx5_en/en.h
index 25f4ebe..1c94914 100644
--- a/sys/dev/mlx5/mlx5_en/en.h
+++ b/sys/dev/mlx5/mlx5_en/en.h
@@ -672,6 +672,7 @@ struct mlx5e_priv {
struct work_struct update_stats_work;
struct work_struct update_carrier_work;
struct work_struct set_rx_mode_work;
+ MLX5_DECLARE_DOORBELL_LOCK(doorbell_lock)
struct mlx5_core_dev *mdev;
struct ifnet *ifp;
@@ -794,7 +795,8 @@ mlx5e_tx_notify_hw(struct mlx5e_sq *sq, u32 *wqe, int bf_sz)
wmb();
} else {
- mlx5_write64(wqe, sq->uar.map + ofst, NULL);
+ mlx5_write64(wqe, sq->uar.map + ofst,
+ MLX5_GET_DOORBELL_LOCK(&sq->priv->doorbell_lock));
}
sq->bf_offset ^= sq->bf_buf_size;
diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
index 8ee08cf..e99491f 100644
--- a/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
+++ b/sys/dev/mlx5/mlx5_en/mlx5_en_main.c
@@ -2759,6 +2759,7 @@ mlx5e_priv_mtx_init(struct mlx5e_priv *priv)
mtx_init(&priv->async_events_mtx, "mlx5async", MTX_NETWORK_LOCK, MTX_DEF);
sx_init(&priv->state_lock, "mlx5state");
callout_init_mtx(&priv->watchdog, &priv->async_events_mtx, 0);
+ MLX5_INIT_DOORBELL_LOCK(&priv->doorbell_lock);
}
static void
OpenPOWER on IntegriCloud