Applied on 2884. Thanks Tzachi
From: [email protected] [mailto:[email protected]] On Behalf Of Tzachi Dar Sent: Tuesday, August 31, 2010 6:31 PM To: [email protected] Subject: [ofw] patch: [IBBUS] g_stat: added threads for handling SET POWER IRP. Signed off by: leonid Mlnx 5271 Index: B:/users/tzachid/projinf9/trunk/core/bus/kernel/bus_pnp.c =================================================================== --- B:/users/tzachid/projinf9/trunk/core/bus/kernel/bus_pnp.c (revision 5270) +++ B:/users/tzachid/projinf9/trunk/core/bus/kernel/bus_pnp.c (revision 5271) @@ -1330,6 +1330,12 @@ BUS_PRINT( BUS_DBG_POWER, ("***** re-register CA, IRQL %d\n", KeGetCurrentIrql())); + // stat + if ( p_ext->p_stat ) { + p_ext->p_stat->thread[BUS_ST_THREAD_POWER_UP].p_thread = KeGetCurrentThread(); + memcpy( p_ext->p_stat->thread[BUS_ST_THREAD_POWER_UP].thread_name, "PowerUp", 8 ); + } + status = __register_ca( p_dev_obj ); if( !NT_SUCCESS( status ) ) { BUS_PRINT( BUS_DBG_POWER, @@ -1349,6 +1355,11 @@ ("Power increased to: device %d, system %d.\n", (int)p_ext->device_power_state, (int)p_ext->system_power_state)); + if ( p_ext->p_stat ) { + p_ext->p_stat->thread[BUS_ST_THREAD_POWER_UP].p_thread = NULL; + *p_ext->p_stat->thread[BUS_ST_THREAD_POWER_UP].thread_name = '\0'; + } + goto exit; err_fdo_start: @@ -1431,6 +1442,12 @@ PoStartNextPowerIrp( p_irp ); IoReleaseRemoveLock( &p_ext->cl_ext.remove_lock, p_irp ); + // stat + if ( p_ext->p_stat ) { + p_ext->p_stat->thread[BUS_ST_THREAD_POWER_DOWN].p_thread = NULL; + *p_ext->p_stat->thread[BUS_ST_THREAD_POWER_DOWN].thread_name = '\0'; + } + BUS_EXIT( BUS_DBG_POWER ); return STATUS_SUCCESS; } @@ -1470,6 +1487,12 @@ BUS_PRINT( BUS_DBG_POWER, ("***** deregister CA \n")); + // stat + if ( p_ext->p_stat ) { + p_ext->p_stat->thread[BUS_ST_THREAD_POWER_DOWN].p_thread = KeGetCurrentThread(); + memcpy( p_ext->p_stat->thread[BUS_ST_THREAD_POWER_DOWN].thread_name, "PowerDown", 10 ); + } + __deregister_ca( p_dev_obj ); IoCopyCurrentIrpStackLocationToNext( p_irp );
_______________________________________________ ofw mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw
