]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[PATCH] IB/mthca: fix calculation of RDB shift
authorRoland Dreier <roland@topspin.com>
Sat, 16 Apr 2005 22:26:15 +0000 (15:26 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sat, 16 Apr 2005 22:26:15 +0000 (15:26 -0700)
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>
drivers/infiniband/hw/mthca/mthca_profile.c

index 7881a8a919ca3e8914701189fc6dad16c5dbfc59..9ffe76e23a9e2a1a12093514bbdfc76b36871586 100644 (file)
@@ -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;