Skip to content

Commit

Permalink
IB/mlx5: Make sure doorbell record is visible before doorbell
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eli Cohen authored and rolandd committed Jan 23, 2014
1 parent 042b9ad commit ada388f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/infiniband/hw/mlx5/qp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2251,6 +2251,10 @@ int mlx5_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,

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);

Expand Down

0 comments on commit ada388f

Please sign in to comment.