aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/mlx4/mr.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/net/mlx4/mr.c b/drivers/net/mlx4/mr.c
index 79b317b88c86..cb46446b2691 100644
--- a/drivers/net/mlx4/mr.c
+++ b/drivers/net/mlx4/mr.c
@@ -607,15 +607,9 @@ EXPORT_SYMBOL_GPL(mlx4_fmr_enable);
607void mlx4_fmr_unmap(struct mlx4_dev *dev, struct mlx4_fmr *fmr, 607void mlx4_fmr_unmap(struct mlx4_dev *dev, struct mlx4_fmr *fmr,
608 u32 *lkey, u32 *rkey) 608 u32 *lkey, u32 *rkey)
609{ 609{
610 u32 key;
611
612 if (!fmr->maps) 610 if (!fmr->maps)
613 return; 611 return;
614 612
615 key = key_to_hw_index(fmr->mr.key);
616 key &= dev->caps.num_mpts - 1;
617 *lkey = *rkey = fmr->mr.key = hw_index_to_key(key);
618
619 fmr->maps = 0; 613 fmr->maps = 0;
620 614
621 *(u8 *) fmr->mpt = MLX4_MPT_STATUS_SW; 615 *(u8 *) fmr->mpt = MLX4_MPT_STATUS_SW;