aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2007-10-30 13:53:54 -0400
committerRoland Dreier <rolandd@cisco.com>2007-10-30 13:53:54 -0400
commit96db0e0335c7981911bd7efc5c79e82d2358c0fc (patch)
tree276234e4b0e12397e6f4034c0336efb49e9fb19c /drivers/infiniband
parent09f60f8f54c5e2391f0b7c38dccd7b00d83587ab (diff)
IB/mlx4: Lock SQ lock in mlx4_ib_post_send()
Because of a typo, mlx4_ib_post_send() takes the same lock rq.lock as mlx4_ib_post_recv(). Correct the code so the intended sq.lock is taken when posting a send. Noticed by Yossi Leybovitch and pointed out by Jack Morgenstein from Mellanox. Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/hw/mlx4/qp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
index 6b3322486b5e..8cba9c532e64 100644
--- a/drivers/infiniband/hw/mlx4/qp.c
+++ b/drivers/infiniband/hw/mlx4/qp.c
@@ -1282,7 +1282,7 @@ int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
1282 int size; 1282 int size;
1283 int i; 1283 int i;
1284 1284
1285 spin_lock_irqsave(&qp->rq.lock, flags); 1285 spin_lock_irqsave(&qp->sq.lock, flags);
1286 1286
1287 ind = qp->sq.head; 1287 ind = qp->sq.head;
1288 1288
@@ -1448,7 +1448,7 @@ out:
1448 (qp->sq.wqe_cnt - 1)); 1448 (qp->sq.wqe_cnt - 1));
1449 } 1449 }
1450 1450
1451 spin_unlock_irqrestore(&qp->rq.lock, flags); 1451 spin_unlock_irqrestore(&qp->sq.lock, flags);
1452 1452
1453 return err; 1453 return err;
1454} 1454}