浏览代码

IB/mlx4: Actually return L_Key and R_Key for fast register MRs

Initialize the L_Key and R_Key for memory regions returned from
mlx4_ib_alloc_fast_reg_mr().  Otherwise callers just get garbage for
the memory keys and can't do anything useful with these MRs.

Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Vladimir Sokolovsky 17 年之前
父节点
当前提交
4c246edd25
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      drivers/infiniband/hw/mlx4/mr.c

+ 2 - 0
drivers/infiniband/hw/mlx4/mr.c

@@ -204,6 +204,8 @@ struct ib_mr *mlx4_ib_alloc_fast_reg_mr(struct ib_pd *pd,
 	if (err)
 		goto err_mr;
 
+	mr->ibmr.rkey = mr->ibmr.lkey = mr->mmr.key;
+
 	return &mr->ibmr;
 
 err_mr: