Skip to content

Commit 4c246ed

Browse files
Vladimir Sokolovskytorvalds
authored andcommitted
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 <[email protected]> Signed-off-by: Roland Dreier <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent ee7cbab commit 4c246ed

File tree

1 file changed

+2
-0
lines changed
  • drivers/infiniband/hw/mlx4

1 file changed

+2
-0
lines changed

drivers/infiniband/hw/mlx4/mr.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,8 @@ struct ib_mr *mlx4_ib_alloc_fast_reg_mr(struct ib_pd *pd,
204204
if (err)
205205
goto err_mr;
206206

207+
mr->ibmr.rkey = mr->ibmr.lkey = mr->mmr.key;
208+
207209
return &mr->ibmr;
208210

209211
err_mr:

0 commit comments

Comments
 (0)