summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDennis Dalessandro <dennis.dalessandro@intel.com>2016-01-06 17:53:05 (GMT)
committerDoug Ledford <dledford@redhat.com>2016-03-11 01:37:05 (GMT)
commit19ef1edd7f75f805dc8fa60e0c61773f9cb6d50b (patch)
treefc679a4cdcc070c1f1882341b299443371707eee /drivers
parent4997870a0935b923d2ba67293fca0b8c05f74c1e (diff)
downloadlinux-19ef1edd7f75f805dc8fa60e0c61773f9cb6d50b.tar.xz
IB/rdmavt: Add query and modify device stubs
Adds the stubs which will handle the query and modify device functions. At this time the only intention is to support changing the node desc and the guid via these calls. 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')
-rw-r--r--drivers/infiniband/sw/rdmavt/vt.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/drivers/infiniband/sw/rdmavt/vt.c b/drivers/infiniband/sw/rdmavt/vt.c
index 8bd25c3..db14646 100644
--- a/drivers/infiniband/sw/rdmavt/vt.c
+++ b/drivers/infiniband/sw/rdmavt/vt.c
@@ -64,6 +64,33 @@ static void rvt_cleanup(void)
}
module_exit(rvt_cleanup);
+static int rvt_query_device(struct ib_device *ibdev,
+ struct ib_device_attr *props,
+ struct ib_udata *uhw)
+{
+ /*
+ * Return rvt_dev_info.props contents
+ */
+ return -EOPNOTSUPP;
+}
+
+static int rvt_modify_device(struct ib_device *device,
+ int device_modify_mask,
+ struct ib_device_modify *device_modify)
+{
+ /*
+ * Change dev props. Planned support is for node desc change and sys
+ * guid change only. This matches hfi1 and qib behavior. Other drivers
+ * that support existing modifications will need to add their support.
+ */
+
+ /*
+ * VT-DRIVER-API: node_desc_change()
+ * VT-DRIVER-API: sys_guid_change()
+ */
+ return -EOPNOTSUPP;
+}
+
/*
* Check driver override. If driver passes a value use it, otherwise we use our
* own value.
@@ -76,6 +103,10 @@ int rvt_register_device(struct rvt_dev_info *rdi)
if (!rdi)
return -EINVAL;
+ /* Dev Ops */
+ CHECK_DRIVER_OVERRIDE(rdi, query_device);
+ CHECK_DRIVER_OVERRIDE(rdi, modify_device);
+
/* DMA Operations */
rdi->ibdev.dma_ops =
rdi->ibdev.dma_ops ? : &rvt_default_dma_mapping_ops;