USB Selective Suspend Test with enhanced logging for debugging
Note This content applies to the Windows Logo Kit (WLK). For the latest information using the new Windows Hardware Certification Kit (HCK), see Windows HCK User's Guide on the Windows Hardware Dev Center.
Type: Manual Test
Overview
This test is designed to test the selective suspend abilities of the USB. This feature allows a device's port to be suspended when the device is not in use to conserve power. To properly support this new feature, a device must maintain its internal state when its upstream port has been suspended and be able to function correctly when its upstream port is resumed. This test ensures that devices respond appropriately on its control pipe at its currently assigned device address following the suspend/resume cycle of a port. Depending on the class of the device, additional steps may be performed to ensure that the device responds correctly on other endpoints. This test runs only on devices and hubs.
This version of the USB Address Description Test incorporates ETW events generated in the USB PORT driver into the log for debugging purposes. This test is not required to get a logo. See "Log Interpretation" below for details on interpreting the additional log information.
Details
This test requires that the test device be connected through an intermediate USB 2.0 hub to the host system. This test fails if the test device is more than one hub deep.
Selective Suspend Test
100 test iterations:
Suspend Device Port
Sleep for 3000 ms
Resume Device Port
Get Device Descriptor and compare with initial value
Get Configuration Descriptor and compare with initial value
Results Interpretation
The test fails if any of the following occurs:
A device fails to respond correctly on its control pipe following the suspend/resume cycle.
A device fails to respond correctly on any other endpoints in its current configuration following the suspend/resume cycle.
Log Interpretation
Events logged:
- RAW_RESET_PORT_DISPATCH
a. Occurs when a port reset is initiated
b. Includes the following data:
- Timestamp
- Host Controller Address
- Port Number
- RAW_RESET_PORT_STATUS1
a. Indicates the status after SetFeaturePortPower
b. Includes the following data:
- Timestamp
- Host Controller Address
- Port Number
- Port Status
- RAW_RESET_PORT_STATUS2 a. Indicates the status after SetFeaturePortReset b. Includes the same data as STATUS1
- RAW_RESET_PORT_STATUS3 a. Indicates the status after ClearFeaturePortResetChange b. Includes the same data as STATUS1
- RAW_RESET_PORT_COMPLETE
a. Indicates the port reset has completed
b. Includes the following data:
- Timestamp
- Host Controller Address
- Port Number
- USB Status
- SEND_ONE_PACKET_DISPATCH
a. Occurs when a packet is sent to the device
b. Includes the following data:
- Timestamp
- Host Controller Address
- Packet Information:
- Device Address
- Endpoint Address
- Maximum Packet Size
- Timeout
- USB Packet Flags
- Data Length
- Hub Device Address
- Port TT Number
- Usbd Status
- SEND_ONE_PACKET_DISPATCH_DATA a. Occurs after a packet dispatch to log the raw data in the transaction b. In addition to all the information in PACKET_DISPATCH, includes raw packet data in hexadecimal format
- SEND_ONE_PACKET_TIMEOUT a. Indicates that the request to the device timed out b. Includes the same data as PACKET_DISPATCH
- SEND_ONE_PACKET_COMPLETE a. Indicates the request completed b. Includes the same data as PACKET_DISPATCH and USB Status
- SEND_ONE_PACKET_COMPLETE_DATA
a. Occurs after the packet completion to log any raw data in the transaction
b. Includes the following data:
- Timestamp
- Host Controller Address
- Packet info (see above)
- Raw packet data in hexadecimal format
Timestamp Interpretation:
Important The standard timestamp tag on the log entry does not accurately represent the time the ETW event occurred. Refer to the event timestamp logged with the data to get accurate timing information. There is a delay between when the ETW events occur and when they are published to the log. This creates a chronological disparity between the standard log entries and the ETW entries. When correlating events in the log, be sure to use the event timestamp when reconstructing the data.
Port Status Interpretation:
Refer to the following sections of "Universal Serial Bus Specification Revision 2.0" to interpret the port status:
11.24.2.7 - Get Port Status
11.24.2.7.1 - Port Status Bits
Table 11-21 - Port Status Field, wPortStatus
Run Time: 10 minutes
Log File: usbhct_s.log
System Restart Required: No
Supported operating systems for Logo or Signature testing:
- Windows 7
Program: usbhct.exe
Requirements
Software Requirements
The test tool requires the following software:
Supported operating system (see list above)
Software components included with the device that is being tested
Hardware Requirements
The test tool requires the following hardware:
Device to be tested
Computer that meets the minimum software requirements
Processor
The test tool runs on the following processor architectures:
x86
x64
IA64
Running the Test
All test cases return Pass or Fail. Because this test is not required to run to get a logo, it will not show up in device console when making a submission. To run this test in the DTM, please see How to Manually Schedule USB DTM Jobs.
Command Syntax
Command option | Description |
---|---|
usbhct.exe |
Without any options, displays usage text |
-s |
Specifies to run the selective suspend test |
-d [VID/PID] |
Specifies the device VID XXXX, and PID YYYY |
-l [string] |
Log file name. ex: "selstest.log" |
-w |
Enable ETW tracing in the logs |
Code Tour
File Manifest
File | Location |
---|---|
usbhct.exe |
[WTT\TestBinRoot]\nttest\driverstest\usb\ |
hctrans.dll |
[WTT\TestBinRoot]\nttest\driverstest\usb\ |
usbtree.dll |
[WTT\TestBinRoot]\nttest\driverstest\usb\ |
ETWCap.dll |
[WTT\TestBinRoot]\nttest\driverstest\usb\ETWCap\ |
USBRefresh.exe |
[WTT\TestBinRoot]\nttest\driverstest\usb\ |
Build date: 9/14/2012