diff C3 C:/Documents and Settings/scsmith/Local Settings/Temp/bus_iou_mgr.c-revBASE.svn001.tmp.c C:/Documents and Settings/scsmith/My Documents/openIB-windows/SVN/gen1/branches/WOF2-0/trunk/core/bus/kernel/bus_iou_mgr.c
*** C:/Documents and Settings/scsmith/Local Settings/Temp/bus_iou_mgr.c-revBASE.svn001.tmp.c	Mon Sep 15 10:41:30 2008
--- C:/Documents and Settings/scsmith/My Documents/openIB-windows/SVN/gen1/branches/WOF2-0/trunk/core/bus/kernel/bus_iou_mgr.c	Mon Sep 15 10:41:40 2008
***************
*** 363,376 ****
  	CL_ASSERT( p_obj );
  	p_bfi = get_bfi_by_obj( BFI_IOU_MGR_OBJ, p_obj );
  	if (p_bfi == NULL) {
! 		BUS_PRINT(BUS_DBG_PNP, ("%s() failed to find p_bfi by obj %p?\n",
! 			__FUNCTION__,p_obj));
  		return;
  	}
  	gp_iou_mgr = p_bfi->p_iou_mgr;
  
! 	BUS_PRINT(BUS_DBG_PNP, ("%s(%s) obj %p port_mgr %p\n",
! 			__FUNCTION__, p_bfi->whoami, p_obj, gp_iou_mgr));
  
  	CL_ASSERT( gp_iou_mgr == PARENT_STRUCT( p_obj, iou_mgr_t, obj ) );
  
--- 363,375 ----
  	CL_ASSERT( p_obj );
  	p_bfi = get_bfi_by_obj( BFI_IOU_MGR_OBJ, p_obj );
  	if (p_bfi == NULL) {
! 		BUS_PRINT(BUS_DBG_PNP, ("Failed to find p_bfi by obj %p?\n", p_obj));
  		return;
  	}
  	gp_iou_mgr = p_bfi->p_iou_mgr;
  
! 	BUS_PRINT(BUS_DBG_PNP, ("%s obj %p port_mgr %p\n",
! 							p_bfi->whoami, p_obj, gp_iou_mgr));
  
  	CL_ASSERT( gp_iou_mgr == PARENT_STRUCT( p_obj, iou_mgr_t, obj ) );
  
***************
*** 404,411 ****
  	CL_ASSERT( p_obj );
  	p_bfi = get_bfi_by_obj( BFI_IOU_MGR_OBJ, p_obj );
  	if ( p_bfi == NULL ) {
! 		BUS_PRINT( BUS_DBG_PNP, ("%s: unable to get p_bfi iou_obj %p?\n",
! 					__FUNCTION__,p_obj) );
  		return;
  	}
  	gp_iou_mgr = p_bfi->p_iou_mgr;
--- 403,409 ----
  	CL_ASSERT( p_obj );
  	p_bfi = get_bfi_by_obj( BFI_IOU_MGR_OBJ, p_obj );
  	if ( p_bfi == NULL ) {
! 		BUS_PRINT( BUS_DBG_PNP, ("Unable to get p_bfi iou_obj %p?\n", p_obj) );
  		return;
  	}
  	gp_iou_mgr = p_bfi->p_iou_mgr;
***************
*** 416,423 ****
  
  	CL_ASSERT( gp_iou_mgr == PARENT_STRUCT( p_obj, iou_mgr_t, obj ) );
  
! 	BUS_PRINT( BUS_DBG_PNP, ("%s(%s) Mark all IOU PDOs as no longer present\n",
! 				__FUNCTION__, p_bfi->whoami));
  	/*
  	 * Mark all IOU PDOs as no longer present.  This will cause them
  	 * to be removed when they process the IRP_MN_REMOVE_DEVICE.
--- 414,421 ----
  
  	CL_ASSERT( gp_iou_mgr == PARENT_STRUCT( p_obj, iou_mgr_t, obj ) );
  
! 	BUS_PRINT( BUS_DBG_PNP, ("%s Mark all IOU PDOs as no longer present\n",
! 								p_bfi->whoami));
  	/*
  	 * Mark all IOU PDOs as no longer present.  This will cause them
  	 * to be removed when they process the IRP_MN_REMOVE_DEVICE.
***************
*** 450,457 ****
  					p_bfi->whoami, p_ext->cl_ext.vfptr_pnp_po->identity,
  					p_ext->cl_ext.p_self_do, p_ext ) );
  
! 		BUS_TRACE( BUS_DBG_PNP,("%s(%s) p_ext->h_ca->obj.state %d ref_cnt %d\n",
! 					__FUNCTION__, p_bfi->whoami,
  					p_ext->h_ca->obj.state,
  					p_ext->h_ca->obj.ref_cnt));
  
--- 448,455 ----
  					p_bfi->whoami, p_ext->cl_ext.vfptr_pnp_po->identity,
  					p_ext->cl_ext.p_self_do, p_ext ) );
  
! 		BUS_TRACE( BUS_DBG_PNP,("%s p_ext->h_ca->obj.state %d ref_cnt %d\n",
! 					p_bfi->whoami,
  					p_ext->h_ca->obj.state,
  					p_ext->h_ca->obj.ref_cnt));
  
***************
*** 538,545 ****
  		break;
  
  	default:
! 		BUS_PRINT( BUS_DBG_PNP, ("%s() Unhandled PNP Event %s\n",
! 					__FUNCTION__, ib_get_pnp_event_str(p_pnp_rec->pnp_event) ));
  		break;
  	}
  	BUS_EXIT( BUS_DBG_PNP );
--- 536,543 ----
  		break;
  
  	default:
! 		BUS_PRINT( BUS_DBG_PNP, ("Unhandled PNP Event %s\n",
! 					ib_get_pnp_event_str(p_pnp_rec->pnp_event) ));
  		break;
  	}
  	BUS_EXIT( BUS_DBG_PNP );
***************
*** 562,568 ****
  
  	BUS_ENTER( BUS_DBG_PNP );
  
! 	BUS_PRINT(BUS_DBG_PNP, ("%s() ca_guid %I64x\n",__FUNCTION__,ca_guid));
  
  	/* special case guid == 0 - walk all bus filter instances */
  	if ( ca_guid == 0ULL ) {
--- 560,566 ----
  
  	BUS_ENTER( BUS_DBG_PNP );
  
! 	BUS_PRINT(BUS_DBG_PNP, ("CA_guid %I64x\n",ca_guid));
  
  	/* special case guid == 0 - walk all bus filter instances */
  	if ( ca_guid == 0ULL ) {
***************
*** 576,583 ****
  		}
  		p_rel = (DEVICE_RELATIONS*)p_irp->IoStatus.Information;
  		if ( p_rel ) {
! 			BUS_PRINT(BUS_DBG_PNP, ("%s() ca_guid 0 Reports %d\n",
! 						__FUNCTION__,p_rel->Count));
  		}
  		BUS_EXIT( BUS_DBG_PNP );
  		return STATUS_SUCCESS;
--- 574,580 ----
  		}
  		p_rel = (DEVICE_RELATIONS*)p_irp->IoStatus.Information;
  		if ( p_rel ) {
! 			BUS_PRINT(BUS_DBG_PNP, ("CA_guid 0 Reports %d\n", p_rel->Count));
  		}
  		BUS_EXIT( BUS_DBG_PNP );
  		return STATUS_SUCCESS;
***************
*** 585,599 ****
  
  	p_bfi = get_bfi_by_ca_guid(ca_guid);
  	if (p_bfi == NULL) {
! 		BUS_PRINT(BUS_DBG_PNP,
! 			("%s() Null p_bfi from ca_guid %I64x ?\n",__FUNCTION__,ca_guid));
! 		BUS_EXIT( BUS_DBG_PNP );
  		return STATUS_UNSUCCESSFUL;
  	}
  	gp_iou_mgr = p_bfi->p_iou_mgr;
  
! 	BUS_PRINT(BUS_DBG_PNP, ("%s(%s) for ca_guid %I64x iou_mgr %p\n",
! 				__FUNCTION__, p_bfi->whoami, ca_guid, gp_iou_mgr) );
  	if (!gp_iou_mgr)
  		return STATUS_NO_SUCH_DEVICE;
  
--- 582,595 ----
  
  	p_bfi = get_bfi_by_ca_guid(ca_guid);
  	if (p_bfi == NULL) {
! 		BUS_TRACE_EXIT(BUS_DBG_PNP,
! 								("NULL p_bfi from ca_guid %I64x ?\n",ca_guid));
  		return STATUS_UNSUCCESSFUL;
  	}
  	gp_iou_mgr = p_bfi->p_iou_mgr;
  
! 	BUS_PRINT(BUS_DBG_PNP, ("%s for ca_guid %I64x iou_mgr %p\n",
! 							p_bfi->whoami, ca_guid, gp_iou_mgr) );
  	if (!gp_iou_mgr)
  		return STATUS_NO_SUCH_DEVICE;
  
***************
*** 704,711 ****
  
  	p_bfi = get_set_bfi_by_ca_guid( p_pnp_rec->ca_guid );
  	if ( !p_bfi ) {
! 		BUS_TRACE_EXIT( BUS_DBG_PNP,("%s() NULL p_bfi? ca_guid 0x%I64x\n",
! 									__FUNCTION__, p_pnp_rec->ca_guid ) );
  		return IB_ERROR;
  	}
  
--- 700,707 ----
  
  	p_bfi = get_set_bfi_by_ca_guid( p_pnp_rec->ca_guid );
  	if ( !p_bfi ) {
! 		BUS_TRACE_EXIT( BUS_DBG_PNP,("NULL p_bfi? ca_guid 0x%I64x\n",
! 									p_pnp_rec->ca_guid ) );
  		return IB_ERROR;
  	}
  
