Procházet zdrojové kódy

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>
Eli Cohen před 11 roky
rodič
revize
ada388f7af
1 změnil soubory, kde provedl 4 přidání a 0 odebrání
  1. 4 0
      drivers/infiniband/hw/mlx5/qp.c

+ 4 - 0
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);