mirror of
https://github.com/reactos/reactos.git
synced 2025-06-20 00:15:19 +00:00
[HIDUSB]
- Add check if interface descriptor was parsed - Correct error message - Set device idle after a configuration has been selected - CORE-6574 svn path=/trunk/; revision=57805
This commit is contained in:
parent
874a4d7f8b
commit
fae75d1fc7
1 changed files with 26 additions and 19 deletions
|
@ -1168,6 +1168,13 @@ Hid_SelectConfiguration(
|
||||||
USB_DEVICE_CLASS_HUMAN_INTERFACE,
|
USB_DEVICE_CLASS_HUMAN_INTERFACE,
|
||||||
-1,
|
-1,
|
||||||
-1);
|
-1);
|
||||||
|
if (!InterfaceDescriptor)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
// bogus configuration descriptor
|
||||||
|
//
|
||||||
|
return STATUS_INVALID_PARAMETER;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// sanity check
|
// sanity check
|
||||||
|
@ -1472,7 +1479,7 @@ Hid_PnpStart(
|
||||||
//
|
//
|
||||||
// no interface class
|
// no interface class
|
||||||
//
|
//
|
||||||
DPRINT1("[HIDUSB] HID Class found\n");
|
DPRINT1("[HIDUSB] HID Interface descriptor not found\n");
|
||||||
return STATUS_UNSUCCESSFUL;
|
return STATUS_UNSUCCESSFUL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1483,11 +1490,6 @@ Hid_PnpStart(
|
||||||
ASSERT(InterfaceDescriptor->bDescriptorType == USB_INTERFACE_DESCRIPTOR_TYPE);
|
ASSERT(InterfaceDescriptor->bDescriptorType == USB_INTERFACE_DESCRIPTOR_TYPE);
|
||||||
ASSERT(InterfaceDescriptor->bLength == sizeof(USB_INTERFACE_DESCRIPTOR));
|
ASSERT(InterfaceDescriptor->bLength == sizeof(USB_INTERFACE_DESCRIPTOR));
|
||||||
|
|
||||||
//
|
|
||||||
// now set the device idle
|
|
||||||
//
|
|
||||||
Hid_SetIdle(DeviceObject);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// move to next descriptor
|
// move to next descriptor
|
||||||
//
|
//
|
||||||
|
@ -1512,10 +1514,15 @@ Hid_PnpStart(
|
||||||
//
|
//
|
||||||
// done
|
// done
|
||||||
//
|
//
|
||||||
DPRINT("[HIDUSB] SelectConfiguration %x\n", Status);
|
DPRINT1("[HIDUSB] SelectConfiguration %x\n", Status);
|
||||||
|
|
||||||
if (NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
|
//
|
||||||
|
// now set the device idle
|
||||||
|
//
|
||||||
|
Hid_SetIdle(DeviceObject);
|
||||||
|
|
||||||
//
|
//
|
||||||
// get protocol
|
// get protocol
|
||||||
//
|
//
|
||||||
|
@ -1523,18 +1530,18 @@ Hid_PnpStart(
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
//
|
{
|
||||||
// FIXME parse hid descriptor
|
//
|
||||||
//
|
// FIXME parse hid descriptor
|
||||||
UNIMPLEMENTED
|
// select configuration
|
||||||
ASSERT(FALSE);
|
// set idle
|
||||||
|
// and get protocol
|
||||||
//
|
//
|
||||||
// get protocol
|
UNIMPLEMENTED
|
||||||
//
|
ASSERT(FALSE);
|
||||||
Hid_GetProtocol(DeviceObject);
|
}
|
||||||
return STATUS_SUCCESS;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue