提交 fef2efd6 编写于 作者: H Harish Chegondi 提交者: 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: NDennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: NHarish Chegondi <harish.chegondi@intel.com>
Signed-off-by: NDoug Ledford <dledford@redhat.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册