diff options
author | Sagi Grimberg <sagig@mellanox.com> | 2015-07-30 10:32:47 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2015-08-31 01:08:48 +0300 |
commit | 1302f8452bfbede92c5e984afd64d91eb5459ee7 (patch) | |
tree | d0d43b3ffc3d16adb8045651e1e371c0abd45c4c /drivers/infiniband/hw/qib/qib_mr.c | |
parent | e02e4d554d2b0c20b1f191c5d98bbf5da500a285 (diff) | |
download | linux-1302f8452bfbede92c5e984afd64d91eb5459ee7.tar.xz |
qib: Support ib_alloc_mr verb
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/qib/qib_mr.c')
-rw-r--r-- | drivers/infiniband/hw/qib/qib_mr.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/qib/qib_mr.c b/drivers/infiniband/hw/qib/qib_mr.c index c4473db46699..19220dcb9a3b 100644 --- a/drivers/infiniband/hw/qib/qib_mr.c +++ b/drivers/infiniband/hw/qib/qib_mr.c @@ -327,11 +327,16 @@ out: * * Return the memory region on success, otherwise return an errno. */ -struct ib_mr *qib_alloc_fast_reg_mr(struct ib_pd *pd, int max_page_list_len) +struct ib_mr *qib_alloc_mr(struct ib_pd *pd, + enum ib_mr_type mr_type, + u32 max_num_sg) { struct qib_mr *mr; - mr = alloc_mr(max_page_list_len, pd); + if (mr_type != IB_MR_TYPE_MEM_REG) + return ERR_PTR(-EINVAL); + + mr = alloc_mr(max_num_sg, pd); if (IS_ERR(mr)) return (struct ib_mr *)mr; |