aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/rdma
diff options
context:
space:
mode:
authorDean Luick <dean.luick@intel.com>2016-04-12 10:50:10 -0700
committerDoug Ledford <dledford@redhat.com>2016-04-28 16:32:27 -0400
commit153d58cd8e2871ec99d3a6570dd26b6f569a8b5e (patch)
treefd1fe31e123078b642e71ebea2bac5e1d60222f6 /drivers/staging/rdma
parentIB/hfi1: Fix i2c resource reservation checks (diff)
downloadlinux-dev-153d58cd8e2871ec99d3a6570dd26b6f569a8b5e.tar.xz
linux-dev-153d58cd8e2871ec99d3a6570dd26b6f569a8b5e.zip
IB/hfi1: Fix QOS num_vl bit width
The bit width for num_vls, n, needs to be calculated based on the pow2 rounded up of the number of vls. Otherwise num_vls of 3, 5, 6, and 7 will have misplaced QOS RSM map entries. Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Signed-off-by: Dean Luick <dean.luick@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/staging/rdma')
-rw-r--r--drivers/staging/rdma/hfi1/chip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rdma/hfi1/chip.c b/drivers/staging/rdma/hfi1/chip.c
index 16eb653903e0..f1efbe56536a 100644
--- a/drivers/staging/rdma/hfi1/chip.c
+++ b/drivers/staging/rdma/hfi1/chip.c
@@ -13508,7 +13508,7 @@ static void init_qos(struct hfi1_devdata *dd, u32 first_ctxt)
goto bail;
qpns_per_vl = __roundup_pow_of_two(max_by_vl);
/* determine bits vl */
- n = ilog2(num_vls);
+ n = ilog2(__roundup_pow_of_two(num_vls));
/* determine bits for qpn */
m = ilog2(qpns_per_vl);
if ((m + n) > 7)