aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mlx4
diff options
context:
space:
mode:
authorVladimir Sokolovsky <vlad@mellanox.co.il>2008-08-27 17:29:57 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-08-27 17:40:38 -0400
commit4c246edd2550304df5b766cc841584b2bb058843 (patch)
tree16f9a553226d256adc3f1969c1d966dbc6e646f9 /drivers/infiniband/hw/mlx4
parentee7cbabbd359b5d9a60de3d5f1693163e07987ca (diff)
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>
Diffstat (limited to 'drivers/infiniband/hw/mlx4')
-rw-r--r--drivers/infiniband/hw/mlx4/mr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx4/mr.c b/drivers/infiniband/hw/mlx4/mr.c
index a4cdb465cd1d..87f5c5a87b98 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,
204 if (err) 204 if (err)
205 goto err_mr; 205 goto err_mr;
206 206
207 mr->ibmr.rkey = mr->ibmr.lkey = mr->mmr.key;
208
207 return &mr->ibmr; 209 return &mr->ibmr;
208 210
209err_mr: 211err_mr: