From 684e92df4062a88e6df3666a1583f8bb2ceee1c2 Mon Sep 17 00:00:00 2001 From: ftillier Date: Tue, 28 Feb 2006 05:55:31 +0000 Subject: [PATCH] [IPoIB, Complib] Fix NDIS WHQL 1c_KernelCalls public import test failures. git-svn-id: svn://openib.tc.cornell.edu/gen1@222 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86 --- trunk/core/complib/cl_memory.c | 3 --- trunk/ulp/ipoib/kernel/ipoib_driver.c | 34 +++++++++++++++++++++++++-- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/trunk/core/complib/cl_memory.c b/trunk/core/complib/cl_memory.c index 671509c4..eec7a235 100644 --- a/trunk/core/complib/cl_memory.c +++ b/trunk/core/complib/cl_memory.c @@ -94,9 +94,6 @@ __cl_mem_track_start( void ) __cl_free_priv( gp_mem_tracker ); return; } - - cl_msg_out( "\n\n\n*** Memory tracker object address = %p ***\n\n\n", - gp_mem_tracker ); } diff --git a/trunk/ulp/ipoib/kernel/ipoib_driver.c b/trunk/ulp/ipoib/kernel/ipoib_driver.c index e87dc71b..6850cdee 100644 --- a/trunk/ulp/ipoib/kernel/ipoib_driver.c +++ b/trunk/ulp/ipoib/kernel/ipoib_driver.c @@ -506,8 +506,11 @@ ipoib_get_adapter_guids( { NTSTATUS status; ib_al_ifc_data_t data; - IO_STACK_LOCATION io_stack; + IO_STACK_LOCATION io_stack, *p_fwd_io_stack; DEVICE_OBJECT *p_pdo; + IRP *p_irp; + KEVENT event; + IO_STATUS_BLOCK io_status; IPOIB_ENTER( IPOIB_DBG_INIT ); @@ -528,7 +531,34 @@ ipoib_get_adapter_guids( io_stack.Parameters.QueryInterface.InterfaceType = &GUID_IB_AL_INTERFACE; - status = cl_fwd_query_ifc( p_pdo, &io_stack ); + KeInitializeEvent( &event, NotificationEvent, FALSE ); + + /* Build the IRP for the HCA. */ + p_irp = IoBuildSynchronousFsdRequest( IRP_MJ_PNP, p_pdo, + NULL, 0, NULL, &event, &io_status ); + if( !p_irp ) + { + IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR, + ("Failed to allocate query interface IRP.\n") ); + return STATUS_INSUFFICIENT_RESOURCES; + } + + /* Copy the request query parameters. */ + p_fwd_io_stack = IoGetNextIrpStackLocation( p_irp ); + p_fwd_io_stack->MinorFunction = IRP_MN_QUERY_INTERFACE; + p_fwd_io_stack->Parameters.QueryInterface = + io_stack.Parameters.QueryInterface; + p_irp->IoStatus.Status = STATUS_NOT_SUPPORTED; + + /* Send the IRP. */ + status = IoCallDriver( p_pdo, p_irp ); + if( status == STATUS_PENDING ) + { + KeWaitForSingleObject( &event, Executive, KernelMode, + FALSE, NULL ); + status = io_status.Status; + } + if( !NT_SUCCESS( status ) ) { IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR, -- 2.41.0