summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/infiniband/hw/qib/qib_keys.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/infiniband/hw/qib/qib_keys.c')
-rw-r--r--kernel/drivers/infiniband/hw/qib/qib_keys.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/drivers/infiniband/hw/qib/qib_keys.c b/kernel/drivers/infiniband/hw/qib/qib_keys.c
index ad843c786..5afaa2185 100644
--- a/kernel/drivers/infiniband/hw/qib/qib_keys.c
+++ b/kernel/drivers/infiniband/hw/qib/qib_keys.c
@@ -86,6 +86,10 @@ int qib_alloc_lkey(struct qib_mregion *mr, int dma_region)
* unrestricted LKEY.
*/
rkt->gen++;
+ /*
+ * bits are capped in qib_verbs.c to insure enough bits
+ * for generation number
+ */
mr->lkey = (r << (32 - ib_qib_lkey_table_size)) |
((((1 << (24 - ib_qib_lkey_table_size)) - 1) & rkt->gen)
<< 8);