mlx5: Drop mlx5_ib_alloc_fast_reg_mr
authorSagi Grimberg <sagig@mellanox.com>
Thu, 30 Jul 2015 07:32:41 +0000 (10:32 +0300)
committerDoug Ledford <dledford@redhat.com>
Sun, 30 Aug 2015 22:08:46 +0000 (18:08 -0400)
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx5/main.c
drivers/infiniband/hw/mlx5/mlx5_ib.h
drivers/infiniband/hw/mlx5/mr.c

index 82a371fabe376100eadd1a1c0c3acfecd01ae798..ce7587538badd8689ec6212156b0dc4fe7aebc49 100644 (file)
@@ -1503,7 +1503,6 @@ static void *mlx5_ib_add(struct mlx5_core_dev *mdev)
        dev->ib_dev.detach_mcast        = mlx5_ib_mcg_detach;
        dev->ib_dev.process_mad         = mlx5_ib_process_mad;
        dev->ib_dev.alloc_mr            = mlx5_ib_alloc_mr;
-       dev->ib_dev.alloc_fast_reg_mr   = mlx5_ib_alloc_fast_reg_mr;
        dev->ib_dev.alloc_fast_reg_page_list = mlx5_ib_alloc_fast_reg_page_list;
        dev->ib_dev.free_fast_reg_page_list  = mlx5_ib_free_fast_reg_page_list;
        dev->ib_dev.check_mr_status     = mlx5_ib_check_mr_status;
index 31b50a4aa5d8365b3fe27cdec4549544dd63f2e4..62b06ae2c87db63f782348512e459af53284b644 100644 (file)
@@ -576,8 +576,6 @@ int mlx5_ib_dereg_mr(struct ib_mr *ibmr);
 struct ib_mr *mlx5_ib_alloc_mr(struct ib_pd *pd,
                               enum ib_mr_type mr_type,
                               u32 max_num_sg);
-struct ib_mr *mlx5_ib_alloc_fast_reg_mr(struct ib_pd *pd,
-                                       int max_page_list_len);
 struct ib_fast_reg_page_list *mlx5_ib_alloc_fast_reg_page_list(struct ib_device *ibdev,
                                                               int page_list_len);
 void mlx5_ib_free_fast_reg_page_list(struct ib_fast_reg_page_list *page_list);
index 26817a28932dc002cadde44fbdbf8a1fbd1be4f7..dad82db892210ac5f6d25de6632c6fb2be85ebee 100644 (file)
@@ -1337,50 +1337,6 @@ err_free:
        return ERR_PTR(err);
 }
 
-struct ib_mr *mlx5_ib_alloc_fast_reg_mr(struct ib_pd *pd,
-                                       int max_page_list_len)
-{
-       struct mlx5_ib_dev *dev = to_mdev(pd->device);
-       struct mlx5_create_mkey_mbox_in *in;
-       struct mlx5_ib_mr *mr;
-       int err;
-
-       mr = kzalloc(sizeof(*mr), GFP_KERNEL);
-       if (!mr)
-               return ERR_PTR(-ENOMEM);
-
-       in = kzalloc(sizeof(*in), GFP_KERNEL);
-       if (!in) {
-               err = -ENOMEM;
-               goto err_free;
-       }
-
-       in->seg.status = MLX5_MKEY_STATUS_FREE;
-       in->seg.xlt_oct_size = cpu_to_be32((max_page_list_len + 1) / 2);
-       in->seg.qpn_mkey7_0 = cpu_to_be32(0xffffff << 8);
-       in->seg.flags = MLX5_PERM_UMR_EN | MLX5_ACCESS_MODE_MTT;
-       in->seg.flags_pd = cpu_to_be32(to_mpd(pd)->pdn);
-       /*
-        * TBD not needed - issue 197292 */
-       in->seg.log2_page_size = PAGE_SHIFT;
-
-       err = mlx5_core_create_mkey(dev->mdev, &mr->mmr, in, sizeof(*in), NULL,
-                                   NULL, NULL);
-       kfree(in);
-       if (err)
-               goto err_free;
-
-       mr->ibmr.lkey = mr->mmr.key;
-       mr->ibmr.rkey = mr->mmr.key;
-       mr->umem = NULL;
-
-       return &mr->ibmr;
-
-err_free:
-       kfree(mr);
-       return ERR_PTR(err);
-}
-
 struct ib_fast_reg_page_list *mlx5_ib_alloc_fast_reg_page_list(struct ib_device *ibdev,
                                                               int page_list_len)
 {