[ofw] [PATCH 06/11] The HCA should not be closed until all resources have been released.

Davis, Arlin R arlin.r.davis at intel.com
Fri Oct 16 16:50:33 PDT 2009


This results in a hang on windows, since closing the device frees
the event processing thread.

Signed-off-by: Sean Hefty <sean.hefty at intel.com>
---
 dapl/openib_ucm/device.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/dapl/openib_ucm/device.c b/dapl/openib_ucm/device.c
index 90a044e..4f26e87 100644
--- a/dapl/openib_ucm/device.c
+++ b/dapl/openib_ucm/device.c
@@ -354,16 +354,17 @@ DAT_RETURN dapls_ib_close_hca(IN DAPL_HCA * hca_ptr)
 		}
 	}
 
+	dapl_os_lock_destroy(&hca_ptr->ib_trans.lock);
+	dapl_os_lock_destroy(&hca_ptr->ib_trans.llock);
+	destroy_cr_pipe(hca_ptr); /* no longer need pipe */
+	ucm_service_destroy(hca_ptr);
+
 	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"));
 		hca_ptr->ib_hca_handle = IB_INVALID_HANDLE;
 	}
 
-	dapl_os_lock_destroy(&hca_ptr->ib_trans.lock);
-	dapl_os_lock_destroy(&hca_ptr->ib_trans.llock);
-	destroy_cr_pipe(hca_ptr); /* no longer need pipe */
-	ucm_service_destroy(hca_ptr);
 	return (DAT_SUCCESS);
 }
 
-- 
1.5.2.5




More information about the ofw mailing list