Author: cgutman
Date: Sat Mar 3 21:23:04 2012
New Revision: 55976
URL:
http://svn.reactos.org/svn/reactos?rev=55976&view=rev
Log:
[USBCCGP]
- Implement support for getting string descriptors (may need more work)
- USB mass storage devices which are part of a composite device now initialize
Modified:
trunk/reactos/drivers/usb/usbccgp/pdo.c
Modified: trunk/reactos/drivers/usb/usbccgp/pdo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/usb/usbccgp/pdo.c?…
==============================================================================
--- trunk/reactos/drivers/usb/usbccgp/pdo.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/usb/usbccgp/pdo.c [iso-8859-1] Sat Mar 3 21:23:04 2012
@@ -976,6 +976,40 @@
IoCompleteRequest(Irp, IO_NO_INCREMENT);
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
{