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

Commit 17ead2f5 authored by Roland Dreier's avatar Roland Dreier Committed by Linus Torvalds
Browse files

[PATCH] IB/mthca: fix calculation of RDB shift



Fix calculation of rdb_shift by using original number of QPs, not
their slot in profile[] (which will be rearranged when we sort it).

Signed-off-by: default avatarRoland Dreier <roland@topspin.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 8cf2daf3
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -208,8 +208,7 @@ u64 mthca_make_profile(struct mthca_dev *dev,
			break;
		case MTHCA_RES_RDB:
			for (dev->qp_table.rdb_shift = 0;
			     profile[MTHCA_RES_QP].num << dev->qp_table.rdb_shift <
				     profile[i].num;
			     request->num_qp << dev->qp_table.rdb_shift < profile[i].num;
			     ++dev->qp_table.rdb_shift)
				; /* nothing */
			dev->qp_table.rdb_base    = (u32) profile[i].start;