mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 05:55:48 +00:00
[USBHUB]
- Add more checks for detecting composite device svn path=/branches/usb-bringup-trunk/; revision=55135
This commit is contained in:
parent
e62233a8e7
commit
3b70f619c8
1 changed files with 19 additions and 2 deletions
|
@ -806,8 +806,25 @@ GetUsbStringDescriptor(
|
||||||
|
|
||||||
ULONG
|
ULONG
|
||||||
IsCompositeDevice(
|
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)
|
if (DeviceDescriptor->bDeviceClass == 0)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
|
@ -877,7 +894,7 @@ CreateDeviceIds(
|
||||||
//
|
//
|
||||||
// Construct the CompatibleIds
|
// Construct the CompatibleIds
|
||||||
//
|
//
|
||||||
if (IsCompositeDevice(DeviceDescriptor))
|
if (IsCompositeDevice(DeviceDescriptor, UsbChildExtension->FullConfigDesc))
|
||||||
{
|
{
|
||||||
Index += swprintf(&BufferPtr[Index],
|
Index += swprintf(&BufferPtr[Index],
|
||||||
L"USB\\DevClass_%02x&SubClass_%02x&Prot_%02x",
|
L"USB\\DevClass_%02x&SubClass_%02x&Prot_%02x",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue