From e14d9857cc081beaea74af5784e6aec773018cd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=B6glinger?= Date: Sun, 13 May 2018 14:24:01 +0200 Subject: [PATCH] Replaced remaining high priority KdPrint calls --- sys/Driver.c | 20 ++++++++++++++++---- sys/Ds4.c | 6 ++++-- sys/buspdo.c | 6 +++++- sys/usbpdo.c | 5 ++++- 4 files changed, 29 insertions(+), 8 deletions(-) diff --git a/sys/Driver.c b/sys/Driver.c index 5b4877c..4c6c2c8 100644 --- a/sys/Driver.c +++ b/sys/Driver.c @@ -509,7 +509,10 @@ Bus_PdoStageResult( PAGED_CODE(); - KdPrint((DRIVERNAME "Bus_PdoStageResult: Stage: %d, Serial: %d, status: 0x%X\n", Stage, Serial, Status)); + TraceEvents(TRACE_LEVEL_INFORMATION, + TRACE_DRIVER, + "%!FUNC! Entry (stage = %d, serial = %d, status = %!STATUS!)", + Stage, Serial, Status); pFdoData = FdoGetData(InterfaceHeader->Context); @@ -522,14 +525,20 @@ Bus_PdoStageResult( items = WdfCollectionGetCount(pFdoData->PendingPluginRequests); - KdPrint((DRIVERNAME "Items count: %d\n", items)); + TraceEvents(TRACE_LEVEL_INFORMATION, + TRACE_DRIVER, + "Items count: %d", + items); for (i = 0; i < items; i++) { curRequest = WdfCollectionGetItem(pFdoData->PendingPluginRequests, i); curSerial = PluginRequestGetData(curRequest)->Serial; - KdPrint((DRIVERNAME "Serial: %d, curSerial: %d\n", Serial, curSerial)); + TraceEvents(TRACE_LEVEL_INFORMATION, + TRACE_DRIVER, + "Serial: %d, curSerial: %d", + Serial, curSerial); if (Serial == curSerial) { @@ -537,7 +546,10 @@ Bus_PdoStageResult( WdfCollectionRemove(pFdoData->PendingPluginRequests, curRequest); - KdPrint((DRIVERNAME "Removed item with serial: %d\n", curSerial)); + TraceEvents(TRACE_LEVEL_INFORMATION, + TRACE_DRIVER, + "Removed item with serial: %d", + curSerial); break; } diff --git a/sys/Ds4.c b/sys/Ds4.c index d93fcab..627375e 100644 --- a/sys/Ds4.c +++ b/sys/Ds4.c @@ -384,11 +384,13 @@ VOID Ds4_GetDeviceDescriptorType(PUSB_DEVICE_DESCRIPTOR pDescriptor, PPDO_DEVICE VOID Ds4_SelectConfiguration(PUSBD_INTERFACE_INFORMATION pInfo) { - KdPrint((DRIVERNAME ">> >> >> URB_FUNCTION_SELECT_CONFIGURATION: Length %d, Interface %d, Alternate %d, Pipes %d\n", + TraceEvents(TRACE_LEVEL_VERBOSE, + TRACE_DS4, + ">> >> >> URB_FUNCTION_SELECT_CONFIGURATION: Length %d, Interface %d, Alternate %d, Pipes %d", (int)pInfo->Length, (int)pInfo->InterfaceNumber, (int)pInfo->AlternateSetting, - pInfo->NumberOfPipes)); + pInfo->NumberOfPipes); pInfo->Class = 0x03; // HID pInfo->SubClass = 0x00; diff --git a/sys/buspdo.c b/sys/buspdo.c index c455b0e..791b822 100644 --- a/sys/buspdo.c +++ b/sys/buspdo.c @@ -417,7 +417,11 @@ NTSTATUS Bus_CreatePdo( if (!NT_SUCCESS(status)) { - KdPrint((DRIVERNAME "Couldn't initialize additional contexts\n")); + TraceEvents(TRACE_LEVEL_ERROR, + TRACE_BUSPDO, + "Couldn't initialize additional contexts: %!STATUS!", + status); + goto endCreatePdo; } diff --git a/sys/usbpdo.c b/sys/usbpdo.c index 3467b7c..9a62cfd 100644 --- a/sys/usbpdo.c +++ b/sys/usbpdo.c @@ -231,7 +231,10 @@ NTSTATUS UsbPdo_GetConfigurationDescriptorType(PURB urb, PPDO_DEVICE_DATA pCommo // NTSTATUS UsbPdo_GetStringDescriptorType(PURB urb, PPDO_DEVICE_DATA pCommon) { - KdPrint((DRIVERNAME "Index = %d\n", urb->UrbControlDescriptorRequest.Index)); + TraceEvents(TRACE_LEVEL_VERBOSE, + TRACE_USBPDO, + "Index = %d", + urb->UrbControlDescriptorRequest.Index); switch (pCommon->TargetType) {