USB 2.0 device on USB 3.0 host

I have USB 2.0 device, which properly works with all USB 2.0 hosts, but doesn’t work with new USB 3.0 controllers. Device has one Configuration Descriptor-> one interface-> four Alternate Settings (different endpoints configurations). With USB 3.0 host i can set Alternative Settings #0 and #1, but if I am setting #2 or #3, my driver(OS Wondows 7 x32) returns with error code 0x57(ERROR_INVALID_PARAMETER). In USB 2.0 specification I didn’t find limitation to number of Alternate Settings to one Interface. Is it bug in USB 3.0 stack on Window 7 or there is limitations?

Microsoft didn’t write that USB 3 stack, go ask whomever created and shipped the drivers

d

debt from my phone

-----Original Message-----
From: xxxxx@softhard.sk
Sent: Tuesday, June 14, 2011 7:47 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] USB 2.0 device on USB 3.0 host

I have USB 2.0 device, which properly works with all USB 2.0 hosts, but doesn’t work with new USB 3.0 controllers. Device has one Configuration Descriptor-> one interface-> four Alternate Settings (different endpoints configurations). With USB 3.0 host i can set Alternative Settings #0 and #1, but if I am setting #2 or #3, my driver(OS Wondows 7 x32) returns with error code 0x57(ERROR_INVALID_PARAMETER). In USB 2.0 specification I didn’t find limitation to number of Alternate Settings to one Interface. Is it bug in USB 3.0 stack on Window 7 or there is limitations?


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

(Editorial note – it turns out to be problematic for you to have the
username “login”. When I reply to a list message, my mailer puts
“xxxxx@softhard.sk wrote:” as the first line, and the mailing list
software thinks that is a command to the mailing list software and
rejects the message…)

xxxxx@softhard.sk wrote:

I have USB 2.0 device, which properly works with all USB 2.0 hosts, but doesn’t work with new USB 3.0 controllers.

Me, too.

Device has one Configuration Descriptor-> one interface-> four Alternate Settings (different endpoints configurations). With USB 3.0 host i can set Alternative Settings #0 and #1, but if I am setting #2 or #3, my driver(OS Wondows 7 x32) returns with error code 0x57(ERROR_INVALID_PARAMETER).

Can you post your descriptors?

In USB 2.0 specification I didn’t find limitation to number of Alternate Settings to one Interface.

There is no limit, other than that the alternate setting number field is
only 8 bits.

Is it bug in USB 3.0 stack on Window 7 or there is limitations?

There is no USB 3.0 stack in Windows 7. That’s part of the problem. If
you have a USB 3 host controller, then you are using a driver stack
provided by the vendor. Apparently, many of the vendors are making up
their own rules.

Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.

Post the entire Configuration Descriptor. Unlike the previous USB 1.0 and 2.0 controllers (UHCI, OHCI, EHCI) the XHCI USB 3.0 controllers handle a lot of the complexity of configuring endpoints in the host controller itself, beyond the complete control of the host controller driver.

When the XHCI host controller executes the Configure Endpoint Command the host controller may fail the command with a Paramater Error result if there is something about the endpoint parameters that the host controller does not like. A host controller implementation may have parameter validation logic that does not exactly match that of the exisiting Windows USB 1.0 and 2.0 host controller drivers. That would not be surprising since you won’t find an exhaustive description of the Windows host controller driver validation logic documented anywhere.

For example I have seen a device from a very very large consumer electronics company with a high-speed device Configuration Descriptor with wMaxPacketSize values of 64 bytes for Bulk IN and Bulk OUT endpoints. That is a violation of the USB 2.0 specifcation section 5.8.3 Bulk Transfer Packet Size Constraints. It just so happens that the existing Windows 2.0 host controller drivers do not fail a SELECT_CONFIGURATION request in this case and the device happily works, although it really should not. However I have seen at least one XHCI controller that will fail a Configure Endpoint Command for this device with a Parameter Error result. This XHCI controller appears to be more strict in parameter validation, which would seem to be a good thing to do, but at the cost of compatibility with existing somewhat broken device which may have shipped in large numbers.

-Glen