@@ -2737,6 +2737,40 @@ static const struct cpumask *i40iw_get_vector_affinity(struct ib_device *ibdev,
return irq_get_affinity_mask(msix_vec->irq);
}
+static struct ib_device_ops i40iw_dev_ops = {
+ .query_port = i40iw_query_port,
+ .query_pkey = i40iw_query_pkey,
+ .query_gid = i40iw_query_gid,
+ .alloc_ucontext = i40iw_alloc_ucontext,
+ .dealloc_ucontext = i40iw_dealloc_ucontext,
+ .mmap = i40iw_mmap,
+ .alloc_pd = i40iw_alloc_pd,
+ .dealloc_pd = i40iw_dealloc_pd,
+ .create_qp = i40iw_create_qp,
+ .modify_qp = i40iw_modify_qp,
+ .query_qp = i40iw_query_qp,
+ .destroy_qp = i40iw_destroy_qp,
+ .create_cq = i40iw_create_cq,
+ .destroy_cq = i40iw_destroy_cq,
+ .get_dma_mr = i40iw_get_dma_mr,
+ .reg_user_mr = i40iw_reg_user_mr,
+ .dereg_mr = i40iw_dereg_mr,
+ .alloc_hw_stats = i40iw_alloc_hw_stats,
+ .get_hw_stats = i40iw_get_hw_stats,
+ .query_device = i40iw_query_device,
+ .drain_sq = i40iw_drain_sq,
+ .drain_rq = i40iw_drain_rq,
+ .alloc_mr = i40iw_alloc_mr,
+ .map_mr_sg = i40iw_map_mr_sg,
+ .get_port_immutable = i40iw_port_immutable,
+ .get_dev_fw_str = i40iw_get_dev_fw_str,
+ .poll_cq = i40iw_poll_cq,
+ .req_notify_cq = i40iw_req_notify_cq,
+ .post_send = i40iw_post_send,
+ .post_recv = i40iw_post_recv,
+ .get_vector_affinity = i40iw_get_vector_affinity,
+};
+
/**
* i40iw_init_rdma_device - initialization of iwarp device
* @iwdev: iwarp device
@@ -2830,6 +2864,7 @@ static struct i40iw_ib_device *i40iw_init_rdma_device(struct i40iw_device *iwdev
iwibdev->ibdev.post_send = i40iw_post_send;
iwibdev->ibdev.post_recv = i40iw_post_recv;
iwibdev->ibdev.get_vector_affinity = i40iw_get_vector_affinity;
+ ib_set_device_ops(&iwibdev->ibdev, &i40iw_dev_ops);
return iwibdev;
}
Initialize ib_device_ops with the supported operations. Signed-off-by: Kamal Heib <kamalheib1@gmail.com> --- drivers/infiniband/hw/i40iw/i40iw_verbs.c | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+)