]> git.openfabrics.org - ~ardavis/dapl.git/commitdiff
allow log level changes during device open
authorArlin Davis <arlin.r.davis@intel.com>
Fri, 11 Jul 2014 18:32:43 +0000 (11:32 -0700)
committerArlin Davis <arlin.r.davis@intel.com>
Fri, 11 Jul 2014 18:32:43 +0000 (11:32 -0700)
Signed-off-by: Arlin Davis <arlin.r.davis@intel.com>
dapl/common/dapl_ia_open.c

index b6aa8149606a1b8c81b55a708aaf893fea893861..cd74adf87d6d2373b9baf52aa0d92c86a14d6ebb 100644 (file)
@@ -122,6 +122,10 @@ dapl_ia_open(IN const DAT_NAME_PTR name,
        /* get the hca_ptr */
        hca_ptr = (DAPL_HCA *) provider->extension;
 
+       /* log levels could be reset and set between opens */
+       g_dapl_dbg_type =  dapl_os_get_env_val("DAPL_DBG_TYPE",
+                                              DAPL_DBG_TYPE_ERR |
+                                              DAPL_DBG_TYPE_WARN);
        /*
         * Open the HCA if it has not been done before.
         */
@@ -226,23 +230,6 @@ dapl_ia_open(IN const DAT_NAME_PTR name,
 
                dapl_os_lock(&hca_ptr->lock);
                if (hca_ptr->async_evd != (DAPL_EVD *) 0) {
-#if 0
-                       /*
-                        * The async EVD for this HCA has already been assigned.
-                        * It's an error to try and assign another one.
-                        *
-                        * However, we need to somehow allow multiple IAs
-                        * off of the same HCA.  The right way to do this
-                        * is by dispatching events off the HCA to the appropriate
-                        * IA, but we aren't there yet.  So for now we create
-                        * the EVD but don't connect it to anything.
-                        */
-                       dapl_os_atomic_dec(&evd_ptr->evd_ref_count);
-                       dapl_evd_free(evd_ptr);
-                       dat_status =
-                           DAT_ERROR(DAT_INVALID_PARAMETER, DAT_INVALID_ARG4);
-                       goto bail;
-#endif
                        dapl_os_unlock(&hca_ptr->lock);
                } else {
                        hca_ptr->async_evd = evd_ptr;