Author: janderwald
Date: Mon Jan 23 23:41:40 2012
New Revision: 55135
URL:
http://svn.reactos.org/svn/reactos?rev=55135&view=rev
Log:
[USBHUB]
- Add more checks for detecting composite device
Modified:
branches/usb-bringup-trunk/drivers/usb/usbhub_new/fdo.c
Modified: branches/usb-bringup-trunk/drivers/usb/usbhub_new/fdo.c
URL:
http://svn.reactos.org/svn/reactos/branches/usb-bringup-trunk/drivers/usb/u…
==============================================================================
--- branches/usb-bringup-trunk/drivers/usb/usbhub_new/fdo.c [iso-8859-1] (original)
+++ branches/usb-bringup-trunk/drivers/usb/usbhub_new/fdo.c [iso-8859-1] Mon Jan 23
23:41:40 2012
@@ -806,8 +806,25 @@
ULONG
IsCompositeDevice(
- PUSB_DEVICE_DESCRIPTOR DeviceDescriptor)
+ IN PUSB_DEVICE_DESCRIPTOR DeviceDescriptor,
+ IN PUSB_CONFIGURATION_DESCRIPTOR ConfigurationDescriptor)
{
+ if (DeviceDescriptor->bNumConfigurations != 1)
+ {
+ //
+ // composite device must have only one configuration
+ //
+ return FALSE;
+ }
+
+ if (ConfigurationDescriptor->bNumInterfaces < 2)
+ {
+ //
+ // composite device must have multiple interfaces
+ //
+ return FALSE;
+ }
+
if (DeviceDescriptor->bDeviceClass == 0)
{
//
@@ -877,7 +894,7 @@
//
// Construct the CompatibleIds
//
- if (IsCompositeDevice(DeviceDescriptor))
+ if (IsCompositeDevice(DeviceDescriptor, UsbChildExtension->FullConfigDesc))
{
Index += swprintf(&BufferPtr[Index],
L"USB\\DevClass_%02x&SubClass_%02x&Prot_%02x",