I am on a Windows 7 x64 box.
I am enumerating USB HostControllers, Hubs And Devices.
My Machine Has 6 Universal Host Controllers and 2 Enhanced Host Controllers.
One of the Enhanced Host Controllers (Intel(R) ICH10 Family USB Enhanced Host Controller)
has a Root Hub With 6 Ports and attached To Port 3 Is An External Hub With 4 Ports.
None of the other Host Controllers have External Hubs
When It comes to the Port that the External Hub is on:
(I am positive my USB_DESCRIPTOR_REQUEST (DescriptorRequest) is set up properly before calling):
About one out of every 10 times I make this call (A complete re-enumuration) for the Port with the External Hub attached
it fails with GetLastError()==31 (ERROR_GEN_FAILURE)
I am in a loop as follows:
When DeviceIoControl() fails it will fail all 20 times.
If I am in the debugger and have a break point set on Attempts++
1.) When I hit the break point and 'F5' the DeviceIoControl() still fails.
2.) When I Hit The break point and step over the break point and the Sleep(1000)
the DeviceIoControl() will then succeed!
This same code is called for all Root Hub Ports.
The only time it fails is on the Port with the External Hub.