IB/qib: Setup notify free/create mad agent callbacks for rdmavt
authorDennis Dalessandro <dennis.dalessandro@intel.com>
Sun, 14 Feb 2016 20:10:45 +0000 (12:10 -0800)
committerDoug Ledford <dledford@redhat.com>
Fri, 11 Mar 2016 01:38:09 +0000 (20:38 -0500)
Qib needs to be notified when mad agents are created and freed, there is
some counter maintenance that needs to be performed. Add those callbacks at
registration time with rdmavt.

Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Reviewed-by: Jubin John <jubin.john@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/qib/qib_verbs.c

index 5cf019fb50d996f380da573934cdb3b33027cc97..cbf6200e6afc06b9ba7dc485e00cd807ea78872f 100644 (file)
@@ -1682,6 +1682,10 @@ int qib_register_ib_device(struct qib_devdata *dd)
        dd->verbs_dev.rdi.driver_f.query_port_state = qib_query_port;
        dd->verbs_dev.rdi.driver_f.shut_down_port = qib_shut_down_port;
        dd->verbs_dev.rdi.driver_f.cap_mask_chg = qib_cap_mask_chg;
+       dd->verbs_dev.rdi.driver_f.notify_create_mad_agent =
+                                               qib_notify_create_mad_agent;
+       dd->verbs_dev.rdi.driver_f.notify_free_mad_agent =
+                                               qib_notify_free_mad_agent;
 
        dd->verbs_dev.rdi.dparms.max_rdma_atomic = QIB_MAX_RDMA_ATOMIC;
        dd->verbs_dev.rdi.driver_f.get_guid_be = qib_get_guid_be;