Skip to contentSkip to conversation

IB/mlx4: Actually return L_Key and R_Key for fast register MRs

PATCH New Roland Dreier 1 participant 1 message Aug 27, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 IB/mlx4: Actually return L_Key and R_Key for fast register MRs

From: Vladimir Sokolovsky <[email protected]>

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.

---
Hi Linus,

Please apply this for 2.6.27. This fixes a new feature we merged during the window but weren't able to test fully because device firmware wasn't ready at the time.

I'm just sending this as a patch rather than a git pull request since I think applying one patch from email is, if anything, easier than pulling a git tree. If you'd rather get singleton patches via git in the future just let me know.

Thanks,
Roland

 drivers/infiniband/hw/mlx4/mr.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/infiniband/hw/mlx4/mr.c +2 -0
index a4cdb46..87f5c5a 100644
@@ -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:
Signature · 1 line
1.5.6.3