Initialize ib_device_ops with the supported operations.

Signed-off-by: Kamal Heib <[email protected]>
---
 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

Reply via email to