]> git.karo-electronics.de Git - linux-beck.git/commitdiff
IB/mlx5: Make sure doorbell record is visible before doorbell
authorEli Cohen <eli@dev.mellanox.co.il>
Tue, 14 Jan 2014 15:45:16 +0000 (17:45 +0200)
committerRoland Dreier <roland@purestorage.com>
Thu, 23 Jan 2014 07:23:49 +0000 (23:23 -0800)
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>
drivers/infiniband/hw/mlx5/qp.c

index a056c243ddcde00471e0f05625b251e07bfa66ca..87b7fb176f221436d86beba7d4331ea1e3be31a1 100644 (file)
@@ -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);