summaryrefslogtreecommitdiff
path: root/drivers/infiniband/core/verbs.c
diff options
context:
space:
mode:
authorSagi Grimberg <sagig@mellanox.com>2015-07-30 10:32:48 +0300
committerDoug Ledford <dledford@redhat.com>2015-08-31 01:08:49 +0300
commitd9f272c523db47a56a64942eb6f25361c400de66 (patch)
treef0cda7d5874f5d911018171b3110e21fe80e32aa /drivers/infiniband/core/verbs.c
parentd9fe6dd7afaff529124dd7f49c2da89ef789a56f (diff)
downloadlinux-d9f272c523db47a56a64942eb6f25361c400de66.tar.xz
IB/core: Drop ib_alloc_fast_reg_mr
Fully replaced by a more generic and suitable ib_alloc_mr. Signed-off-by: Sagi Grimberg <sagig@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/core/verbs.c')
-rw-r--r--drivers/infiniband/core/verbs.c32
1 files changed, 3 insertions, 29 deletions
diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c
index f96dd456db3b..c80ed1737666 100644
--- a/drivers/infiniband/core/verbs.c
+++ b/drivers/infiniband/core/verbs.c
@@ -1253,36 +1253,10 @@ struct ib_mr *ib_alloc_mr(struct ib_pd *pd,
{
struct ib_mr *mr;
- if (pd->device->alloc_mr) {
- mr = pd->device->alloc_mr(pd, mr_type, max_num_sg);
- } else {
- if (mr_type != IB_MR_TYPE_MEM_REG ||
- !pd->device->alloc_fast_reg_mr)
- return ERR_PTR(-ENOSYS);
- mr = pd->device->alloc_fast_reg_mr(pd, max_num_sg);
- }
-
- if (!IS_ERR(mr)) {
- mr->device = pd->device;
- mr->pd = pd;
- mr->uobject = NULL;
- atomic_inc(&pd->usecnt);
- atomic_set(&mr->usecnt, 0);
- }
-
- return mr;
-}
-EXPORT_SYMBOL(ib_alloc_mr);
-
-struct ib_mr *ib_alloc_fast_reg_mr(struct ib_pd *pd, int max_page_list_len)
-{
- struct ib_mr *mr;
-
- if (!pd->device->alloc_fast_reg_mr)
+ if (!pd->device->alloc_mr)
return ERR_PTR(-ENOSYS);
- mr = pd->device->alloc_fast_reg_mr(pd, max_page_list_len);
-
+ mr = pd->device->alloc_mr(pd, mr_type, max_num_sg);
if (!IS_ERR(mr)) {
mr->device = pd->device;
mr->pd = pd;
@@ -1293,7 +1267,7 @@ struct ib_mr *ib_alloc_fast_reg_mr(struct ib_pd *pd, int max_page_list_len)
return mr;
}
-EXPORT_SYMBOL(ib_alloc_fast_reg_mr);
+EXPORT_SYMBOL(ib_alloc_mr);
struct ib_fast_reg_page_list *ib_alloc_fast_reg_page_list(struct ib_device *device,
int max_page_list_len)