]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
IB/mlx4: Lock SQ lock in mlx4_ib_post_send()
authorRoland Dreier <rolandd@cisco.com>
Tue, 30 Oct 2007 17:53:54 +0000 (10:53 -0700)
committerRoland Dreier <rolandd@cisco.com>
Tue, 30 Oct 2007 17:53:54 +0000 (10:53 -0700)
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>
drivers/infiniband/hw/mlx4/qp.c

index 6b3322486b5e2e66a0e2de0db16914f185f6f298..8cba9c532e6425b38a8554384d144bb06c32c8fa 100644 (file)
@@ -1282,7 +1282,7 @@ int mlx4_ib_post_send(struct ib_qp *ibqp, struct ib_send_wr *wr,
        int size;
        int i;
 
-       spin_lock_irqsave(&qp->rq.lock, flags);
+       spin_lock_irqsave(&qp->sq.lock, flags);
 
        ind = qp->sq.head;
 
@@ -1448,7 +1448,7 @@ out:
                               (qp->sq.wqe_cnt - 1));
        }
 
-       spin_unlock_irqrestore(&qp->rq.lock, flags);
+       spin_unlock_irqrestore(&qp->sq.lock, flags);
 
        return err;
 }