]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
[IBBUS] Fix hibernation mechanism, broken after converting IBBUS into filter driver...
authorleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 2 Nov 2008 11:37:22 +0000 (11:37 +0000)
committerleonidk <leonidk@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Sun, 2 Nov 2008 11:37:22 +0000 (11:37 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1@1722 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

branches/WOF2-0/trunk/core/bus/kernel/bus_port_mgr.c
branches/WOF2-0/trunk/ulp/ipoib/kernel/ipoib_adapter.c

index e7b3212b39bfc3bcd803d19714302b908c589bd2..b3c70265a7b803786e83e5e9cf9eef5d0e9b42b6 100644 (file)
@@ -1258,6 +1258,12 @@ port_mgr_port_remove(
 \r
 hca_deref:\r
        deref_al_obj( &p_ext->h_ca->obj );\r
+       \r
+       //      Setting h_ca to be NULL forces IPoIB to start only after re-acquiring new CA object\r
+       // The latter happens in __port_was_hibernated or port_mgr_port_add functions \r
+       // after arriving IB_PNP_PORT_ADD event from IBAL\r
+       p_ext->h_ca = NULL;\r
+\r
        cl_mutex_release( &p_port_mgr->pdo_mutex );\r
 \r
        BUS_EXIT( BUS_DBG_PNP );\r
@@ -1848,13 +1854,10 @@ port_query_ipoib_ifc(
        CL_ASSERT( KeGetCurrentIrql() < DISPATCH_LEVEL );\r
 \r
        p_ext = p_dev_obj->DeviceExtension;\r
-       if      (p_ext->pdo.b_hibernating) {\r
-               // Can't continue within hibernation stage\r
-               return STATUS_UNSUCCESSFUL;\r
-       }\r
-       BUS_TRACE( BUS_DBG_PNP, ("Query i/f for %s: PDO %p (=%p),ext %p, present %d, missing %d .\n",\r
+\r
+       BUS_TRACE( BUS_DBG_PNP, ("Query i/f for %s: PDO %p (=%p),ext %p, present %d, missing %d, hibernated %d .\n",\r
                p_ext->pdo.cl_ext.vfptr_pnp_po->identity, p_ext->pdo.cl_ext.p_self_do, \r
-               p_dev_obj, p_ext, p_ext->pdo.b_present, p_ext->pdo.b_reported_missing ) );\r
+               p_dev_obj, p_ext, p_ext->pdo.b_present, p_ext->pdo.b_reported_missing, p_ext->pdo.b_hibernating ) );\r
 \r
        /* Get the interface. */\r
        status = cl_fwd_query_ifc(\r
index d84574f1a1d9ccc86637744c0ccf431309a622bf..d94fefcb06102980ae9eaf48b065f98512f129d1 100644 (file)
@@ -498,6 +498,7 @@ __adapter_free(
                        p_adapter->p_ifc->close_al( p_adapter->h_al );\r
 \r
                cl_free( p_adapter->p_ifc );\r
+               p_adapter->p_ifc = NULL;\r
        }\r
 \r
        cl_vector_destroy( &p_adapter->ip_vector );\r