aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/cxgb4/device.c
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@infradead.org>2019-02-20 16:20:50 -0800
committerJason Gunthorpe <jgg@mellanox.com>2019-03-25 15:38:18 -0300
commit52e124c27e7bfb78980189bdfec049594d7612be (patch)
tree32cf84ca4a7617228c45834094622987d97f9f83 /drivers/infiniband/hw/cxgb4/device.c
parente64a7c02f101b91840f6a5ccde6937d67ffbd825 (diff)
downloadlinux-52e124c27e7bfb78980189bdfec049594d7612be.tar.gz
cxgb4: Convert cqidr to XArray
Signed-off-by: Matthew Wilcox <willy@infradead.org> Acked-by: Steve Wise <swise@opengridcomputing.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/cxgb4/device.c')
-rw-r--r--drivers/infiniband/hw/cxgb4/device.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/cxgb4/device.c b/drivers/infiniband/hw/cxgb4/device.c
index c79cf63fb0bb..16eee5380fe8 100644
--- a/drivers/infiniband/hw/cxgb4/device.c
+++ b/drivers/infiniband/hw/cxgb4/device.c
@@ -931,8 +931,7 @@ static void c4iw_rdev_close(struct c4iw_rdev *rdev)
void c4iw_dealloc(struct uld_ctx *ctx)
{
c4iw_rdev_close(&ctx->dev->rdev);
- WARN_ON_ONCE(!idr_is_empty(&ctx->dev->cqidr));
- idr_destroy(&ctx->dev->cqidr);
+ WARN_ON(!xa_empty(&ctx->dev->cqs));
WARN_ON_ONCE(!idr_is_empty(&ctx->dev->qpidr));
idr_destroy(&ctx->dev->qpidr);
WARN_ON_ONCE(!idr_is_empty(&ctx->dev->mmidr));
@@ -1044,7 +1043,7 @@ static struct c4iw_dev *c4iw_alloc(const struct cxgb4_lld_info *infop)
return ERR_PTR(ret);
}
- idr_init(&devp->cqidr);
+ xa_init_flags(&devp->cqs, XA_FLAGS_LOCK_IRQ);
idr_init(&devp->qpidr);
idr_init(&devp->mmidr);
idr_init(&devp->hwtid_idr);