From: leonidk Date: Sun, 2 Nov 2008 11:37:22 +0000 (+0000) Subject: [IBBUS] Fix hibernation mechanism, broken after converting IBBUS into filter driver... X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=ef414f287df72de69f7bd513f46d399c215cd7dd;p=~shefty%2Frdma-win.git [IBBUS] Fix hibernation mechanism, broken after converting IBBUS into filter driver. [mlnx:3409] git-svn-id: svn://openib.tc.cornell.edu/gen1@1722 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- diff --git a/branches/WOF2-0/trunk/core/bus/kernel/bus_port_mgr.c b/branches/WOF2-0/trunk/core/bus/kernel/bus_port_mgr.c index e7b3212b..b3c70265 100644 --- a/branches/WOF2-0/trunk/core/bus/kernel/bus_port_mgr.c +++ b/branches/WOF2-0/trunk/core/bus/kernel/bus_port_mgr.c @@ -1258,6 +1258,12 @@ port_mgr_port_remove( hca_deref: deref_al_obj( &p_ext->h_ca->obj ); + + // Setting h_ca to be NULL forces IPoIB to start only after re-acquiring new CA object + // The latter happens in __port_was_hibernated or port_mgr_port_add functions + // after arriving IB_PNP_PORT_ADD event from IBAL + p_ext->h_ca = NULL; + cl_mutex_release( &p_port_mgr->pdo_mutex ); BUS_EXIT( BUS_DBG_PNP ); @@ -1848,13 +1854,10 @@ port_query_ipoib_ifc( CL_ASSERT( KeGetCurrentIrql() < DISPATCH_LEVEL ); p_ext = p_dev_obj->DeviceExtension; - if (p_ext->pdo.b_hibernating) { - // Can't continue within hibernation stage - return STATUS_UNSUCCESSFUL; - } - BUS_TRACE( BUS_DBG_PNP, ("Query i/f for %s: PDO %p (=%p),ext %p, present %d, missing %d .\n", + + BUS_TRACE( BUS_DBG_PNP, ("Query i/f for %s: PDO %p (=%p),ext %p, present %d, missing %d, hibernated %d .\n", p_ext->pdo.cl_ext.vfptr_pnp_po->identity, p_ext->pdo.cl_ext.p_self_do, - p_dev_obj, p_ext, p_ext->pdo.b_present, p_ext->pdo.b_reported_missing ) ); + p_dev_obj, p_ext, p_ext->pdo.b_present, p_ext->pdo.b_reported_missing, p_ext->pdo.b_hibernating ) ); /* Get the interface. */ status = cl_fwd_query_ifc( diff --git a/branches/WOF2-0/trunk/ulp/ipoib/kernel/ipoib_adapter.c b/branches/WOF2-0/trunk/ulp/ipoib/kernel/ipoib_adapter.c index d84574f1..d94fefcb 100644 --- a/branches/WOF2-0/trunk/ulp/ipoib/kernel/ipoib_adapter.c +++ b/branches/WOF2-0/trunk/ulp/ipoib/kernel/ipoib_adapter.c @@ -498,6 +498,7 @@ __adapter_free( p_adapter->p_ifc->close_al( p_adapter->h_al ); cl_free( p_adapter->p_ifc ); + p_adapter->p_ifc = NULL; } cl_vector_destroy( &p_adapter->ip_vector );