mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 15:23:03 +00:00
[USBCCGP]
- Implement support for getting string descriptors (may need more work) - USB mass storage devices which are part of a composite device now initialize svn path=/trunk/; revision=55976
This commit is contained in:
parent
3e4f41c5e9
commit
297eb4a462
1 changed files with 34 additions and 0 deletions
|
@ -976,6 +976,40 @@ PDO_HandleInternalDeviceControl(
|
||||||
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
else if (Urb->UrbControlDescriptorRequest.DescriptorType == USB_STRING_DESCRIPTOR_TYPE)
|
||||||
|
{
|
||||||
|
PUSB_STRING_DESCRIPTOR StringDescriptor;
|
||||||
|
|
||||||
|
//
|
||||||
|
// get the requested string descriptor
|
||||||
|
//
|
||||||
|
ASSERT(Urb->UrbControlDescriptorRequest.TransferBuffer);
|
||||||
|
Status = USBCCGP_GetDescriptor(PDODeviceExtension->FDODeviceExtension->NextDeviceObject,
|
||||||
|
USB_STRING_DESCRIPTOR_TYPE,
|
||||||
|
Urb->UrbControlDescriptorRequest.TransferBufferLength,
|
||||||
|
Urb->UrbControlDescriptorRequest.Index,
|
||||||
|
Urb->UrbControlDescriptorRequest.LanguageId,
|
||||||
|
(PVOID*)&StringDescriptor);
|
||||||
|
if (NT_SUCCESS(Status))
|
||||||
|
{
|
||||||
|
if (StringDescriptor->bLength == 2)
|
||||||
|
{
|
||||||
|
FreeItem(StringDescriptor);
|
||||||
|
Status = STATUS_DEVICE_DATA_ERROR;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
RtlCopyMemory(Urb->UrbControlDescriptorRequest.TransferBuffer,
|
||||||
|
StringDescriptor->bString,
|
||||||
|
StringDescriptor->bLength + sizeof(WCHAR));
|
||||||
|
FreeItem(StringDescriptor);
|
||||||
|
Status = STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Irp->IoStatus.Status = Status;
|
||||||
|
IoCompleteRequest(Irp, IO_NO_INCREMENT);
|
||||||
|
return Status;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue