Преглед на файлове

[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: Roland Dreier <roland@topspin.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Roland Dreier преди 20 години
родител
ревизия
17ead2f5cc
променени са 1 файла, в които са добавени 1 реда и са изтрити 2 реда
  1. 1 2
      drivers/infiniband/hw/mthca/mthca_profile.c

+ 1 - 2
drivers/infiniband/hw/mthca/mthca_profile.c

@@ -208,8 +208,7 @@ u64 mthca_make_profile(struct mthca_dev *dev,
 			break;
 			break;
 		case MTHCA_RES_RDB:
 		case MTHCA_RES_RDB:
 			for (dev->qp_table.rdb_shift = 0;
 			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)
 			     ++dev->qp_table.rdb_shift)
 				; /* nothing */
 				; /* nothing */
 			dev->qp_table.rdb_base    = (u32) profile[i].start;
 			dev->qp_table.rdb_base    = (u32) profile[i].start;