USB GetDescriptor(Configuration) Error?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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
.



Relevant Pages

  • Re: MV-database independence & PHP
    ... packet file into the request queue, ... File polling means that load balancing can be achieved by multiple DBs, ... A FIFO tree is established in the local FHS: ...
    (comp.databases.pick)
  • Re: remote port unlocker - does such a thing exist??
    ... authentication processes are performed on an arbitrary packet. ... UDP or any other protocol can be used to deliver the request. ... HolePunch should prevent flaws that cannot be easily audited in many ...
    (comp.security.firewalls)
  • Re: NadaNet for the //c - just an idea
    ... chip/etc before/after each packet to be sent/received? ... control over write protect with the drive still running, ... properly *throughout* a whole request. ... able to write to the net to assert its lock). ...
    (comp.sys.apple2)
  • (was: Re:...) [PATCH 12/12] ide-floppy: fix most of the remaining checkpatch.pl issues-v2
    ... + * After each failed packet command we issue a request sense command and retry ... int progress_indication; ... * Used to finish servicing a request. ... The following delay solves a problem with ATAPI Zip 100 drives ...
    (Linux-Kernel)
  • [PATCH 12/12] ide-floppy: fix most of the remaining checkpatch.pl issues
    ... + * After each failed packet command we issue a request sense command and retry ... int progress_indication; ... * Used to finish servicing a request. ... The following delay solves a problem with ATAPI Zip 100 drives ...
    (Linux-Kernel)