
From: Roland Dreier <roland@topspin.com>

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: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/drivers/infiniband/hw/mthca/mthca_profile.c |    3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)

diff -puN drivers/infiniband/hw/mthca/mthca_profile.c~ib-mthca-fix-calculation-of-rdb-shift drivers/infiniband/hw/mthca/mthca_profile.c
--- 25/drivers/infiniband/hw/mthca/mthca_profile.c~ib-mthca-fix-calculation-of-rdb-shift	Fri Apr  1 14:13:49 2005
+++ 25-akpm/drivers/infiniband/hw/mthca/mthca_profile.c	Fri Apr  1 14:13:49 2005
@@ -208,8 +208,7 @@ u64 mthca_make_profile(struct mthca_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;
_
