USB GetDescriptor(Configuration) Error?
- From: Jason Tost <jason-nospam32@xxxxxxxxxxx>
- Date: Thu, 04 May 2006 18:26:28 -0600
Good evening all,
Is there a reason that issuing a URB to retrieve the full configuration descriptor while handling the IRP_MN_START_DEVICE request would change the rules by which the data is received from my device?
Setup:
maximum packet size: 8 bytes
full config length : 32 bytes
When retrieving configuration descriptor initially, the host does receive the entire transfer, including a zero length packet as required by the USB protocol due to packet alignment. When I issue the request for the config descriptor in my IRP_MN_START_DEVICE handler the host receives the four data packets, but does not wait for the zero length packet before trying to send the status packet, and of course times out because of ACKs received from my device as it tries to send the last zero length packet. Abbreviate code producing the erroneous GetDescriptor(Configuration) request:
<code>
USB_CONFIGURATION_DESCRIPTOR tcd;
UsbBuildGetDescriptorRequest(&urb,
sizeof(_URB_CONTROL_DESCRIPTOR_REQUEST),
USB_CONFIGURATION_DESCRIPTOR_TYPE,
0, 0, &tcd, NULL, sizeof(tcd), NULL);
status = SendAwaitUrb(fdo, &urb); // <== This one works fine
if (NT_SUCCESS(status)) {
ULONG size = tcd.wTotalLength;
PUSB_CONFIGURATION_DESCRIPTOR pcd =
(PUSB_CONFIGURATION_DESCRIPTOR)
ExAllocatePool(NonPagedPool, size);
UsbBuildGetDescriptorRequest(&urb,
sizeof(_URB_CONTROL_DESCRIPTOR_REQUEST),
USB_CONFIGURATION_DESCRIPTOR_TYPE,
0, 0, pcd, NULL, size, NULL);
status = SendAwaitUrb(fdo, &urb); // <== Times out here
}
</code>
Host platform: Windows XP Pro SP2
DDK version : DDK 3790
Thanks for any help, everyone...
Jason
.
- Follow-Ups:
- Re: USB GetDescriptor(Configuration) Error?
- From: Tim Roberts
- Re: USB GetDescriptor(Configuration) Error?
- Prev by Date: Re: AllocateCommonBuffer small buffer
- Next by Date: Re: System Hang
- Previous by thread: Re: AllocateCommonBuffer small buffer
- Next by thread: Re: USB GetDescriptor(Configuration) Error?
- Index(es):
Relevant Pages
|