[IPoIB, Complib] Fix NDIS WHQL 1c_KernelCalls public import test failures.
authorftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 28 Feb 2006 05:55:31 +0000 (05:55 +0000)
committerftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Tue, 28 Feb 2006 05:55:31 +0000 (05:55 +0000)
git-svn-id: svn://openib.tc.cornell.edu/gen1/trunk@222 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

core/complib/cl_memory.c
ulp/ipoib/kernel/ipoib_driver.c

index 671509c..eec7a23 100644 (file)
@@ -94,9 +94,6 @@ __cl_mem_track_start( void )
                __cl_free_priv( gp_mem_tracker );\r
                return;\r
        }\r
-\r
-       cl_msg_out( "\n\n\n*** Memory tracker object address = %p ***\n\n\n",\r
-               gp_mem_tracker );\r
 }\r
 \r
 \r
index e87dc71..6850cde 100644 (file)
@@ -506,8 +506,11 @@ ipoib_get_adapter_guids(
 {\r
        NTSTATUS                        status;\r
        ib_al_ifc_data_t        data;\r
-       IO_STACK_LOCATION       io_stack;\r
+       IO_STACK_LOCATION       io_stack, *p_fwd_io_stack;\r
        DEVICE_OBJECT           *p_pdo;\r
+       IRP                                     *p_irp;\r
+       KEVENT                          event;\r
+       IO_STATUS_BLOCK         io_status;\r
 \r
        IPOIB_ENTER( IPOIB_DBG_INIT );\r
 \r
@@ -528,7 +531,34 @@ ipoib_get_adapter_guids(
        io_stack.Parameters.QueryInterface.InterfaceType = \r
                &GUID_IB_AL_INTERFACE;\r
 \r
-       status = cl_fwd_query_ifc( p_pdo, &io_stack );\r
+       KeInitializeEvent( &event, NotificationEvent, FALSE );\r
+\r
+       /* Build the IRP for the HCA. */\r
+       p_irp = IoBuildSynchronousFsdRequest( IRP_MJ_PNP, p_pdo,\r
+               NULL, 0, NULL, &event, &io_status );\r
+       if( !p_irp )\r
+       {\r
+               IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,\r
+                       ("Failed to allocate query interface IRP.\n") );\r
+               return STATUS_INSUFFICIENT_RESOURCES;\r
+       }\r
+\r
+       /* Copy the request query parameters. */\r
+       p_fwd_io_stack = IoGetNextIrpStackLocation( p_irp );\r
+       p_fwd_io_stack->MinorFunction = IRP_MN_QUERY_INTERFACE;\r
+       p_fwd_io_stack->Parameters.QueryInterface =\r
+               io_stack.Parameters.QueryInterface;\r
+       p_irp->IoStatus.Status = STATUS_NOT_SUPPORTED;\r
+\r
+       /* Send the IRP. */\r
+       status = IoCallDriver( p_pdo, p_irp );\r
+       if( status == STATUS_PENDING )\r
+       {\r
+               KeWaitForSingleObject( &event, Executive, KernelMode,\r
+                       FALSE, NULL );\r
+               status = io_status.Status;\r
+       }\r
+\r
        if( !NT_SUCCESS( status ) )\r
        {\r
                IPOIB_TRACE_EXIT( IPOIB_DBG_ERROR,\r