From fc053ddc3113f9181a40baa68fe385b238d26530 Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Thu, 23 Feb 2012 00:37:41 +0000 Subject: [PATCH] [USBCCGP] - Print interface details when dumping the function descriptor - Fix bug USBCCG_AppendInterfaceNumber, which is not yet used svn path=/trunk/; revision=55825 --- reactos/drivers/usb/usbccgp/misc.c | 16 ++++++++++++---- reactos/drivers/usb/usbccgp/pdo.c | 2 +- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/reactos/drivers/usb/usbccgp/misc.c b/reactos/drivers/usb/usbccgp/misc.c index 1cb81f6f020..fd7514e3f28 100644 --- a/reactos/drivers/usb/usbccgp/misc.c +++ b/reactos/drivers/usb/usbccgp/misc.c @@ -215,10 +215,18 @@ DumpFunctionDescriptor( for(SubIndex = 0; SubIndex < FunctionDescriptor[Index].NumberOfInterfaces; SubIndex++) { - DPRINT1(" Interface %p\n", FunctionDescriptor[Index].InterfaceDescriptorList[SubIndex]); - DPRINT1(" Interface InterfaceNumber %x\n", FunctionDescriptor[Index].InterfaceDescriptorList[SubIndex]->bInterfaceNumber); - DPRINT1(" Interface Alternate %x\n", FunctionDescriptor[Index].InterfaceDescriptorList[SubIndex]->bAlternateSetting ); + DPRINT1(" Index %lu Interface %p\n", SubIndex, FunctionDescriptor[Index].InterfaceDescriptorList[SubIndex]); + DPRINT1(" Index %lu Interface InterfaceNumber %x\n", SubIndex, FunctionDescriptor[Index].InterfaceDescriptorList[SubIndex]->bInterfaceNumber); + DPRINT1(" Index %lu Interface Alternate %x\n", SubIndex, FunctionDescriptor[Index].InterfaceDescriptorList[SubIndex]->bAlternateSetting ); + DPRINT1(" Index %lu bLength %x\n", SubIndex, FunctionDescriptor[Index].InterfaceDescriptorList[SubIndex]->bLength); + DPRINT1(" Index %lu bDescriptorType %x\n", SubIndex, FunctionDescriptor[Index].InterfaceDescriptorList[SubIndex]->bDescriptorType); + DPRINT1(" Index %lu bInterfaceNumber %x\n", SubIndex, FunctionDescriptor[Index].InterfaceDescriptorList[SubIndex]->bInterfaceNumber); + DPRINT1(" Index %lu bAlternateSetting %x\n", SubIndex, FunctionDescriptor[Index].InterfaceDescriptorList[SubIndex]->bAlternateSetting); + DPRINT1(" Index %lu bNumEndpoints %x\n", SubIndex, FunctionDescriptor[Index].InterfaceDescriptorList[SubIndex]->bNumEndpoints); + DPRINT1(" Index %lu bInterfaceClass %x\n", SubIndex, FunctionDescriptor[Index].InterfaceDescriptorList[SubIndex]->bInterfaceClass); + DPRINT1(" Index %lu bInterfaceSubClass %x\n", SubIndex, FunctionDescriptor[Index].InterfaceDescriptorList[SubIndex]->bInterfaceSubClass); + DPRINT1(" Index %lu bInterfaceProtocol %x\n", SubIndex, FunctionDescriptor[Index].InterfaceDescriptorList[SubIndex]->bInterfaceProtocol); + DPRINT1(" Index %lu iInterface %x\n", SubIndex, FunctionDescriptor[Index].InterfaceDescriptorList[SubIndex]->iInterface); } } - } \ No newline at end of file diff --git a/reactos/drivers/usb/usbccgp/pdo.c b/reactos/drivers/usb/usbccgp/pdo.c index 260dfacb108..e7a52b8a1ac 100644 --- a/reactos/drivers/usb/usbccgp/pdo.c +++ b/reactos/drivers/usb/usbccgp/pdo.c @@ -163,7 +163,7 @@ USBCCGP_PdoAppendInterfaceNumber( while(*DeviceId) { - StringLength = swprintf(String, L"%s&MI_%02x", DeviceId) + 1; + StringLength = swprintf(String, L"%s&MI_%02x", DeviceId, InterfaceNumber) + 1; Length = wcslen(DeviceId) + 1; DPRINT("String %p\n", String);