aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mlx5/qp.c
diff options
context:
space:
mode:
authorEli Cohen <eli@dev.mellanox.co.il>2014-01-14 17:45:16 +0200
committerRoland Dreier <roland@purestorage.com>2014-01-22 23:23:49 -0800
commitada388f7afad1e2e87acbfe30600fdaff9bd6327 (patch)
tree6592209193d6c069cbbad291a9b7251360d7d031 /drivers/infiniband/hw/mlx5/qp.c
parentmlx5_core: Use mlx5 core style warning (diff)
downloadlinux-dev-ada388f7afad1e2e87acbfe30600fdaff9bd6327.tar.xz
linux-dev-ada388f7afad1e2e87acbfe30600fdaff9bd6327.zip
IB/mlx5: Make sure doorbell record is visible before doorbell
Put a wmb() to make sure the doorbell record is visible to the HCA before we hit doorbell. Signed-off-by: Eli Cohen <eli@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/qp.c')
-rw-r--r--drivers/infiniband/hw/mlx5/qp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c
index a056c243ddcd..87b7fb176f22 100644
--- a/drivers/infiniband/hw/mlx5/qp.c
+++ b/drivers/infiniband/hw/mlx5/qp.c
@@ -2251,6 +2251,10 @@ out:
qp->db.db[MLX5_SND_DBR] = cpu_to_be32(qp->sq.cur_post);
+ /* Make sure doorbell record is visible to the HCA before
+ * we hit doorbell */
+ wmb();
+
if (bf->need_lock)
spin_lock(&bf->lock);