summaryrefslogtreecommitdiff
path: root/drivers/infiniband/sw
diff options
context:
space:
mode:
authorHarish Chegondi <harish.chegondi@intel.com>2016-01-22 12:50:30 -0800
committerDoug Ledford <dledford@redhat.com>2016-03-10 20:37:20 -0500
commitfef2efd6b4951148cc8dd1df7b3e1ff2f13dd6df (patch)
treebcbd95e363f7818c57078800f79a334bd0662bb6 /drivers/infiniband/sw
parent5a9cf6f27e36ece71cc8a192a4ca39b62a460807 (diff)
IB/rdmavt: Allow reserving just one qpn
qib needs to reserve only one qpn for non-verbs stuff. Also fixed the for loop to reserve the end qpn. Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Harish Chegondi <harish.chegondi@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/sw')
-rw-r--r--drivers/infiniband/sw/rdmavt/qp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/sw/rdmavt/qp.c b/drivers/infiniband/sw/rdmavt/qp.c
index 44485ada8281..ee19eae38d0b 100644
--- a/drivers/infiniband/sw/rdmavt/qp.c
+++ b/drivers/infiniband/sw/rdmavt/qp.c
@@ -79,7 +79,7 @@ static int init_qpn_table(struct rvt_dev_info *rdi, struct rvt_qpn_table *qpt)
struct rvt_qpn_map *map;
int ret = 0;
- if (!(rdi->dparms.qpn_res_end > rdi->dparms.qpn_res_start))
+ if (!(rdi->dparms.qpn_res_end >= rdi->dparms.qpn_res_start))
return -EINVAL;
spin_lock_init(&qpt->lock);
@@ -105,7 +105,7 @@ static int init_qpn_table(struct rvt_dev_info *rdi, struct rvt_qpn_table *qpt)
rvt_pr_info(rdi, "Reserving QPNs from 0x%x to 0x%x for non-verbs use\n",
rdi->dparms.qpn_res_start, rdi->dparms.qpn_res_end);
- for (i = rdi->dparms.qpn_res_start; i < rdi->dparms.qpn_res_end; i++) {
+ for (i = rdi->dparms.qpn_res_start; i <= rdi->dparms.qpn_res_end; i++) {
if (!map->page) {
get_map_page(qpt, map);
if (!map->page) {