summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/cxgb3/iwch.c
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@infradead.org>2019-02-21 03:20:49 +0300
committerJason Gunthorpe <jgg@mellanox.com>2019-03-25 21:36:29 +0300
commite64a7c02f101b91840f6a5ccde6937d67ffbd825 (patch)
tree192102bef8a1d1c3996c03059d6517e9b4677d0e /drivers/infiniband/hw/cxgb3/iwch.c
parent27114876ceaa66064472f1f0957068b8cdc51a29 (diff)
downloadlinux-e64a7c02f101b91840f6a5ccde6937d67ffbd825.tar.xz
cxgb3: Convert mmidr 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/cxgb3/iwch.c')
-rw-r--r--drivers/infiniband/hw/cxgb3/iwch.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/cxgb3/iwch.c b/drivers/infiniband/hw/cxgb3/iwch.c
index 578bc9ed90b7..56a8ab6210cf 100644
--- a/drivers/infiniband/hw/cxgb3/iwch.c
+++ b/drivers/infiniband/hw/cxgb3/iwch.c
@@ -100,8 +100,7 @@ static void rnic_init(struct iwch_dev *rnicp)
pr_debug("%s iwch_dev %p\n", __func__, rnicp);
xa_init_flags(&rnicp->cqs, XA_FLAGS_LOCK_IRQ);
xa_init_flags(&rnicp->qps, XA_FLAGS_LOCK_IRQ);
- idr_init(&rnicp->mmidr);
- spin_lock_init(&rnicp->lock);
+ xa_init_flags(&rnicp->mrs, XA_FLAGS_LOCK_IRQ);
INIT_DELAYED_WORK(&rnicp->db_drop_task, iwch_db_drop_task);
rnicp->attr.max_qps = T3_MAX_NUM_QP - 32;
@@ -185,7 +184,7 @@ static void close_rnic_dev(struct t3cdev *tdev)
cxio_rdev_close(&dev->rdev);
WARN_ON(!xa_empty(&dev->cqs));
WARN_ON(!xa_empty(&dev->qps));
- idr_destroy(&dev->mmidr);
+ WARN_ON(!xa_empty(&dev->mrs));
ib_dealloc_device(&dev->ibdev);
break;
}