Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 153d58cd authored by Dean Luick's avatar Dean Luick Committed by Doug Ledford
Browse files

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: default avatarMike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: default avatarDean Luick <dean.luick@intel.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent f9c82a0b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)