From 7f645a58d00155b93800fdd4e157c8f58fb3122f Mon Sep 17 00:00:00 2001 From: Kamal Heib Date: Mon, 10 Dec 2018 21:09:35 +0200 Subject: RDMA/hns: Initialize ib_device_ops struct Initialize ib_device_ops with the supported operations using ib_set_device_ops(). Signed-off-by: Kamal Heib Signed-off-by: Jason Gunthorpe --- drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'drivers/infiniband/hw/hns/hns_roce_hw_v2.c') diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c index 5007fe7af2f9..22236ebf033d 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c @@ -5734,6 +5734,22 @@ static int hns_roce_v2_post_srq_recv(struct ib_srq *ibsrq, return ret; } +static const struct ib_device_ops hns_roce_v2_dev_ops = { + .destroy_qp = hns_roce_v2_destroy_qp, + .modify_cq = hns_roce_v2_modify_cq, + .poll_cq = hns_roce_v2_poll_cq, + .post_recv = hns_roce_v2_post_recv, + .post_send = hns_roce_v2_post_send, + .query_qp = hns_roce_v2_query_qp, + .req_notify_cq = hns_roce_v2_req_notify_cq, +}; + +static const struct ib_device_ops hns_roce_v2_dev_srq_ops = { + .modify_srq = hns_roce_v2_modify_srq, + .post_srq_recv = hns_roce_v2_post_srq_recv, + .query_srq = hns_roce_v2_query_srq, +}; + static const struct hns_roce_hw hns_roce_hw_v2 = { .cmq_init = hns_roce_v2_cmq_init, .cmq_exit = hns_roce_v2_cmq_exit, @@ -5765,6 +5781,8 @@ static const struct hns_roce_hw hns_roce_hw_v2 = { .modify_srq = hns_roce_v2_modify_srq, .query_srq = hns_roce_v2_query_srq, .post_srq_recv = hns_roce_v2_post_srq_recv, + .hns_roce_dev_ops = &hns_roce_v2_dev_ops, + .hns_roce_dev_srq_ops = &hns_roce_v2_dev_srq_ops, }; static const struct pci_device_id hns_roce_hw_v2_pci_tbl[] = { -- cgit v1.2.3-59-g8ed1b