RDMA/bnxt_re: Add missing spin lock initialization
authorSelvin Xavier <selvin.xavier@broadcom.com>
Mon, 8 Oct 2018 10:27:52 +0000 (03:27 -0700)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 16 Oct 2018 06:03:50 +0000 (00:03 -0600)
Add the missing initalization of the cq_lock and qplib.flush_lock.

Fixes: 942c9b6ca8de ("RDMA/bnxt_re: Avoid Hard lockup during error CQE processing")
Signed-off-by: Selvin Xavier <selvin.xavier@broadcom.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/bnxt_re/ib_verbs.c
drivers/infiniband/hw/bnxt_re/qplib_fp.c

index 9d7c484..54fdd4c 100644 (file)
@@ -2663,6 +2663,7 @@ struct ib_cq *bnxt_re_create_cq(struct ib_device *ibdev,
        nq->budget++;
 
        atomic_inc(&rdev->cq_count);
+       spin_lock_init(&cq->cq_lock);
 
        if (context) {
                struct bnxt_re_cq_resp resp;
index 6eaa4b2..e141689 100644 (file)
@@ -1966,6 +1966,7 @@ int bnxt_qplib_create_cq(struct bnxt_qplib_res *res, struct bnxt_qplib_cq *cq)
        INIT_LIST_HEAD(&cq->sqf_head);
        INIT_LIST_HEAD(&cq->rqf_head);
        spin_lock_init(&cq->compl_lock);
+       spin_lock_init(&cq->flush_lock);
 
        bnxt_qplib_arm_cq_enable(cq);
        return 0;