diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-05-02 02:14:47 -0400 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2012-05-08 14:17:49 -0400 |
commit | d19081e044356ae6464e939aef04514c5e227b5a (patch) | |
tree | 2573b86021cf5deeb5728bb2c7aff72e8b5e0222 /drivers/infiniband | |
parent | 55a8d62a3bd2a0536d526da817fd4f49e6470770 (diff) |
RDMA/ocrdma: Tiny locking cleanup
We only need to disable the IRQs one time.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
[ Rename "wq_flags" to more conventional "flags." - Roland ]
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c index 0d1872faa6ab..e9f74d1b48f6 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | |||
@@ -1431,7 +1431,7 @@ int ocrdma_destroy_qp(struct ib_qp *ibqp) | |||
1431 | struct ocrdma_dev *dev; | 1431 | struct ocrdma_dev *dev; |
1432 | struct ib_qp_attr attrs; | 1432 | struct ib_qp_attr attrs; |
1433 | int attr_mask = IB_QP_STATE; | 1433 | int attr_mask = IB_QP_STATE; |
1434 | unsigned long wq_flags = 0, rq_flags = 0; | 1434 | unsigned long flags; |
1435 | 1435 | ||
1436 | qp = get_ocrdma_qp(ibqp); | 1436 | qp = get_ocrdma_qp(ibqp); |
1437 | dev = qp->dev; | 1437 | dev = qp->dev; |
@@ -1453,15 +1453,15 @@ int ocrdma_destroy_qp(struct ib_qp *ibqp) | |||
1453 | * acquire CQ lock while destroy is in progress, in order to | 1453 | * acquire CQ lock while destroy is in progress, in order to |
1454 | * protect against proessing in-flight CQEs for this QP. | 1454 | * protect against proessing in-flight CQEs for this QP. |
1455 | */ | 1455 | */ |
1456 | spin_lock_irqsave(&qp->sq_cq->cq_lock, wq_flags); | 1456 | spin_lock_irqsave(&qp->sq_cq->cq_lock, flags); |
1457 | if (qp->rq_cq && (qp->rq_cq != qp->sq_cq)) | 1457 | if (qp->rq_cq && (qp->rq_cq != qp->sq_cq)) |
1458 | spin_lock_irqsave(&qp->rq_cq->cq_lock, rq_flags); | 1458 | spin_lock(&qp->rq_cq->cq_lock); |
1459 | 1459 | ||
1460 | ocrdma_del_qpn_map(dev, qp); | 1460 | ocrdma_del_qpn_map(dev, qp); |
1461 | 1461 | ||
1462 | if (qp->rq_cq && (qp->rq_cq != qp->sq_cq)) | 1462 | if (qp->rq_cq && (qp->rq_cq != qp->sq_cq)) |
1463 | spin_unlock_irqrestore(&qp->rq_cq->cq_lock, rq_flags); | 1463 | spin_unlock(&qp->rq_cq->cq_lock); |
1464 | spin_unlock_irqrestore(&qp->sq_cq->cq_lock, wq_flags); | 1464 | spin_unlock_irqrestore(&qp->sq_cq->cq_lock, flags); |
1465 | 1465 | ||
1466 | if (!pd->uctx) { | 1466 | if (!pd->uctx) { |
1467 | ocrdma_discard_cqes(qp, qp->sq_cq); | 1467 | ocrdma_discard_cqes(qp, qp->sq_cq); |