USB 3.0 Driver issue

I have an existing USB 2 UMDF driver package that supports multiple devices. This has been in the field and working for several years. It uses the v1009 Wudf and WinUsb coinstallers.

We are now adding a new device to the supported list, but this device is a USB 3 device.
We have modified the inf to add support for the new device and rebuilt and signed the updated package.

When we connect the USB 3.0 device to a USB 2.0 port it enumerates properly and we can access it, but when we connect it to a USB 3.0 port it fails to enumerate and gives the following error in the Device Manager:

Windows has stopped this device because it has reported problems. (Code 43)
The USB device returned an invalid USB configuration descriptor.

Here is the USB descriptor structures that I use as part of the Cypress FX3 dev system for the device (I have obscured the VID and PID values for security reasons, but the VID is registered and is used by the other devices in the package).:

/*
/* Standard device descriptor for USB 3.0 */
const uint8_t CyFxUSB30DeviceDscr attribute ((aligned (32))) =
{
0x12, /* Descriptor size */
CY_U3P_USB_DEVICE_DESCR, /* Device descriptor type (0x01) */
0x00,0x03, /* USB 3.0 */
0x00, /* Device class */
0x00, /* Device sub-class */
0x00, /* Device protocol */
0x09, /* Maxpacket size for EP0 : 2^9 = 512 bytes */
/* Vendor ID /
, /
Product ID /
0x00,0x00, /
Device release number /
0x01, /
Manufacture string index /
0x02, /
Product string index /
0x00, /
Serial number string index /
0x01 /
Number of configurations /
};

/
Standard device descriptor for USB 2.0 /
const uint8_t CyFxUSB20DeviceDscr[] attribute ((aligned (32))) =
{
0x12, /
Descriptor size /
CY_U3P_USB_DEVICE_DESCR, /
Device descriptor type (0x01) /
0x10,0x02, /
USB 2.10 /
0x00, /
Device class /
0x00, /
Device sub-class /
0x00, /
Device protocol /
0x40, /
Maxpacket size for EP0 : 64 bytes /
, /
Vendor ID /
, /
Product ID /
0x00,0x00, /
Device release number /
0x01, /
Manufacture string index /
0x02, /
Product string index /
0x00, /
Serial number string index /
0x01 /
Number of configurations /
};

/
Binary device object store descriptor /
const uint8_t CyFxUSBBOSDscr[] attribute ((aligned (32))) =
{
0x05, /
Descriptor size /
CY_U3P_BOS_DESCR, /
Device descriptor type (0x0F) /
0x16,0x00, /
Length of this descriptor and all sub descriptors /
0x02, /
Number of device capability descriptors /

/
USB 2.0 extension /
0x07, /
Descriptor size /
CY_U3P_DEVICE_CAPB_DESCR, /
Device capability type descriptor (0x10) /
CY_U3P_USB2_EXTN_CAPB_TYPE, /
USB 2.0 extension capability type (0x02) /
0x02,0x00,0x00,0x00, /
Supported device level features: LPM support /

/
SuperSpeed device capability /
0x0A, /
Descriptor size /
CY_U3P_DEVICE_CAPB_DESCR, /
Device capability type descriptor (0x10) /
CY_U3P_SS_USB_CAPB_TYPE, /
SuperSpeed device capability type (0x03) /
0x00, /
Supported device level features /
0x0E,0x00, /
Speeds supported by the device : SS, HS and FS /
0x03, /
Functionality support /
0x0A, /
U1 Device Exit latency /
0xFF,0x07 /
U2 Device Exit latency /
};

/
Standard device qualifier descriptor /
const uint8_t CyFxUSBDeviceQualDscr[] attribute ((aligned (32))) =
{
0x0A, /
Descriptor size /
CY_U3P_USB_DEVQUAL_DESCR, /
Device qualifier descriptor type (0x06) /
0x00,0x02, /
USB 2.0 /
0x00, /
Device class /
0x00, /
Device sub-class /
0x00, /
Device protocol /
0x40, /
Maxpacket size for EP0 : 64 bytes /
0x01, /
Number of configurations /
0x00 /
Reserved /
};

/
Standard super speed configuration descriptor /
const uint8_t CyFxUSBSSConfigDscr[] attribute ((aligned (32))) =
{
/
Configuration descriptor /
0x09, /
Descriptor size /
CY_U3P_USB_CONFIG_DESCR, /
Configuration descriptor type (0x02) /
// 0x2C,0x00, /
Length of this descriptor and all sub descriptors /
0x53,0x00, /
Length of this descriptor and all sub descriptors /
0x01, /
Number of interfaces /
0x01, /
Configuration number /
0x00, /
Configuration string index /
0x80, /
Config characteristics - Bus powered /
0x32, /
Max power consumption of device (in 8mA unit) : 400mA /

/
Interface descriptor /
0x09, /
Descriptor size /
CY_U3P_USB_INTRFC_DESCR, /
Interface Descriptor type (0x04) /
0x00, /
Interface number /
0x00, /
Alternate setting number /
// 0x02, /
Number of end points /
0x05, /
Number of end points /
0xFF, /
Interface class /
0x00, /
Interface sub class /
0x00, /
Interface protocol code /
0x00, /
Interface descriptor string index /

// These are the “original” descriptors for SuperSpeed for the example program
// /
Endpoint descriptor for producer EP /
// 0x07, /
Descriptor size /
// CY_U3P_USB_ENDPNT_DESCR, /
Endpoint descriptor type /
// CY_FX_DEBUG_PRODUCER, /
Endpoint address and description /
// CY_U3P_USB_EP_BULK, /
Bulk endpoint type /
// 0x00,0x04, /
Max packet size = 1024 bytes /
// 0x00, /
Servicing interval for data transfers : 0 for bulk /
//
// /
Super speed endpoint companion descriptor for producer EP /
// 0x06, /
Descriptor size /
// CY_U3P_SS_EP_COMPN_DESCR, /
SS endpoint companion descriptor type /
// (CY_FX_EP_BURST_LENGTH - 1), /
Max no. of packets in a burst(0-15) - 0: burst 1 packet at a time /
// 0x00, /
Max streams for bulk EP = 0 (No streams) /
// 0x00,0x00, /
Service interval for the EP : 0 for bulk /
//
// /
Endpoint descriptor for consumer EP /
// 0x07, /
Descriptor size /
// CY_U3P_USB_ENDPNT_DESCR, /
Endpoint descriptor type /
// CY_FX_DEBUG_CONSUMER, /
Endpoint address and description /
// CY_U3P_USB_EP_BULK, /
Bulk endpoint type /
// 0x00,0x04, /
Max packet size = 1024 bytes /
// 0x00, /
Servicing interval for data transfers : 0 for Bulk /
//
// /
Super speed endpoint companion descriptor for consumer EP /
// 0x06, /
Descriptor size /
// CY_U3P_SS_EP_COMPN_DESCR, /
SS endpoint companion descriptor type /
// (CY_FX_EP_BURST_LENGTH - 1), /
Max no. of packets in a burst(0-15) - 0: burst 1 packet at a time /
// 0x00, /
Max streams for bulk EP = 0 (No streams) /
// 0x00,0x00 /
Service interval for the EP : 0 for bulk /

// /
Endpoint descriptor for producer EP /
// 0x07, /
Descriptor size /
// CY_U3P_USB_ENDPNT_DESCR, /
Endpoint descriptor type /
// CY_FX_DEBUG_CONSUMER, /
Endpoint address and description /
// CY_U3P_USB_EP_BULK, /
Bulk endpoint type /
// 0x00,0x02, /
Max packet size = 512 bytes /
// 0x00, /
Servicing interval for data transfers : 0 for bulk /

/
Endpoint descriptor for Debug Consumer EP /
0x07, /
Descriptor size /
CY_U3P_USB_ENDPNT_DESCR, /
Endpoint descriptor type (0x05) /
CY_FX_DEBUG_CONSUMER, /
Consumes debug (0x81) /
CY_U3P_USB_EP_BULK, /
Bulk endpoint type (0x02) /
// 0x00,0x04, /
Max packet size = 1024 bytes /
0x00,0x02, /
Max packet size = 512 bytes /
0x00, /
Servicing interval for data transfers : 0 for bulk /

/
Super speed endpoint companion descriptor for Debug Consumer EP /
0x06, /
Descriptor size /
CY_U3P_SS_EP_COMPN_DESCR, /
SS endpoint companion descriptor type (0x30) /
(CY_FX_EP_BURST_LENGTH - 1), /
Max no. of packets in a burst(0-15) - 0: burst 1 packet at a time (0x03) /
0x00, /
Max streams for bulk EP = 0 (No streams) /
0x00,0x00, /
Service interval for the EP : 0 for bulk /

// /
Endpoint descriptor for consumer EP /
// 0x07, /
Descriptor size /
// CY_U3P_USB_ENDPNT_DESCR, /
Endpoint descriptor type /
// CY_FX_DEBUG_PRODUCER, /
Endpoint address and description /
// CY_U3P_USB_EP_BULK, /
Bulk endpoint type /
// 0x00,0x02, /
Max packet size = 512 bytes /
// 0x00, /
Servicing interval for data transfers : 0 for bulk /

/
Endpoint descriptor for Debug Producer EP /
0x07, /
Descriptor size /
CY_U3P_USB_ENDPNT_DESCR, /
Endpoint descriptor type (0x05) /
CY_FX_DEBUG_PRODUCER, /
Produces debug (0x01) /
CY_U3P_USB_EP_BULK, /
Bulk endpoint type (0x02) /
// 0x00,0x04, /
Max packet size = 1024 bytes /
0x00,0x02, /
Max packet size = 512 bytes /
0x00, /
Servicing interval for data transfers : 0 for bulk /

/
Super speed endpoint companion descriptor for Debug Producer EP /
0x06, /
Descriptor size /
CY_U3P_SS_EP_COMPN_DESCR, /
SS endpoint companion descriptor type (0x30) /
(CY_FX_EP_BURST_LENGTH - 1), /
Max no. of packets in a burst(0-15) - 0: burst 1 packet at a time (0x03) /
0x00, /
Max streams for bulk EP = 0 (No streams) /
0x00,0x00, /
Service interval for the EP : 0 for bulk /

// /
Endpoint descriptor for producer EP /
// 0x07, /
Descriptor size /
// CY_U3P_USB_ENDPNT_DESCR, /
Endpoint descriptor type /
// XI_API_CONSUMER, /
Responses back to Plugin/DLL /
// CY_U3P_USB_EP_BULK, /
Bulk endpoint type /
// 0x00,0x02, /
Max packet size = 512 bytes /
// 0x00, /
Servicing interval for data transfers : 0 for bulk /

/
Endpoint descriptor for API Consumer EP /
0x07, /
Descriptor size /
CY_U3P_USB_ENDPNT_DESCR, /
Endpoint descriptor type (0x05) /
XI_API_CONSUMER, /
Responses back to Plugin/DLL (0x82) /
CY_U3P_USB_EP_BULK, /
Bulk endpoint type (0x02) /
// 0x00,0x04, /
Max packet size = 1024 bytes /
0x00,0x02, /
Max packet size = 512 bytes /
0x00, /
Servicing interval for data transfers : 0 for bulk /

/
Super speed endpoint companion descriptor for API Consumer EP /
0x06, /
Descriptor size /
CY_U3P_SS_EP_COMPN_DESCR, /
SS endpoint companion descriptor type (0x30) /
(CY_FX_EP_BURST_LENGTH - 1), /
Max no. of packets in a burst(0-15) - 0: burst 1 packet at a time (0x03) /
0x00, /
Max streams for bulk EP = 0 (No streams) /
0x00,0x00, /
Service interval for the EP : 0 for bulk /

// /
Endpoint descriptor for consumer EP /
// 0x07, /
Descriptor size /
// CY_U3P_USB_ENDPNT_DESCR, /
Endpoint descriptor type /
// XI_API_PRODUCER, /
Commands FROM the Plugin/DLL /
// CY_U3P_USB_EP_BULK, /
Bulk endpoint type /
// 0x00,0x02, /
Max packet size = 512 bytes /
// 0x00, /
Servicing interval for data transfers : 0 for bulk /

/
Endpoint descriptor for API Producer EP /
0x07, /
Descriptor size /
CY_U3P_USB_ENDPNT_DESCR, /
Endpoint descriptor type (0x05) /
XI_API_PRODUCER, /
Commands FROM the Plugin/DLL (0x04) /
CY_U3P_USB_EP_BULK, /
Bulk endpoint type (0x02) /
// 0x00,0x04, /
Max packet size = 1024 bytes /
0x00,0x02, /
Max packet size = 512 bytes /
0x00, /
Servicing interval for data transfers : 0 for bulk /

/
Super speed endpoint companion descriptor for API Producer EP /
0x06, /
Descriptor size /
CY_U3P_SS_EP_COMPN_DESCR, /
SS endpoint companion descriptor type (0x30) /
(CY_FX_EP_BURST_LENGTH - 1), /
Max no. of packets in a burst(0-15) - 0: burst 1 packet at a time (0x03) /
0x00, /
Max streams for bulk EP = 0 (No streams) /
0x00,0x00, /
Service interval for the EP : 0 for bulk /

// /
Endpoint descriptor for consumer EP /
// 0x07, /
Descriptor size /
// CY_U3P_USB_ENDPNT_DESCR, /
Endpoint descriptor type /
// XI_VID_PRODUCER, /
Video data from the Plugin/DLL /
// CY_U3P_USB_EP_BULK, /
Bulk endpoint type /
// 0x00,0x02, /
Max packet size = 512 bytes /
// 0x00, /
Servicing interval for data transfers : 0 for bulk /

/
Endpoint descriptor for Video Producer EP /
0x07, /
Descriptor size /
CY_U3P_USB_ENDPNT_DESCR, /
Endpoint descriptor type (0x05) /
XI_VID_PRODUCER, /
Video data from the Plugin/DLL (0x06) /
CY_U3P_USB_EP_BULK, /
Bulk endpoint type (0x02) /
// 0x00,0x04, /
Max packet size = 1024 bytes /
0x00,0x02, /
Max packet size = 512 bytes /
0x00, /
Servicing interval for data transfers : 0 for bulk /

/
Super speed endpoint companion descriptor for Video Producer EP /
0x06, /
Descriptor size /
CY_U3P_SS_EP_COMPN_DESCR, /
SS endpoint companion descriptor type (0x30) /
(CY_FX_EP_BURST_LENGTH - 1), /
Max no. of packets in a burst(0-15) - 0: burst 1 packet at a time (0x03) /
0x00, /
Max streams for bulk EP = 0 (No streams) /
0x00,0x00, /
Service interval for the EP : 0 for bulk /

};

/
Standard high speed configuration descriptor /
const uint8_t CyFxUSBHSConfigDscr[] attribute ((aligned (32))) =
{
/
Configuration descriptor /
0x09, /
Descriptor size /
CY_U3P_USB_CONFIG_DESCR, /
Configuration descriptor type (0x02) /
0x35,0x00, /
Length of this descriptor and all sub descriptors /
// 0x27,0x00, /
Length of this descriptor and all sub descriptors /
0x01, /
Number of interfaces /
0x01, /
Configuration number /
0x00, /
COnfiguration string index /
0x80, /
Config characteristics - bus powered /
0x32, /
Max power consumption of device (in 2mA unit) : 100mA /

/
Interface descriptor /
0x09, /
Descriptor size /
CY_U3P_USB_INTRFC_DESCR, /
Interface Descriptor type (0x04) /
0x00, /
Interface number /
0x00, /
Alternate setting number /
0x05, /
Number of endpoints /
// 0x03, /
Number of endpoints /
0xFF, /
Interface class /
0x00, /
Interface sub class /
0x00, /
Interface protocol code /
0x00, /
Interface descriptor string index /

/
Endpoint descriptor for producer EP /
0x07, /
Descriptor size /
CY_U3P_USB_ENDPNT_DESCR, /
Endpoint descriptor type (0x05) /
CY_FX_DEBUG_CONSUMER, /
Consumes debug (0x81) /
CY_U3P_USB_EP_BULK, /
Bulk endpoint type (0x02) /
0x00,0x02, /
Max packet size = 512 bytes /
0x00, /
Servicing interval for data transfers : 0 for bulk /

/
Endpoint descriptor for consumer EP /
0x07, /
Descriptor size /
CY_U3P_USB_ENDPNT_DESCR, /
Endpoint descriptor type (0x05) /
CY_FX_DEBUG_PRODUCER, /
Produces debug (0x01) /
CY_U3P_USB_EP_BULK, /
Bulk endpoint type (0x02) /
0x00,0x02, /
Max packet size = 512 bytes /
0x00, /
Servicing interval for data transfers : 0 for bulk /

/
Endpoint descriptor for producer EP /
0x07, /
Descriptor size /
CY_U3P_USB_ENDPNT_DESCR, /
Endpoint descriptor type (0x05) /
XI_API_CONSUMER, /
Responses back to Plugin/DLL (0x82) /
CY_U3P_USB_EP_BULK, /
Bulk endpoint type (0x02) /
0x00,0x02, /
Max packet size = 512 bytes /
0x00, /
Servicing interval for data transfers : 0 for bulk /

/
Endpoint descriptor for consumer EP /
0x07, /
Descriptor size /
CY_U3P_USB_ENDPNT_DESCR, /
Endpoint descriptor type (0x05) /
XI_API_PRODUCER, /
Commands FROM the Plugin/DLL (0x04) /
CY_U3P_USB_EP_BULK, /
Bulk endpoint type (0x02) /
0x00,0x02, /
Max packet size = 512 bytes /
0x00, /
Servicing interval for data transfers : 0 for bulk /

/
Endpoint descriptor for consumer EP /
0x07, /
Descriptor size /
CY_U3P_USB_ENDPNT_DESCR, /
Endpoint descriptor type (0x05) /
XI_VID_PRODUCER, /
Video data from the Plugin/DLL (0x06) /
CY_U3P_USB_EP_BULK, /
Bulk endpoint type (0x02) /
0x00,0x02, /
Max packet size = 512 bytes /
0x00, /
Servicing interval for data transfers : 0 for bulk /

};

/
Standard full speed configuration descriptor /
const uint8_t CyFxUSBFSConfigDscr[] attribute ((aligned (32))) =
{
/
Configuration descriptor /
0x09, /
Descriptor size /
CY_U3P_USB_CONFIG_DESCR, /
Configuration descriptor type (0x02) /
0x20,0x00, /
Length of this descriptor and all sub descriptors /
0x01, /
Number of interfaces /
0x01, /
Configuration number /
0x00, /
COnfiguration string index /
0x80, /
Config characteristics - bus powered /
0x32, /
Max power consumption of device (in 2mA unit) : 100mA /

/
Interface descriptor /
0x09, /
Descriptor size /
CY_U3P_USB_INTRFC_DESCR, /
Interface descriptor type (0x04) /
0x00, /
Interface number /
0x00, /
Alternate setting number /
0x02, /
Number of endpoints /
0xFF, /
Interface class /
0x00, /
Interface sub class /
0x00, /
Interface protocol code /
0x00, /
Interface descriptor string index /

/
Endpoint descriptor for consumer EP /
0x07, /
Descriptor size /
CY_U3P_USB_ENDPNT_DESCR, /
Endpoint descriptor type (0x05) /
CY_FX_DEBUG_CONSUMER, /
Endpoint address and description (0x81) /
CY_U3P_USB_EP_BULK, /
Bulk endpoint type (0x02) /
0x40,0x00, /
Max packet size = 64 bytes /
0x00, /
Servicing interval for data transfers : 0 for bulk /

/
Endpoint descriptor for producer EP /
0x07, /
Descriptor size /
CY_U3P_USB_ENDPNT_DESCR, /
Endpoint descriptor type (0x05) /
CY_FX_DEBUG_PRODUCER, /
Endpoint address and description (0x01) /
CY_U3P_USB_EP_BULK, /
Bulk endpoint type (0x02) /
0x40,0x00, /
Max packet size = 64 bytes /
0x00 /
Servicing interval for data transfers : 0 for bulk /
};

/
Standard language ID string descriptor /
const uint8_t CyFxUSBStringLangIDDscr[] attribute ((aligned (32))) =
{
0x04, /
Descriptor size /
CY_U3P_USB_STRING_DESCR, /
Device descriptor type /
0x09,0x04 /
Language ID supported /
};

/
Standard manufacturer string descriptor /
const uint8_t CyFxUSBManufactureDscr[] attribute ((aligned (32))) =
{
0x0E, /
Descriptor size /
CY_U3P_USB_STRING_DESCR, /
Device descriptor type /
‘X’,0x00,
‘i’,0x00,
‘t’,0x00,
‘r’,0x00,
‘o’,0x00,
‘n’,0x00
};

/
Standard product string descriptor /
const uint8_t CyFxUSBProductDscr[] attribute ((aligned (32))) =
{
0x18, /
Descriptor size /
CY_U3P_USB_STRING_DESCR, /
Device descriptor type /
‘U’,0x00,
‘S’,0x00,
‘B’,0x00,
’ ',0x00,
‘t’,0x00,
‘o’,0x00,
’ ',0x00,
‘S’,0x00,
‘C’,0x00,
‘S’,0x00,
‘I’,0x00
};

/
Microsoft OS Descriptor. /
const uint8_t CyFxUsbOSDscr[] attribute ((aligned (32))) =
{
0x3A,
CY_U3P_USB_STRING_DESCR,
‘X’, 0x00,
‘i’, 0x00,
‘t’, 0x00,
‘r’, 0x00,
‘o’, 0x00,
‘n’, 0x00,
’ ', 0x00,
‘U’, 0x00,
‘S’, 0x00,
‘B’, 0x00,
’ ', 0x00,
‘t’, 0x00,
‘o’, 0x00,
’ ', 0x00,
‘S’, 0x00,
‘C’, 0x00,
‘S’, 0x00,
‘I’, 0x00,
’ ', 0x00,
‘C’, 0x00,
‘o’, 0x00,
‘n’, 0x00,
‘v’, 0x00,
‘e’, 0x00,
‘r’, 0x00,
‘t’, 0x00,
‘e’, 0x00,
‘r’, 0x00
};

/
Place this buffer as the last buffer so that no other variable / code shares
* the same cache line. Do not add any other variables / arrays in this file.
* This will lead to variables sharing the same cache line. /
const uint8_t CyFxUsbDscrAlignBuffer[32] attribute ((aligned (32)));

-------------------------------------------

This is what the WDK 8.1 USBView utility reports for the device:

[Port16] FailedEnumeration : Unknown USB Device (Invalid Configuration Descriptor)

Is Port User Connectable: yes
Is Port Debug Capable: no
Companion Port Number: 1
Companion Hub Symbolic Link Name: USB#ROOT_HUB30#4&10962df6&0&0#{f18a0e88-c30c-11d0-8815-00a0c906bed8}
Protocols Supported:
USB 1.1: no
USB 2.0: no
USB 3.0: yes

—===>Device Information<===—
String Descriptor for index 2 not available while device is in low power state.

ConnectionStatus: FailedEnumeration
Current Config Value: 0x00 -> Device Bus Speed: Super
Device Address: 0x0A
Open Pipes: 0
!ERROR: No open pipes!

===>Device Descriptor<===
bLength: 0x12
bDescriptorType: 0x01
bcdUSB: 0x0300
bDeviceClass: 0x00
!*ERROR: Device enumeration failure

---------------------------------------------------

Can anyone suggest what, if anything, is wrong with the above descriptors for a USB 3 device (I have checked them against the USB 3.0 spec and cannot see any errors)?

If there is nothing wrong with the descriptors I can post the INF file I am using in case I need to make some changes in there.

Thanks,

Peter Young
Xitron Europe.

xxxxx@vgieurope.com wrote:

I have an existing USB 2 UMDF driver package that supports multiple devices. This has been in the field and working for several years. It uses the v1009 Wudf and WinUsb coinstallers.

We are now adding a new device to the supported list, but this device is a USB 3 device.
We have modified the inf to add support for the new device and rebuilt and signed the updated package.

When we connect the USB 3.0 device to a USB 2.0 port it enumerates properly and we can access it, but when we connect it to a USB 3.0 port it fails to enumerate and gives the following error in the Device Manager:

Windows has stopped this device because it has reported problems. (Code 43)
The USB device returned an invalid USB configuration descriptor.

Here is the USB descriptor structures that I use as part of the Cypress FX3 dev system for the device (I have obscured the VID and PID values for security reasons, but the VID is registered and is used by the other devices in the package).:

SuperSpeed bulk endpoints are required to have a max packet size of
1024. Yours are all set to 512. I wouldn’t expect that to cause an
enumeration failure, but maybe it does.


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

Tim,

Thanks for responding - my device now registers without error, but I have a couple of other issues that I need help with.

  1. A colleague has been working on the device firmware (which is downloaded to the device) and is using the Cypress FX3 dev tools. The device config strings are definitely included in the firmware and the code definitely loads them up on request, but usbview.exe says that it cannot find them.

  2. When I unplug/replug the device it alternates between registering as a USB 3.0 device and a USB 2.x device. In both cases it says it is running at High Speed.

Any suggestions as to why it is inconsistently registering, and any suggestions as to why it will not register as a USB 3.0 device running at USB 3.0 speeds?

My driver sits on top of WinUSB and I currently use the v01009 coinstallers.
My driver needs to support 32/64 bit back as far as Windows XP!

Do I need to upgrade to the v01011 coinstallers to get SuperSpeed?

Thanks.

Pete Y

For the config strings it could that the information is cached in the hub driver before your driver has updated the fw

Sent from my Windows 10 phone

From: xxxxx@vgieurope.commailto:xxxxx
Sent: Thursday, January 28, 2016 9:23 AM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: RE:[ntdev] USB 3.0 Driver issue

Tim,

Thanks for responding - my device now registers without error, but I have a couple of other issues that I need help with.

1. A colleague has been working on the device firmware (which is downloaded to the device) and is using the Cypress FX3 dev tools. The device config strings are definitely included in the firmware and the code definitely loads them up on request, but usbview.exe says that it cannot find them.

2. When I unplug/replug the device it alternates between registering as a USB 3.0 device and a USB 2.x device. In both cases it says it is running at High Speed.

Any suggestions as to why it is inconsistently registering, and any suggestions as to why it will not register as a USB 3.0 device running at USB 3.0 speeds?

My driver sits on top of WinUSB and I currently use the v01009 coinstallers.
My driver needs to support 32/64 bit back as far as Windows XP!

Do I need to upgrade to the v01011 coinstallers to get SuperSpeed?

Thanks.

Pete Y


NTDEV is sponsored by OSR

Visit the list online at: https:

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at https:

To unsubscribe, visit the List Server section of OSR Online at https:</https:></https:></https:></mailto:xxxxx></mailto:xxxxx>

xxxxx@vgieurope.com wrote:

  1. A colleague has been working on the device firmware (which is downloaded to the device) and is using the Cypress FX3 dev tools. The device config strings are definitely included in the firmware and the code definitely loads them up on request, but usbview.exe says that it cannot find them.

There was an undocumented restriction in the FX2 that all descriptors –
including string descriptors – had to start on an even address. I
don’t know whether that carried forward to the FX3, but it’s worth checking.

  1. When I unplug/replug the device it alternates between registering as a USB 3.0 device and a USB 2.x device. In both cases it says it is running at High Speed.

I haven’t had to wade through the FX3’s speed negotiation process. You
may need to get a hardware USB analyzer to capture the packets. Are you
testing on XP? If so, whose USB 3 driver stack are you using?
Microsoft didn’t provide one until Windows 8. If you’re testing on
Windows 7 or newer, you might find interesting tidbits in the USB event
tracking that is built in:

https://msdn.microsoft.com/en-us/library/windows/hardware/jj151577.aspx

Any suggestions as to why it is inconsistently registering, and any suggestions as to why it will not register as a USB 3.0 device running at USB 3.0 speeds?

The FX3 has different descriptor sets for the various speeds. Your dude
has double-checked that the speed-switching looks right?

My driver sits on top of WinUSB and I currently use the v01009 coinstallers.
My driver needs to support 32/64 bit back as far as Windows XP!
Do I need to upgrade to the v01011 coinstallers to get SuperSpeed?

No. What you’re talking about here happens long before the driver gets
loaded.


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

Tim,

Thanks again.

WRT the even-address alignment for string descriptors:
We are using the Cypress EZ USB Suite to generate the FX3 firmware and are using the
CyU3PUsbSetDesc() call to set all of our descriptors, so if there is an issue I would hope,
and expect, that Cypress have taken care of this for me, so I do not believe this to be the
problem.

WRT the dev platform:
I am working on Windows 8.1 so will investigate the information in the link you sent me to
see if that provides any additional information.

WRT FX3 descriptors:
I have checked the descriptor settings against what is in the USB 3.0 specification and cannot
see any additional errors to the one you pointed out before in response to my original post (SS
Bulk EP blocksize) which I have fixed up.

Some additional info.

I have downloaded the Microsoft Message Analyzer to try and see what is going wrong.
As you can see from the BOS descriptor info my bmAttributes field in the USB 2.0 Extension
Capability does not appear to match the value reported by the MMA.

[0] BOS_DESCR{bLen=5,bDescType=15,wTotLen=22,bNDevCaps=2}
Name Value Bit Offset Bit Length Type
bLength 5 0 8 Byte
bDescriptorType BOS(15) 8 8 Byte
wTotalLength 22 16 16 UInt16
bNumDeviceCaps 2 32 8 Byte

[1] USB_20_EXT_DESC{bLen=7,bType=16,bDevCapType=2,Rsvd2=32768,LpmSup=0,Rsvd1=0}
Name Value Bit Offset Bit Length Type
bLength 7 40 8 Byte
bDescriptorType DEVICE_CAPABILITY(16) 48 8 UsbDescriptorType
bDevCapabilityType USB_20_EXTENSION(2) 56 8 UsbDeviceCapabilityType
Reserved2 32768 (0x8000) 64 30 UInt32
LpmSupported 0 94 1 UInt32
Reserved1 0 95 1 UInt32

My descriptor value appears to be correct and matches those in the FX3 example files but
the value reported by the MMA is 0x00008000 followed by two lots of 0x0.
I am not sure how we get to that from 0x00000002.

Additionally, the SS device capability does not appear to have been read, presumably
because the LPM bit is not set and, according to the USB 3.0 spec (Section 9.6.2.1),
SS devices must set this bit.

/* Binary device object store descriptor */
const uint8_t CyFxUSBBOSDscr attribute ((aligned (32))) =
{
0x05, /* Descriptor size */
CY_U3P_BOS_DESCR, /* Device descriptor type (0x0F) */
0x16,0x00, /* Length of this descriptor and all sub descriptors */
0x02, /* Number of device capability descriptors */

/* USB 2.0 extension */
0x07, /* Descriptor size */
CY_U3P_DEVICE_CAPB_DESCR, /* Device capability type descriptor (0x10) */
CY_U3P_USB2_EXTN_CAPB_TYPE, /* USB 2.0 extension capability type (0x02) */
0x02,0x00,0x00,0x00, /* Supported device level features: LPM support */

/* SuperSpeed device capability */
0x0A, /* Descriptor size */
CY_U3P_DEVICE_CAPB_DESCR, /* Device capability type descriptor (0x10) */
CY_U3P_SS_USB_CAPB_TYPE, /* SuperSpeed device capability type (0x03) */
0x00, /* Supported device level features */
0x0E,0x00, /* Speeds supported by the device : SS, HS and FS */
0x03, /* Functionality support */
0x0A, /* U1 Device Exit latency */
0xFF,0x07 /* U2 Device Exit latency */
};

On a related topic I have downloaded the USB3CV tool but because my device uses a 2-stage load process the USB3CV tool does not work with my device.

By 2-stage I mean that it first registers as a ‘relatively dumb’ device that knows its VID/PID and not much more. The driver downloads the appropriate firmware and triggers re-enumeration.
The device re-enumerates with a subtly different VID/PID and the driver then hooks it into our UMDF driver.

Does anyone have experience with this issue and how I get my properly registered device to load up under USB3CV?

xxxxx@vgieurope.com wrote:

I have downloaded the Microsoft Message Analyzer to try and see what is going wrong.
As you can see from the BOS descriptor info my bmAttributes field in the USB 2.0 Extension
Capability does not appear to match the value reported by the MMA.

[0] BOS_DESCR{bLen=5,bDescType=15,wTotLen=22,bNDevCaps=2}
Name Value Bit Offset Bit Length Type
bLength 5 0 8 Byte
bDescriptorType BOS(15) 8 8 Byte
wTotalLength 22 16 16 UInt16
bNumDeviceCaps 2 32 8 Byte

[1] USB_20_EXT_DESC{bLen=7,bType=16,bDevCapType=2,Rsvd2=32768,LpmSup=0,Rsvd1=0}

My descriptor value appears to be correct and matches those in the FX3 example files but
the value reported by the MMA is 0x00008000 followed by two lots of 0x0.
I am not sure how we get to that from 0x00000002.

They are interpreting that field in big-endian order. That’s a bug.
The USB spec is all little-endian.


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

Tim,

Thanks for the reply. I have posted a bug report to MMA, but am still no closer to determining why my USB 3.0 device with correct USB 3.0 descriptors does not reliably register as a USB 3.0 device at SuperSpeed when connected to a USB 3.0 port.

My driver sits on top of WinUSB, and I saw, on the Cypress site, a message thread about requiring extra descriptors if using FX3 with WinUSB.

Microsoft OS String descriptor
Extended Compat ID Descriptor
Extended Properties Descriptor

As my device works fine when connected to a USB 2 port I do not think I need these extra descriptors but I am running out of ideas at this point.

PeteY

Whether the device connects at 2.0 or 3.0 gets decided way early in the connection process. What is reported in the descriptors has no impact on it. This will need to be debugged using a hardware analyzer.

Windows USB stack does disable SuperSpeed downstream of certain hubs with known issues. However, I am assuming that is not the issue here if other 3.0 devices are working fine on the same port.

Sent from my Windows 10 phone

From: xxxxx@vgieurope.commailto:xxxxx
Sent: Wednesday, February 3, 2016 6:20 AM
To: Windows System Software Devs Interest Listmailto:xxxxx
Subject: RE:[ntdev] USB 3.0 Driver issue

Tim,

Thanks for the reply. I have posted a bug report to MMA, but am still no closer to determining why my USB 3.0 device with correct USB 3.0 descriptors does not reliably register as a USB 3.0 device at SuperSpeed when connected to a USB 3.0 port.

My driver sits on top of WinUSB, and I saw, on the Cypress site, a message thread about requiring extra descriptors if using FX3 with WinUSB.

Microsoft OS String descriptor
Extended Compat ID Descriptor
Extended Properties Descriptor

As my device works fine when connected to a USB 2 port I do not think I need these extra descriptors but I am running out of ideas at this point.

PeteY


NTDEV is sponsored by OSR

Visit the list online at: http:

MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
Details at http:

To unsubscribe, visit the List Server section of OSR Online at http:</http:></http:></http:></mailto:xxxxx></mailto:xxxxx>

Vivek,

Thanks for the information.
I have a USB 3.0 capable external hard drive which only runs at HighSpeed in the USB 3.0 ports, so I might have one of the ‘hubs with known issues’.

I am using one of the USB 3.0 ports on my dev laptop (MSi GE70 2PE Apache Pro) which has an
Intel(R) 3.0 eXtensible Host Controller - 0100 (Microsoft) with the following Hardware IDs:
PCI\VEN_8086&DEV_8C31&SUBSYS_11091462&REV_05
PCI\VEN_8086&DEV_8C31&SUBSYS_11091462
PCI\VEN_8086&DEV_8C31&CC_0C0330
PCI\VEN_8086&DEV_8C31&CC_0C03

And a USB Root Hub with the following Hardware IDs:
USB\ROOT_HUB30&VID8086&PID8C31&REV0005
USB\ROOT_HUB30&VID8086&PID8C31
USB\ROOT_HUB30

I have on a driver update and appear to have the latest versions installed:

USB Root Hub:
USBHUB3.SYS - v6.3.8600.16384 (winblue_rtm. 130821-1623)
USBLyzer.sys - v2.1.1.40

Intel(R) 3.0 eXtensible Host Controller - 0100 (Microsoft):
UCX01000.sys - v6.3.8600.16384 (winblue_rtm. 130821-1623)
USBLyzer.sys - v2.1.1.40
USBXHCI.sys - v6.3.8600.16384 (winblue_rtm. 130821-1623)

My problem occurs whether or not the USBLyzer driver(s) are in place or not.

xxxxx@vgieurope.com wrote:

My driver sits on top of WinUSB, and I saw, on the Cypress site, a message thread about requiring extra descriptors if using FX3 with WinUSB.

Microsoft OS String descriptor
Extended Compat ID Descriptor
Extended Properties Descriptor

Those are really only necessary if you want an automatic WinUSB install
without an INF.


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

If you are connecting directly to the root port of the Intel controller, Windows stack will not disable Super speed on that.
However, if all SuperSpeed devices are connecting at high speed, it does seem like a host side hardware issue. Have you tried connecting the device to different systems?
Thanks,Vivek

Date: Wed, 3 Feb 2016 12:11:50 -0500
From: xxxxx@vgieurope.com
To: xxxxx@lists.osr.com
Subject: RE:[ntdev] USB 3.0 Driver issue

Vivek,

Thanks for the information.
I have a USB 3.0 capable external hard drive which only runs at HighSpeed in the USB 3.0 ports, so I might have one of the ‘hubs with known issues’.

I am using one of the USB 3.0 ports on my dev laptop (MSi GE70 2PE Apache Pro) which has an
Intel(R) 3.0 eXtensible Host Controller - 0100 (Microsoft) with the following Hardware IDs:
PCI\VEN_8086&DEV_8C31&SUBSYS_11091462&REV_05
PCI\VEN_8086&DEV_8C31&SUBSYS_11091462
PCI\VEN_8086&DEV_8C31&CC_0C0330
PCI\VEN_8086&DEV_8C31&CC_0C03

And a USB Root Hub with the following Hardware IDs:
USB\ROOT_HUB30&VID8086&PID8C31&REV0005
USB\ROOT_HUB30&VID8086&PID8C31
USB\ROOT_HUB30

I have on a driver update and appear to have the latest versions installed:

USB Root Hub:
USBHUB3.SYS - v6.3.8600.16384 (winblue_rtm. 130821-1623)
USBLyzer.sys - v2.1.1.40

Intel(R) 3.0 eXtensible Host Controller - 0100 (Microsoft):
UCX01000.sys - v6.3.8600.16384 (winblue_rtm. 130821-1623)
USBLyzer.sys - v2.1.1.40
USBXHCI.sys - v6.3.8600.16384 (winblue_rtm. 130821-1623)

My problem occurs whether or not the USBLyzer driver(s) are in place or not.


NTDEV is sponsored by OSR

Visit the list online at: http:
>
> MONTHLY seminars on crash dump analysis, WDF, Windows internals and software drivers!
> Details at http:
>
> To unsubscribe, visit the List Server section of OSR Online at http:</http:></http:></http:>

Vivek,

I have another PC which has some built-in SuperSpeed ports and a 4-port USB 3.0 PCIe card from Inateck with a Renesas USB stack/driver.

When I plug my device into the built-in SuperSpeed ports the bahaviour is the same as on my dev laptop, but when I plug it into a port on the PCIe board it registers as running at SuperSpeed (Good), but only reads the device descriptor and reports that it cannot read any of the other descriptors as the device is in low-power mode (despite having an external power supply connected and active).

Am I likely to see this ‘SuperSpeed port as HS port’ issue a lot because I am currently batting 1000?

Any ideas as to why the PCIe port report my device as being in Low Power Mode when it does not report as such in the other ports?

Hi,

I have spent some time discussing this with the firmware and hardware engineers and we have managed to figure out what has been causing the problems and small fix to the hardware and firmware
means that the board now registers in a proper USB 3.0 port (on the PCIe card).

Interestingly it still registers as HS when plugged into a built-in USB 3.0 port but I suspect that is another issue altogether.

Thanks to all who offered advice and suggestions on this (Vivek, Tim, Doron)

Pete Y