Previous Next

USB Driver Stack for Windows XP and Later

The following figure illustrates the WDM driver stack that is created in Windows XP for two USB devices, one composite and one noncomposite. The composite device has two interfaces, each of which is driven by a separate client driver.

USB Driver Stack for Windows XP and Later

There are two significant differences between the Windows 2000 and Windows XP USB driver stacks.

First, the USB device stack for Windows XP is designed to facilitate the addition of a USB 2.0 miniport driver, usbehci.sys, that Microsoft has developed for the purpose of supporting high-speed USB 2.0 technology. This miniport driver is not included with the initial release of Windows XP, but is available in Windows XP (SP1 and later) and Windows Server 2003 and later operating systems.

The second significant change in the USB stack is that, for Windows XP, Microsoft supplies a separate generic parent driver for the support of composite USB devices. In Windows 2000, support for composite devices was built into the system-supplied USB bus (or hub) driver. Additionally, with the Windows XP generic parent driver, Microsoft provides USB Content Security Class functionality for the first time. For a discussion of the generic parent driver, see USB Common Class Generic Parent Driver.

Starting from the bottom of the figure, the following describes each driver in the stack:

  1. At the bottom of the Windows XP USB driver stack is the host controller driver. It consists of the port driver, usbport.sys, and one or more of three miniport drivers that run concurrently. When the system detects host controller hardware, it loads one of these miniport drivers. The miniport driver, once loaded, loads the port driver, usbport.sys. The port driver handles those aspects of the host controller driver's duties that are independent of the specific protocol.

    The usbuhci.sys (universal host controller interface) miniport driver replaces the uhcd.sys miniclass driver that shipped with Windows 2000. The usbohci.sys (open host controller interface) miniport driver replaces openhci.sys. For further information about the Windows 2000 miniclass drivers, see USB Driver Stack for Windows 2000. The usbehci.sys miniport driver supports hi-speed USB devices and is available for the first time in Windows XP (SP1 and later) and Windows Server 2003 and later operating systems.

    In all versions of Windows that support USB 2.0, the operating system is capable of managing USB 1.1 and USB 2.0 host controllers simultaneously. Whenever the operating system detects that both types of controller are present, it creates two separate device objects, one for each host controller. Windows subsequently loads the usbehci.sys miniport driver for the USB 2.0-compliant host controller hardware and either usbohci.sys or openhci.sys for the USB 1.1-compliant hardware, depending on the system configuration.

  2. Above the port driver is the USB bus driver, usbhub.sys, also known as the hub driver. This is the device driver for each hub on the system.
  3. Each particular device is supported by a USB client driver. Client device drivers for noncomposite devices are layered directly above the hub driver. For a definition and example of a client driver, see Vendor-Supplied USB Client Drivers. For composite USB devices that expose multiple interfaces and do not have their own parent class driver, the system loads an extra driver called the USB common class generic parent driver, usbccgp.sys, between the hub driver and the client device drivers. The system assigns a separate PDO to each interface of a composite device. Vendors might choose to provide a separate client driver for each interface.
  4. In the case of composite devices, client device drivers are loaded above the generic parent driver. A client driver for a composite device is no different from a client driver for a noncomposite devices, except for where it is loaded in the driver stack. Client drivers for composite devices sit above the generic parent driver.