Skip to content

Commit

Permalink
RDMA/qedr: Fix qpids xarray api used
Browse files Browse the repository at this point in the history
The qpids xarray isn't accessed from irq context and therefore there
is no need to use the xa_XXX_irq version of the apis.
Remove the _irq.

Fixes: b6014f9 ("qedr: Convert qpidr to XArray")
Link: https://lore.kernel.org/r/20191027200451.28187-3-michal.kalderon@marvell.com
Signed-off-by: Ariel Elior <ariel.elior@marvell.com>
Signed-off-by: Michal Kalderon <michal.kalderon@marvell.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
  • Loading branch information
Michal Kalderon authored and jgunthorpe committed Oct 28, 2019
1 parent 73ab512 commit 5fdff18
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion drivers/infiniband/hw/qedr/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ static int qedr_alloc_resources(struct qedr_dev *dev)
xa_init_flags(&dev->srqs, XA_FLAGS_LOCK_IRQ);

if (IS_IWARP(dev)) {
xa_init_flags(&dev->qps, XA_FLAGS_LOCK_IRQ);
xa_init(&dev->qps);
dev->iwarp_wq = create_singlethread_workqueue("qedr_iwarpq");
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/infiniband/hw/qedr/qedr_iw_cm.c
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ void qedr_iw_qp_rem_ref(struct ib_qp *ibqp)
struct qedr_qp *qp = get_qedr_qp(ibqp);

if (atomic_dec_and_test(&qp->refcnt)) {
xa_erase_irq(&qp->dev->qps, qp->qp_id);
xa_erase(&qp->dev->qps, qp->qp_id);
kfree(qp);
}
}
Expand Down
4 changes: 2 additions & 2 deletions drivers/infiniband/hw/qedr/verbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1918,7 +1918,7 @@ struct ib_qp *qedr_create_qp(struct ib_pd *ibpd,
qp->ibqp.qp_num = qp->qp_id;

if (rdma_protocol_iwarp(&dev->ibdev, 1)) {
rc = xa_insert_irq(&dev->qps, qp->qp_id, qp, GFP_KERNEL);
rc = xa_insert(&dev->qps, qp->qp_id, qp, GFP_KERNEL);
if (rc)
goto err;
}
Expand Down Expand Up @@ -2492,7 +2492,7 @@ int qedr_destroy_qp(struct ib_qp *ibqp, struct ib_udata *udata)

if (atomic_dec_and_test(&qp->refcnt) &&
rdma_protocol_iwarp(&dev->ibdev, 1)) {
xa_erase_irq(&dev->qps, qp->qp_id);
xa_erase(&dev->qps, qp->qp_id);
kfree(qp);
}
return 0;
Expand Down

0 comments on commit 5fdff18

Please sign in to comment.