Skip to content

Commit

Permalink
IB/mlx4: Actually return L_Key and R_Key for fast register MRs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vladimir Sokolovsky authored and Linus Torvalds committed Aug 27, 2008
1 parent ee7cbab commit 4c246ed
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/infiniband/hw/mlx4/mr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 4c246ed

Please sign in to comment.