Commit fef2efd6 authored by Harish Chegondi's avatar Harish Chegondi Committed by Doug Ledford

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: default avatarDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: default avatarHarish Chegondi <harish.chegondi@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 5a9cf6f2
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment