Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4c246edd authored by Vladimir Sokolovsky's avatar Vladimir Sokolovsky Committed by Linus Torvalds
Browse files

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: default avatarVladimir Sokolovsky <vlad@mellanox.co.il>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ee7cbabb
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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: