From: Vladimir Sokolovsky Date: Wed, 27 Aug 2008 21:29:57 +0000 (-0700) Subject: IB/mlx4: Actually return L_Key and R_Key for fast register MRs X-Git-Tag: v2.6.27-rc5~9 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4c246edd2550304df5b766cc841584b2bb058843;p=linux-2.6 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 Signed-off-by: Roland Dreier Signed-off-by: Linus Torvalds --- diff --git a/drivers/infiniband/hw/mlx4/mr.c b/drivers/infiniband/hw/mlx4/mr.c index a4cdb465cd..87f5c5a87b 100644 --- a/drivers/infiniband/hw/mlx4/mr.c +++ b/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: