+++ /dev/null
-Bottom: 5949be80df90f7b34e3080d4fb9d318af06f8515
-Top: 7ac9835d176d027d31e4f038ef3bad409a033c9b
-Author: Sean Hefty <sean.hefty@intel.com>
-Date: 2010-02-03 17:03:47 -0800
-
-dapl: release completion channels
-
-Cleanup allocated completion channels.
-
-Signed-off-by: Sean Hefty <sean.hefty@intel.com>
-
-
----
-
-diff --git a/trunk/ulp/dapl2/dapl/openib_cma/device.c b/trunk/ulp/dapl2/dapl/openib_cma/device.c
-index 32090fb..c9d3756 100644
---- a/trunk/ulp/dapl2/dapl/openib_cma/device.c
-+++ b/trunk/ulp/dapl2/dapl/openib_cma/device.c
-@@ -502,6 +502,16 @@ DAT_RETURN dapls_ib_close_hca(IN DAPL_HCA * hca_ptr)
- dapl_os_sleep_usec(1000);\r
- }\r
- bail:\r
-+ if (hca_ptr->ib_trans.ib_cq)\r
-+ ibv_destroy_comp_channel(hca_ptr->ib_trans.ib_cq);\r
-+\r
-+ if (hca_ptr->ib_trans.ib_cq_empty) {\r
-+ struct ibv_comp_channel *channel;\r
-+ channel = hca_ptr->ib_trans.ib_cq_empty->channel;\r
-+ ibv_destroy_cq(hca_ptr->ib_trans.ib_cq_empty);\r
-+ ibv_destroy_comp_channel(channel);\r
-+ }\r
-+\r
- if (hca_ptr->ib_hca_handle != IB_INVALID_HANDLE) {\r
- if (rdma_destroy_id(hca_ptr->ib_trans.cm_id))\r
- return (dapl_convert_errno(errno, "ib_close_device"));\r
-diff --git a/trunk/ulp/dapl2/dapl/openib_scm/device.c b/trunk/ulp/dapl2/dapl/openib_scm/device.c
-index bb3893a..04e992a 100644
---- a/trunk/ulp/dapl2/dapl/openib_scm/device.c
-+++ b/trunk/ulp/dapl2/dapl/openib_scm/device.c
-@@ -504,6 +504,16 @@ DAT_RETURN dapls_ib_close_hca(IN DAPL_HCA * hca_ptr)
- }\r
- \r
- out:\r
-+ if (hca_ptr->ib_trans.ib_cq)\r
-+ ibv_destroy_comp_channel(hca_ptr->ib_trans.ib_cq);\r
-+\r
-+ if (hca_ptr->ib_trans.ib_cq_empty) {\r
-+ struct ibv_comp_channel *channel;\r
-+ channel = hca_ptr->ib_trans.ib_cq_empty->channel;\r
-+ ibv_destroy_cq(hca_ptr->ib_trans.ib_cq_empty);\r
-+ ibv_destroy_comp_channel(channel);\r
-+ }\r
-+\r
- if (hca_ptr->ib_hca_handle != IB_INVALID_HANDLE) {\r
- if (ibv_close_device(hca_ptr->ib_hca_handle))\r
- return (dapl_convert_errno(errno, "ib_close_device"));\r
-diff --git a/trunk/ulp/dapl2/dapl/openib_ucm/device.c b/trunk/ulp/dapl2/dapl/openib_ucm/device.c
-index e890eef..a9cec73 100644
---- a/trunk/ulp/dapl2/dapl/openib_ucm/device.c
-+++ b/trunk/ulp/dapl2/dapl/openib_ucm/device.c
-@@ -401,6 +401,16 @@ DAT_RETURN dapls_ib_close_hca(IN DAPL_HCA * hca_ptr)
- destroy_os_signal(hca_ptr);
- ucm_service_destroy(hca_ptr);
-
-+ if (hca_ptr->ib_trans.ib_cq)\r
-+ ibv_destroy_comp_channel(hca_ptr->ib_trans.ib_cq);\r
-+\r
-+ if (hca_ptr->ib_trans.ib_cq_empty) {\r
-+ struct ibv_comp_channel *channel;\r
-+ channel = hca_ptr->ib_trans.ib_cq_empty->channel;\r
-+ ibv_destroy_cq(hca_ptr->ib_trans.ib_cq_empty);\r
-+ ibv_destroy_comp_channel(channel);\r
-+ }\r
-+
- if (hca_ptr->ib_hca_handle != IB_INVALID_HANDLE) {
- if (ibv_close_device(hca_ptr->ib_hca_handle))
- return (dapl_convert_errno(errno, "ib_close_device"));