aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/nes/nes_verbs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/nes/nes_verbs.c')
-rw-r--r--drivers/infiniband/hw/nes/nes_verbs.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c
index 8b8812de4b5c..1dadcf388c02 100644
--- a/drivers/infiniband/hw/nes/nes_verbs.c
+++ b/drivers/infiniband/hw/nes/nes_verbs.c
@@ -80,7 +80,7 @@ static struct ib_mw *nes_alloc_mw(struct ib_pd *ibpd) {
80 next_stag_index %= nesadapter->max_mr; 80 next_stag_index %= nesadapter->max_mr;
81 81
82 ret = nes_alloc_resource(nesadapter, nesadapter->allocated_mrs, 82 ret = nes_alloc_resource(nesadapter, nesadapter->allocated_mrs,
83 nesadapter->max_mr, &stag_index, &next_stag_index); 83 nesadapter->max_mr, &stag_index, &next_stag_index, NES_RESOURCE_MW);
84 if (ret) { 84 if (ret) {
85 return ERR_PTR(ret); 85 return ERR_PTR(ret);
86 } 86 }
@@ -404,7 +404,7 @@ static struct ib_mr *nes_alloc_fast_reg_mr(struct ib_pd *ibpd, int max_page_list
404 404
405 err = nes_alloc_resource(nesadapter, nesadapter->allocated_mrs, 405 err = nes_alloc_resource(nesadapter, nesadapter->allocated_mrs,
406 nesadapter->max_mr, &stag_index, 406 nesadapter->max_mr, &stag_index,
407 &next_stag_index); 407 &next_stag_index, NES_RESOURCE_FAST_MR);
408 if (err) 408 if (err)
409 return ERR_PTR(err); 409 return ERR_PTR(err);
410 410
@@ -780,7 +780,7 @@ static struct ib_pd *nes_alloc_pd(struct ib_device *ibdev,
780 netdev_refcnt_read(nesvnic->netdev)); 780 netdev_refcnt_read(nesvnic->netdev));
781 781
782 err = nes_alloc_resource(nesadapter, nesadapter->allocated_pds, 782 err = nes_alloc_resource(nesadapter, nesadapter->allocated_pds,
783 nesadapter->max_pd, &pd_num, &nesadapter->next_pd); 783 nesadapter->max_pd, &pd_num, &nesadapter->next_pd, NES_RESOURCE_PD);
784 if (err) { 784 if (err) {
785 return ERR_PTR(err); 785 return ERR_PTR(err);
786 } 786 }
@@ -1157,7 +1157,7 @@ static struct ib_qp *nes_create_qp(struct ib_pd *ibpd,
1157 nes_debug(NES_DBG_QP, "RQ size=%u, SQ Size=%u\n", rq_size, sq_size); 1157 nes_debug(NES_DBG_QP, "RQ size=%u, SQ Size=%u\n", rq_size, sq_size);
1158 1158
1159 ret = nes_alloc_resource(nesadapter, nesadapter->allocated_qps, 1159 ret = nes_alloc_resource(nesadapter, nesadapter->allocated_qps,
1160 nesadapter->max_qp, &qp_num, &nesadapter->next_qp); 1160 nesadapter->max_qp, &qp_num, &nesadapter->next_qp, NES_RESOURCE_QP);
1161 if (ret) { 1161 if (ret) {
1162 return ERR_PTR(ret); 1162 return ERR_PTR(ret);
1163 } 1163 }
@@ -1546,7 +1546,7 @@ static struct ib_cq *nes_create_cq(struct ib_device *ibdev, int entries,
1546 return ERR_PTR(-EINVAL); 1546 return ERR_PTR(-EINVAL);
1547 1547
1548 err = nes_alloc_resource(nesadapter, nesadapter->allocated_cqs, 1548 err = nes_alloc_resource(nesadapter, nesadapter->allocated_cqs,
1549 nesadapter->max_cq, &cq_num, &nesadapter->next_cq); 1549 nesadapter->max_cq, &cq_num, &nesadapter->next_cq, NES_RESOURCE_CQ);
1550 if (err) { 1550 if (err) {
1551 return ERR_PTR(err); 1551 return ERR_PTR(err);
1552 } 1552 }
@@ -2129,7 +2129,7 @@ static struct ib_mr *nes_reg_phys_mr(struct ib_pd *ib_pd,
2129 return ERR_PTR(-EINVAL); 2129 return ERR_PTR(-EINVAL);
2130 2130
2131 err = nes_alloc_resource(nesadapter, nesadapter->allocated_mrs, nesadapter->max_mr, 2131 err = nes_alloc_resource(nesadapter, nesadapter->allocated_mrs, nesadapter->max_mr,
2132 &stag_index, &next_stag_index); 2132 &stag_index, &next_stag_index, NES_RESOURCE_PHYS_MR);
2133 if (err) { 2133 if (err) {
2134 return ERR_PTR(err); 2134 return ERR_PTR(err);
2135 } 2135 }
@@ -2360,7 +2360,7 @@ static struct ib_mr *nes_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
2360 next_stag_index %= nesadapter->max_mr; 2360 next_stag_index %= nesadapter->max_mr;
2361 2361
2362 err = nes_alloc_resource(nesadapter, nesadapter->allocated_mrs, 2362 err = nes_alloc_resource(nesadapter, nesadapter->allocated_mrs,
2363 nesadapter->max_mr, &stag_index, &next_stag_index); 2363 nesadapter->max_mr, &stag_index, &next_stag_index, NES_RESOURCE_USER_MR);
2364 if (err) { 2364 if (err) {
2365 ib_umem_release(region); 2365 ib_umem_release(region);
2366 return ERR_PTR(err); 2366 return ERR_PTR(err);