***************
*** 717,725 ****
  		p_ctx = cl_zalloc( sizeof(*p_ctx) );
  		if( !p_ctx )
  		{
! 			BUS_TRACE_EXIT(BUS_DBG_PNP, ("%s(%s) ca_guid %I64x iou_guid(%I64x) "
! 					"BAD alloc for PNP context\n", __FUNCTION__,
! 					p_bfi->whoami, p_bfi->ca_guid, p_pnp_rec->guid ));
  
  			return IB_ERROR;
  		}
--- 713,721 ----
  		p_ctx = cl_zalloc( sizeof(*p_ctx) );
  		if( !p_ctx )
  		{
! 			BUS_TRACE_EXIT(BUS_DBG_PNP, ("%s ca_guid %I64x iou_guid(%I64x) "
! 					"BAD alloc for PNP context\n", p_bfi->whoami,
! 					p_bfi->ca_guid, p_pnp_rec->guid ));
  
  			return IB_ERROR;
  		}
***************
*** 727,735 ****
  		p_pnp_rec->pnp_rec.context = p_ctx;
  
  		BUS_PRINT(BUS_DBG_PNP,
! 					("%s(%s) ca_guid %I64x iou_guid(%I64x) ALLOC p_ctx @ %p\n",
! 					__FUNCTION__, p_bfi->whoami, p_bfi->ca_guid, 
! 					p_pnp_rec->guid,p_ctx));
  	}
  	gp_iou_mgr = p_bfi->p_iou_mgr;
  
--- 723,730 ----
  		p_pnp_rec->pnp_rec.context = p_ctx;
  
  		BUS_PRINT(BUS_DBG_PNP,
! 					("%s ca_guid %I64x iou_guid(%I64x) ALLOC p_ctx @ %p\n",
! 					p_bfi->whoami, p_bfi->ca_guid, p_pnp_rec->guid,p_ctx));
  	}
  	gp_iou_mgr = p_bfi->p_iou_mgr;
  
***************
*** 846,853 ****
  	p_bfi = p_ctx->p_bus_filter;
  	CL_ASSERT( p_bfi );
  
! 	BUS_PRINT(BUS_DBG_PNP,("%s(%s) ca_guid 0x%I64x iou_mgr %p\n",
! 				__FUNCTION__, p_bfi->whoami, p_bfi->ca_guid, p_bfi->p_iou_mgr));
  
  	/* fdo_release_resources() has destroyed the IOU mgr, all that needs to be
  	 * done is cleanup the PNP IOU context; one per port.
--- 841,848 ----
  	p_bfi = p_ctx->p_bus_filter;
  	CL_ASSERT( p_bfi );
  
! 	BUS_PRINT(BUS_DBG_PNP,("%s ca_guid 0x%I64x iou_mgr %p\n",
! 				p_bfi->whoami, p_bfi->ca_guid, p_bfi->p_iou_mgr));
  
  	/* fdo_release_resources() has destroyed the IOU mgr, all that needs to be
  	 * done is cleanup the PNP IOU context; one per port.
***************
*** 869,877 ****
  
  	if (p_bfi != p_ext->p_parent_ext->bus_filter) {
  		BUS_PRINT(BUS_DBG_PNP,
! 			("%s() p_bfi(%p) != p_ext->bus_filter(%p) line %d file %s\n",
! 			__FUNCTION__,p_bfi,p_ext->p_parent_ext->bus_filter,
! 			__LINE__,__FILE__));
  		CL_ASSERT (p_bfi == p_ext->p_parent_ext->bus_filter);
  	}
  
--- 864,871 ----
  
  	if (p_bfi != p_ext->p_parent_ext->bus_filter) {
  		BUS_PRINT(BUS_DBG_PNP,
! 			("p_bfi(%p) != p_ext->bus_filter(%p) line %d file %s\n",
! 			p_bfi,p_ext->p_parent_ext->bus_filter, __LINE__,__FILE__));
  		CL_ASSERT (p_bfi == p_ext->p_parent_ext->bus_filter);
  	}
  
***************
*** 884,891 ****
  	cl_mutex_acquire( &gp_iou_mgr->pdo_mutex );
  	if ( !p_ext->h_ca )
  	{
! 		BUS_TRACE_EXIT( BUS_DBG_PNP, ("%s() NULL h_ca? p_ext %p\n",
! 					__FUNCTION__, p_ext ) );
  		return;
  	}
  
--- 878,884 ----
  	cl_mutex_acquire( &gp_iou_mgr->pdo_mutex );
  	if ( !p_ext->h_ca )
  	{
! 		BUS_TRACE_EXIT( BUS_DBG_PNP, ("NULL h_ca? p_ext %p\n", p_ext ) );
  		return;
  	}
  
