Skip to content

Commit

Permalink
[PATCH] IB/mthca: fix calculation of RDB shift
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roland Dreier authored and Linus Torvalds committed Apr 16, 2005
1 parent 8cf2daf commit 17ead2f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/infiniband/hw/mthca/mthca_profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 17ead2f

Please sign in to comment.