diff options
author | Eli Cohen <eli@dev.mellanox.co.il> | 2014-01-14 10:45:16 -0500 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-01-23 02:23:49 -0500 |
commit | ada388f7afad1e2e87acbfe30600fdaff9bd6327 (patch) | |
tree | 6592209193d6c069cbbad291a9b7251360d7d031 /drivers/infiniband/hw | |
parent | 042b9adae899e1b497282d92205d3fef42d5ca8d (diff) |
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')
-rw-r--r-- | drivers/infiniband/hw/mlx5/qp.c | 4 |
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: | |||
2251 | 2251 | ||
2252 | qp->db.db[MLX5_SND_DBR] = cpu_to_be32(qp->sq.cur_post); | 2252 | qp->db.db[MLX5_SND_DBR] = cpu_to_be32(qp->sq.cur_post); |
2253 | 2253 | ||
2254 | /* Make sure doorbell record is visible to the HCA before | ||
2255 | * we hit doorbell */ | ||
2256 | wmb(); | ||
2257 | |||
2254 | if (bf->need_lock) | 2258 | if (bf->need_lock) |
2255 | spin_lock(&bf->lock); | 2259 | spin_lock(&bf->lock); |
2256 | 2260 | ||