Windows operating systems include native support for devices and systems that comply with the Universal Serial Bus (USB) specification. This article provides answers to frequently asked questions from driver developers about the USB stack and features that are supported in USB.
This paper presents frequently asked questions for driver developers who are new to developing and integrating USB devices and drivers with Windows operating systems.
See also: USB FAQ - Intermediate
"Thanks to USB 3.0, I can connect a SuperSpeed USB thumb drive to my PC's xHCI host controller and copy files faster."
Let's understand the USB terms in the preceding sentence. USB 3.0, USB 2.0, and USB 1.0 refer to the USB specification revision number from the USB Implementers Forum. The USB specifications define how the host PC and USB device communicate with each another.
The version number also indicates the maximum transmission speed. The newest specification revision is USB 3.0, which specifies a maximum transmission speed up to 5 Gbps. USB 1.0 defines two different data rates, low speed USB (up to 1.5 Mbps) and full speed USB (up to 12 Mbps). USB 2.0 defines a new data rate, high-speed USB (480 Mbps), while maintaining support for low and full speed devices. USB 3.0 continues to work with all of the previously defined data rates.
If you look at product packaging, SuperSpeed USB references the newest USB 3.0 devices. Hi-Speed USB is used to describe high-speed USB 2.0 devices. USB, with no descriptor, refers to low speed and full speed devices.
In addition to the USB protocol, there is a second specification for the USB host controller, the piece of hardware on the PC to which a device is connected. The Host Controller Interface specification defines how host controller hardware and software interact. The eXtensible Host Controller Interface (xHCI) defines a USB 3.0 host controller. The Enhanced Host Controller Interface (EHCI) defines a USB 2.0 host controller. The Universal Host Controller (UHCI) and the Open Host Controller (OHCI) are two, alternate implementations of a USB 1.0 host controller.
USB 3.0 ports are either marked with the SuperSpeed USB Logo or the port is typically blue.
.jpg)
SuperSpeed USB Logo on a USB 3.0 port
.jpg)
Blue USB 3.0 port
Newer PCs have both USB 3.0 and USB 2.0 ports. If you want your SuperSpeed USB device to perform at top speed, find a USB 3.0 port and connect the device to that port. A SuperSpeed device that is connected a USB 2.0 port, operates at high speed.
You can also verify that a particular port is a USB 3.0 port in Device Manager. In Windows Vista or later version of Windows, open Device Manager, and select the port from the list.
.jpg)
List of USB Host Controllers in Device Manager
If you have an eXtensible Host Controller, it supports USB 3.0.
Windows 8 and Windows Server 2012 include support for USB 3.0.
If the PC has USB 3.0 ports and is running a version of Windows earlier than Windows 8, the host controller drivers are provided by the PC manufacturer. If you need to reinstall those drivers, you must get them from the manufacturer.
If you added a USB 3.0 controller card to your PC that is running a version of Windows earlier than Windows 8, you must install the drivers provided by the controller card manufacturer.
In Windows 8, the Microsoft-provided set of USB 3.0 drivers (USB driver stack) work with most host controllers. Microsoft USB 3.0 driver stack does not work with the Fresco Logic FL1000 controller. To determine if you have an FL1000 controller, open Device Manager and expand Universal Serial Bus controllers. View the controller properties by right-clicking the controller node. On the Details tab, select Hardware Ids property in the list. If the hardware ID starts with PCI\VEN_1B73&DEV_1000, it is the FL1000. For that controller, download and install drivers from your PC or controller card manufacturer.
In addition to the USB devices that you connect to your PC, there are a number of devices integrated within the PC that might be connected over USB, such as a webcam, fingerprint reader, SD Card reader, and so on. To connect all of those devices and still provide external USB ports, the PC supports several USB host controllers.
The USB 3.0 xHCI host controller is fully backwards compatible with all USB device speeds, SuperSpeed, high speed, full speed and low speed. You can connect any device directly to an xHCI controller and expect that device to work. For EHCI controllers, that is not the case. While the USB 2.0 specification supports all speeds of devices, the EHCI controller only supports high speed USB devices. In order for full speed and low speed USB devices to work, they must be connected to the EHCI controller through a USB 2.0 hub, or they must be connected to a UHCI or OHCI Controller.
For newer PCs, most USB 2.0 ports exposed by PCs are downstream of a USB 2.0 hub. This hub is connected to an EHCI controller. This allows the PC's USB 2.0 port to work with all speeds of devices. SuperSpeed devices will behave as high speed devices when connected to a 2.0 port.
After the USB 2.0 specification was released, PCs used a combination of host controllers in order to support all speeds of devices. A single USB 2.0 port would be wired to two host controllers, an EHCI host controller and either a UHCI or OHCI host controller. When you attach a device, the hardware dynamically routes the connection to one of the two hosts depending on the device's speed.
While xHCI host controllers work with any speed of device, a SuperSpeed hub only works with SuperSpeed devices. To ensure USB 3.0 hubs can work with all speeds, they have two parts: a SuperSpeed hub and a USB 2.0 hub. A USB 3.0 hub is able to support all speeds by dynamically routing devices, to the SuperSpeed hub or 2.0 hub, based on device speed.
Open Device Manager, view Devices by connection, and then locate your eXtensible Host Controller. When you connect a single USB 3.0 hub to your USB 3.0 port, you will see two hubs downstream of the controller's Root Hub.
.jpg)
USB 3.0 Hub in Device Manager
In the example below, a SuperSpeed USB storage device and USB Audio device are both connected to a USB 3.0 hub. You can see the storage device is downstream of the SuperSpeed hub and the audio device is downstream of the USB 2.0 hub.
.jpg)
USB 3.0 Hub with Connected Devices in Device Manager
A different set of binaries is loaded for each type of host controller. It's important to understand that the USB driver stack that Windows loads correlates to the type of host controller, not to the connected device's speed.
In this image, you can see which drivers are loaded for each of the different types of USB host controllers.
.jpg)
Windows 8 USB driver stacks
If the USB 3.0 port is correctly routed to an xHCI controller, Windows loads the xHCI driver stack (also referred to as the USB 3.0 driver stack).
If the USB 2.0 port is connected to an EHCI controller through a USB 2.0 hub, the traffic moves through the EHCI controller, and the USB 2.0 driver stack is loaded.
For more information about the drivers in the USB driver stack, see USB Driver Stack Architecture.
If the PC's USB 2.0 ports use a companion controller, the host controller to which the port is routed depends on device speed. For example, a low speed device connects through a UHCI or an OHCI controller, and uses the USBUHCI or USBOHCI driver. The PC routes a high speed device to an EHCI controller, therefore, Windows uses the USBEHCI driver.
Different device speeds do not determine the driver that is loaded for the controller. However, different device speeds might determine which controller is used. The controller always uses the same driver.
In Windows 8, first, make sure that you have a USB 3.0 port and an xHCI host controller. If your SuperSpeed USB device is connected to the xHCI host controller, Windows 8 shows a "Connected to USB 3.0" message in specific portions of the Windows 8 UI. If the device is connected to an EHCI controller instead of your XHCI controller, the messages will instead read, "Device can perform faster when connected to USB 3.0".
You can view these UI messages in PC Settings.
This image shows the UI message when the USB 3.0 device is operating at SuperSpeed.
.jpg)
SuperSpeed USB Device operating at SuperSpeed
This image shows the UI message when the USB device is operating at a bus speed that is lower than SuperSpeed.
.jpg)
SuperSpeed USB device operating at high-speed
You can view similar messages in Devices and Printers, as shown in these images.
.jpg)
SuperSpeed USB device operating at SuperSpeed
.jpg)
SuperSpeed device operating at high-speed
If the USB 3.0 device is a storage device, Windows Explorer shows similar messages when the volume label is selected, as shown below. Note that the View -> Details pane must be selected for the message to be visible.
.jpg)
SuperSpeed USB device operating at SuperSpeed
.jpg)
SuperSpeed USB device operating at high-speed
If you are writing a device driver, the USBView tool, included in the Windows Driver Kit (WDK) is very useful. For the Windows 8 WDK, Microsoft updated USBView to display SuperSpeed USB information. You can use this tool to determine whether or not your device is operating at SuperSpeed. This image shows a USB 3.0 device operating at SuperSpeed in USBView.
.jpg)
SuperSpeed USB device operating at SuperSpeed
If you are a device driver developer, the USB driver stack exposes a new IOCTL, IOCTL_USB_GET_NODE_CONNECTION_INFORMATION_EX_V2, which you can use to query speed information for USB 3.0 devices.
Generally, if a USB 3.0 USB device is not faster than a high-speed USB device, it's not performing at SuperSpeed. If the SuperSpeed USB device is connected to a USB 3.0 port, it may not operate at SuperSpeed for the following reasons:
.jpg)
Non Functional SuperSpeed USB Hub
You can either connect your SuperSpeed device directly to the USB 3.0 port, or update the firmware on your hub. Windows 8 recognizes hubs that have newer firmware.
Yes. The Microsoft Natural Keyboard Pro, which has a three-port, bus-powered hub, is an example of a compound composite USB device. The device has a composite device attached to port 1. Two additional ports are exposed to the end user.
The device that is attached to port 1 is a low-speed composite device. The device has two interfaces, both of which comply with the USB standard device class definition for human interface devices (HID). The composite device provides two HID interfaces instead of multiplexing all collections over a single HID interface by using top-level collections. This design was chosen for compatibility with older BIOSs.
In Windows 2000 and later operating systems, a new physical device object (PDO) is created when a USB device is moved from one port to another. If the hardware reports a unique USB serial number, a new PDO is not created.
To reuse the same PDO and to ensure that the device experience is unchanged whether the device is reinserted into the same port or a new port, hardware vendors must store a serial number on their device. According to Windows Hardware Certification Program requirements, the serial number must be unique for all devices that share the device installation identifier.
The USB-IF has worked with Microsoft and other USB-IF member companies to develop a list of recommendations for independent hardware vendors to include on their packaging.
More information is available on the USB Web site.
For USB and Hi-Speed USB refer to:
http://www.usb.org/developers/packaging/
For SuperSpeed USB refer to:
http://www.usb.org/channel/PackageRecommendations_SSUSB.pdf
All existing client drivers should continue work, as is, when a low, full, or high-speed device is connected to a USB 3.0 port.
In Windows 8, we have ensured compatibility with existing client drivers. The USB 3.0 driver stack maintains IRQL levels, caller context, and error status; retry frequency and timing when interacting with devices, and more to make sure existing drivers continue to work.
It is still very important to test. Common failures occur because:
In Windows 7 and earlier version of the operating systems, the USB 3.0 driver stack is provided by third-party. Therefore, we highly recommend that you test your driver to work with third party USB driver stacks.
New client drivers in Windows 8 for high Speed and SuperSpeed USB devices should opt for new capabilities.
The USB Attached SCSI (UAS) protocol is a new mass storage protocol designed to improve performance over the established USB mass storage protocol, Bulk-Only-Transport (BOT). It does so by reducing protocol overhead, supporting SATA native command queuing (NCQ) and by processing multiple commands in parallel. To do this, UAS makes use of a new USB 3.0 feature for bulk transfers called streams.
The existing mass storage driver, Usbstor.sys, uses the BOT protocol. It works with all speeds of devices, including SuperSpeed USB devices.
For Windows 8, Microsoft includes a new mass storage class driver, Uaspstor.sys which uses the UAS protocol. Because streams is new to USB 3.0, so Uaspstor.sys can only use streams when the hardware supports streams (a SuperSpeed USB device is connected to an xHCI host controller). The driver also includes support for software streams, so it can also load for devices operating at high-speed, regardless of the host type.
If you connect a mass storage device to Windows 8 and that device supports UAS, Windows loads Uaspstor.sys. In some cases, there might be known issues with hardware streams on a specific xHCI host controller or known issues with a device's UAS protocol implementation. In those cases, Windows falls back to the BOT protocol and loads the Usbstor.sys driver instead.
Uaspstor.sys is new to Windows 8. It is not present in earlier versions of Windows.
Windows supports several USB classes that the USB Device Working Group (DWG) has defined. For the current list of USB class specifications and class codes, visit the USB DWG Web site at http://www.usb.org/developers/devclass_docs.
This table highlights the USB DWG classes that are supported in Windows and also identifies the versions of Windows that support each class.
| Class Specification | bDeviceClass Code | Driver Name | Windows Support |
| Bluetooth class | 0xE0 | Bthusb.sys | Windows XP and later |
| Chip/smart card interface devices (CCID) | 0x0B | Usbccid.sys | Windows Server 2008 and later Windows Vista and later Windows Server 2003* Windows XP* Windows 2000* |
| Hub class | 0x09 | Usbhub.sys | Windows Server 2003 and later Windows XP and later Windows 2000 and later |
| Human interface device (HID) | 0x03 | Hidusb.sys | Windows Server 2003 and later Windows XP and later Windows 2000 |
| Mass storage class (MSC) | 0x08 | Usbstor.sys | Windows Server 2003 and later Windows XP and later Windows 2000 |
| USB Attached SCSI (UAS) | 0x08 | Uaspstor.sys | Windows Server 2012 Windows 8 |
| Printing class | 0x07 | Usbprint.sys | Windows Server 2003 and later Windows XP and later Windows 2000 |
| Scanning/imaging (PTP) | 0x06 | WpdUsb.sys Usbscan.sys | Windows Server 2003 and later Windows XP and later Windows 2000 |
| Media Transfer (MTP) | 0x06 | WpdUsb.sys | Windows Server 2003 and later Windows XP and later |
| USB Audio class | 0x01 | Usbaudio.sys | Windows Server 2003 and later Windows XP and later Windows 2000 |
| Modem class (CDC) | 0x02 | Usbser.sys | Windows Server 2003 and later Windows XP and later Windows 2000 |
| Video class (UVC) | 0x0E | Usbvideo.sys | Windows Vista and later Windows XP* |
*Special instructions are necessary to load this driver because this driver might have been released later than the operating system.
Windows class drivers might not support all of the features that are described in a DWG class specification. In this case, the driver will not load based on class match. For additional details on implemented features within a class specification, see the WDK documentation.
Microsoft provides system-defined setup classes for most device types. System-defined setup class GUIDs are defined in Devguid.h. For additional information, see the WDK.
For a list of Windows class GUIDs, see these topics:
Independent hardware vendors must use the setup class that is associated with the type of USB device, not with the bus type. If you are developing a device type for which Microsoft has not provided an existing class GUID, you can define a new device setup class.
In Windows 8, a new setup class has been defined, named USBDevice (ClassGuid = {88BAE032-5A81-49f0-BC3D-A4FF138216D6}). If you are developing a device type, associate your device with USBDevice instead of the setup class, USB. The USBDevice class works on Windows Vista and later versions of the operating system.
The setup class USB (ClassGuid = {36fc9e60-c465-11cf-8056-444553540000}) is reserved only for USB host controllers and USB hubs, and must not be used for other device categories. Using this setup class incorrectly may cause the device driver to fail Windows logo testing.
When a USB device is connected, the USB host controller polls the frame scheduler, which is a direct memory access (DMA) bus master operation. "Break events" such as bus master traffic, interrupts, or several other system activities move a CPU out of C3 because, by definition, the CPU's cache cannot be snooped while it is in C3.
There are two ways to work around this issue:
The following is a list of USB class drivers in Windows 8, which support Selective Suspend:
If enough original equipment manufacturers ask for it, Microsoft might consider supporting Selective Suspend for additional class drivers. Work is also being investigated on future hardware architectures (CPUs, chipsets, and the operating system) to mitigate the problems.
A USB device cannot awaken Windows from S3 for several reasons, including the following:
For additional information, see the USB troubleshooter in the Help and Support Center in Windows XP and later versions of Windows.
The following versions of Windows support the USB 2.0 enhanced host controller:
Note: Because Windows 2000 and Windows XP were released before USB 2.0 hardware was available, the drivers were released for those operating systems in the service packs.
To install drivers:
.jpg)
For additional information about the availability of USB 2.0 in Windows XP Service Pack 1, see Microsoft Knowledge Base article 329632, "How to obtain and to install USB 2.0 drivers in Windows XP Service Pack 1" at http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q329632&.
Note: To ensure that you have the latest updates installed on your machine, visit Windows Update regularly.
Windows XP and later versions of Windows create a pop-up notice when a Hi-Speed USB device is plugged into a USB port that does not support high-speed. To obtain the fastest performance from the device, users must click the notice and follow the instructions on the screen.
To disable the notice, follow these steps:
Note: The preceding procedure disables all USB notices, not just "HI-SPEED USB Device plugged into non-HI-SPEED port".
For additional information about USB 2.0 support in Windows XP Service Pack 1, see Microsoft Knowledge Base article 329632, "How to obtain and to install USB 2.0 drivers in Windows XP Service Pack 1, at http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q329632.
See the USB-IF FAQ page at http://www.usb.org/developers/usbfaq/.