lkml.org 
[lkml]   [2018]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH rdma-next 05/18] RDMA/hfi1: Initialize ib_device_ops struct
Date
Initialize ib_device_ops with the supported operations.

Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
---
drivers/infiniband/hw/hfi1/verbs.c | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/drivers/infiniband/hw/hfi1/verbs.c b/drivers/infiniband/hw/hfi1/verbs.c
index bc7f00ba1988..c63f331dbf7a 100644
--- a/drivers/infiniband/hw/hfi1/verbs.c
+++ b/drivers/infiniband/hw/hfi1/verbs.c
@@ -1610,6 +1610,15 @@ static int get_hw_stats(struct ib_device *ibdev, struct rdma_hw_stats *stats,
return count;
}

+static struct ib_device_ops hfi1_dev_ops = {
+ .modify_device = modify_device,
+ .alloc_hw_stats = alloc_hw_stats,
+ .get_hw_stats = get_hw_stats,
+ .alloc_rdma_netdev = hfi1_vnic_alloc_rn,
+ .process_mad = hfi1_process_mad,
+ .get_dev_fw_str = hfi1_get_dev_fw_str,
+};
+
/**
* hfi1_register_ib_device - register our device with the infiniband core
* @dd: the device data structure
@@ -1662,6 +1671,8 @@ int hfi1_register_ib_device(struct hfi1_devdata *dd)
ibdev->process_mad = hfi1_process_mad;
ibdev->get_dev_fw_str = hfi1_get_dev_fw_str;

+ ib_set_device_ops(ibdev, &hfi1_dev_ops);
+
strlcpy(ibdev->node_desc, init_utsname()->nodename,
sizeof(ibdev->node_desc));

--
2.14.4
\
 
 \ /
  Last update: 2018-10-09 18:31    [W:0.134 / U:0.788 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site