aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mthca
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/mthca')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_mr.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_mr.c b/drivers/infiniband/hw/mthca/mthca_mr.c
index 3538da16e3fe..820205dec560 100644
--- a/drivers/infiniband/hw/mthca/mthca_mr.c
+++ b/drivers/infiniband/hw/mthca/mthca_mr.c
@@ -818,15 +818,9 @@ int mthca_arbel_map_phys_fmr(struct ib_fmr *ibfmr, u64 *page_list,
818 818
819void mthca_tavor_fmr_unmap(struct mthca_dev *dev, struct mthca_fmr *fmr) 819void mthca_tavor_fmr_unmap(struct mthca_dev *dev, struct mthca_fmr *fmr)
820{ 820{
821 u32 key;
822
823 if (!fmr->maps) 821 if (!fmr->maps)
824 return; 822 return;
825 823
826 key = tavor_key_to_hw_index(fmr->ibmr.lkey);
827 key &= dev->limits.num_mpts - 1;
828 fmr->ibmr.lkey = fmr->ibmr.rkey = tavor_hw_index_to_key(key);
829
830 fmr->maps = 0; 824 fmr->maps = 0;
831 825
832 writeb(MTHCA_MPT_STATUS_SW, fmr->mem.tavor.mpt); 826 writeb(MTHCA_MPT_STATUS_SW, fmr->mem.tavor.mpt);
@@ -834,16 +828,9 @@ void mthca_tavor_fmr_unmap(struct mthca_dev *dev, struct mthca_fmr *fmr)
834 828
835void mthca_arbel_fmr_unmap(struct mthca_dev *dev, struct mthca_fmr *fmr) 829void mthca_arbel_fmr_unmap(struct mthca_dev *dev, struct mthca_fmr *fmr)
836{ 830{
837 u32 key;
838
839 if (!fmr->maps) 831 if (!fmr->maps)
840 return; 832 return;
841 833
842 key = arbel_key_to_hw_index(fmr->ibmr.lkey);
843 key &= dev->limits.num_mpts - 1;
844 key = adjust_key(dev, key);
845 fmr->ibmr.lkey = fmr->ibmr.rkey = arbel_hw_index_to_key(key);
846
847 fmr->maps = 0; 834 fmr->maps = 0;
848 835
849 *(u8 *) fmr->mem.arbel.mpt = MTHCA_MPT_STATUS_SW; 836 *(u8 *) fmr->mem.arbel.mpt = MTHCA_MPT_STATUS_SW;