summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/sw/rdmavt/vt.c
diff options
context:
space:
mode:
authorDennis Dalessandro2016-01-06 18:55:39 +0100
committerDoug Ledford2016-03-11 02:37:07 +0100
commitc4ed7d8bb08061218a3bff5ad80a9537cea232f2 (patch)
tree9767cde600b02052957f6046d94db3c759faa83d /drivers/infiniband/sw/rdmavt/vt.c
parentIB/rdmavt: Add query gid stub (diff)
downloadkernel-qcow2-linux-c4ed7d8bb08061218a3bff5ad80a9537cea232f2.tar.gz
kernel-qcow2-linux-c4ed7d8bb08061218a3bff5ad80a9537cea232f2.tar.xz
kernel-qcow2-linux-c4ed7d8bb08061218a3bff5ad80a9537cea232f2.zip
IB/rdmavt: Alloc and dealloc ucontexts
Add the stubs to allocate and deallocate user contexts. This will be handled completely by rvt. Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com> Reviewed-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/sw/rdmavt/vt.c')
-rw-r--r--drivers/infiniband/sw/rdmavt/vt.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/drivers/infiniband/sw/rdmavt/vt.c b/drivers/infiniband/sw/rdmavt/vt.c
index e95f19752b46..cd194298bdc8 100644
--- a/drivers/infiniband/sw/rdmavt/vt.c
+++ b/drivers/infiniband/sw/rdmavt/vt.c
@@ -178,6 +178,26 @@ static int rvt_query_gid(struct ib_device *ibdev, u8 port,
return -EOPNOTSUPP;
}
+/**
+ * rvt_alloc_ucontext - Allocate a user context
+ * @ibdev: Vers IB dev
+ * @data: User data allocated
+ */
+static struct ib_ucontext *rvt_alloc_ucontext(struct ib_device *ibdev,
+ struct ib_udata *udata)
+{
+ return ERR_PTR(-EOPNOTSUPP);
+}
+
+/**
+ *rvt_dealloc_ucontext - Free a user context
+ *@context - Free this
+ */
+static int rvt_dealloc_ucontext(struct ib_ucontext *context)
+{
+ return -EOPNOTSUPP;
+}
+
/*
* Check driver override. If driver passes a value use it, otherwise we use our
* own value.
@@ -197,6 +217,8 @@ int rvt_register_device(struct rvt_dev_info *rdi)
CHECK_DRIVER_OVERRIDE(rdi, modify_port);
CHECK_DRIVER_OVERRIDE(rdi, query_pkey);
CHECK_DRIVER_OVERRIDE(rdi, query_gid);
+ CHECK_DRIVER_OVERRIDE(rdi, alloc_ucontext);
+ CHECK_DRIVER_OVERRIDE(rdi, dealloc_ucontext);
/* DMA Operations */
rdi->ibdev.dma_ops =