[IOU] Add WPP tracing to IOU bus driver.
[mirror/winof/.git] / core / iou / kernel / iou_pnp.c
index 51d48b1..3652c2c 100644 (file)
  */\r
 \r
 \r
+#include "iou_driver.h"\r
+#if defined(EVENT_TRACING)\r
+#ifdef offsetof\r
+#undef offsetof\r
+#endif\r
+#include "iou_pnp.tmh"\r
+#endif\r
 #include "iou_pnp.h"\r
 #include "iou_ioc_mgr.h"\r
 #include <complib/cl_memory.h>\r
@@ -161,7 +168,7 @@ iou_add_device(
                FILE_DEVICE_SECURE_OPEN, FALSE, &p_dev_obj );\r
        if( !NT_SUCCESS(status) )\r
        {\r
-               IOU_TRACE_EXIT( IOU_DBG_ERROR, \r
+               IOU_PRINT_EXIT( TRACE_LEVEL_ERROR, IOU_DBG_ERROR,\r
                        ("Failed to create bus root FDO device.\n") );\r
                return status;\r
        }\r
@@ -174,11 +181,12 @@ iou_add_device(
        if( !p_next_do )\r
        {\r
                IoDeleteDevice( p_dev_obj );\r
-               IOU_TRACE_EXIT( IOU_DBG_ERROR, ("IoAttachToDeviceStack failed.\n") );\r
+               IOU_PRINT_EXIT( TRACE_LEVEL_ERROR, IOU_DBG_ERROR,\r
+                       ("IoAttachToDeviceStack failed.\n") );\r
                return STATUS_NO_SUCH_DEVICE;\r
        }\r
 \r
-       cl_init_pnp_po_ext( p_dev_obj, p_next_do, p_pdo, iou_globals.dbg_lvl,\r
+       cl_init_pnp_po_ext( p_dev_obj, p_next_do, p_pdo, g_iou_dbg_flags,\r
                &vfptr_fdo_pnp, NULL );\r
 \r
        IOU_EXIT( IOU_DBG_PNP );\r
@@ -246,7 +254,7 @@ fdo_start(
        status = cl_do_sync_pnp( p_dev_obj, p_irp, p_action );\r
        if( !NT_SUCCESS( status ) )\r
        {\r
-               IOU_TRACE_EXIT( IOU_DBG_ERROR, \r
+               IOU_PRINT_EXIT( TRACE_LEVEL_ERROR, IOU_DBG_ERROR,\r
                        ("Lower drivers failed IRP_MN_START_DEVICE.\n") );\r
                return status;\r
        }\r
@@ -254,7 +262,7 @@ fdo_start(
        status = __get_iou_ifc( p_ext );\r
        if( !NT_SUCCESS( status ) )\r
        {\r
-               IOU_TRACE_EXIT( IOU_DBG_ERROR,\r
+               IOU_PRINT_EXIT( TRACE_LEVEL_ERROR, IOU_DBG_ERROR,\r
                        ("Failed to get IOU interface.\n") );\r
                return status;\r
        }\r
@@ -263,7 +271,8 @@ fdo_start(
        ib_status = ioc_mgr_init( &p_ext->ioc_mgr );\r
        if( ib_status != IB_SUCCESS )\r
        {\r
-               IOU_TRACE_EXIT( IOU_DBG_ERROR, ("ioc_mgr_init returned %s.\n",\r
+               IOU_PRINT_EXIT( TRACE_LEVEL_ERROR, IOU_DBG_ERROR,\r
+                       ("ioc_mgr_init returned %s.\n",\r
                        p_ext->ioc_mgr.ifc.get_err_str(ib_status)) );\r
                return STATUS_UNSUCCESSFUL;\r
        }\r
@@ -334,7 +343,7 @@ fdo_query_capabilities(
 \r
        if( !NT_SUCCESS( status ) )\r
        {\r
-               IOU_TRACE_EXIT( IOU_DBG_ERROR, \r
+               IOU_PRINT_EXIT( TRACE_LEVEL_ERROR, IOU_DBG_ERROR,\r
                        ("cl_do_sync_pnp returned %08x.\n", status) );\r
                return status;\r
        }\r
@@ -499,7 +508,7 @@ __set_power_completion(
        {\r
                PoStartNextPowerIrp( p_irp );\r
                IoReleaseRemoveLock( &p_ext->cl_ext.remove_lock, p_irp );\r
-               IOU_TRACE_EXIT( IOU_DBG_ERROR, \r
+               IOU_PRINT_EXIT( TRACE_LEVEL_ERROR, IOU_DBG_ERROR,\r
                        ("IRP_MN_SET_POWER for system failed by lower driver with %08x.\n",\r
                        p_irp->IoStatus.Status) );\r
                return STATUS_SUCCESS;\r
@@ -522,7 +531,7 @@ __set_power_completion(
                p_irp->IoStatus.Status = status;\r
                IoCompleteRequest( p_irp, IO_NO_INCREMENT );\r
                IoReleaseRemoveLock( &p_ext->cl_ext.remove_lock, p_irp );\r
-               IOU_TRACE( IOU_DBG_ERROR,\r
+               IOU_PRINT( TRACE_LEVEL_ERROR, IOU_DBG_ERROR,\r
                        ("PoRequestPowerIrp returned %08x.\n", status) );\r
        }\r
 \r