[IBBUS] a little fix to 2019 patch (remove HCA registration with IBAL.). [mlnx: 4105]
authorleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 5 Apr 2009 13:13:39 +0000 (13:13 +0000)
committerleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 5 Apr 2009 13:13:39 +0000 (13:13 +0000)
Make HCA de-registration before removing port managers

git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@2077 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

core/bus/kernel/bus_pnp.c

index 661a120..162c401 100644 (file)
@@ -555,6 +555,12 @@ fdo_release_resources(
 \r
        //TODO: Fail outstanding I/O operations.\r
 \r
+       ib_status = ib_deregister_ca( p_ext->hca_ifc.Verbs.guid );\r
+       if( ib_status != IB_SUCCESS ) {\r
+               BUS_PRINT( BUS_DBG_ERROR, ("ib_deregister_ca returned %s.\n",\r
+                       ib_get_err_str(ib_status)) );\r
+       }\r
+\r
        if ( p_ext->p_port_mgr && p_bfi->p_port_mgr ) {\r
                cl_obj_destroy( &p_ext->p_port_mgr->obj );\r
                p_ext->p_port_mgr = NULL;\r
@@ -566,11 +572,6 @@ fdo_release_resources(
        }\r
 \r
        if (p_ext->hca_ifc_taken) {\r
-               ib_status = ib_deregister_ca( p_ext->hca_ifc.Verbs.guid );\r
-               if( ib_status != IB_SUCCESS ) {\r
-                       BUS_PRINT( BUS_DBG_ERROR, ("ib_deregister_ca returned %s.\n",\r
-                               ib_get_err_str(ib_status)) );\r
-               }\r
                p_ext->hca_ifc.InterfaceHeader.InterfaceDereference(\r
                        p_ext->hca_ifc.InterfaceHeader.Context);\r
        }\r