From: Roland Dreier Date: Sat, 16 Apr 2005 22:26:15 +0000 (-0700) Subject: [PATCH] IB/mthca: fix calculation of RDB shift X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=17ead2f5cc81c4658e7b495014c2c6856a6f6b88;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/infiniband/hw/mthca/mthca_profile.c b/drivers/infiniband/hw/mthca/mthca_profile.c index 7881a8a919c..9ffe76e23a9 100644 --- a/drivers/infiniband/hw/mthca/mthca_profile.c +++ b/drivers/infiniband/hw/mthca/mthca_profile.c @@ -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;