USB Selective Suspend
This section provides information about choosing the correct mechanism for the selective suspend feature.
In Microsoft Windows XP and later operating systems, the USB core stack supports a modified version of the "selective suspend" feature that is described in revision 2.0 of the Universal Serial Bus Specification.
The USB selective suspend feature allows the hub driver to suspend an individual port without affecting the operation of the other ports on the hub. Selective suspension of USB devices is especially useful in portable computers, since it helps conserve battery power. Many devices, such as fingerprint readers and other kinds of biometric scanners, only require power intermittently. Suspending such devices, when the device is not in use, reduces overall power consumption. More importantly, any device that is not selectively suspended may prevent the USB host controller from disabling its transfer schedule, which resides in system memory. DMA transfers by the host controller to the scheduler can prevent the system's processors from entering deeper sleep states, such as C3. The Windows selective suspend behavior is different for devices operating in Windows XP and Windows Vista and later versions of Windows.
There are two different mechanisms for selectively suspending a USB device: idle request IRPs (IOCTL_INTERNAL_USB_SUBMIT_IDLE_NOTIFICATION) and set power IRPs (IRP_MN_SET_POWER). The mechanism to use depends on the operating system and the type of device: composite or non-composite.
Client drivers, for an interface on a composite device, that enable the interface for remote wakeup with a wait wake IRP (IRP_MN_WAIT_WAKE), must use the idle request IRP (IOCTL_INTERNAL_USB_SUBMIT_IDLE_NOTIFICATION) mechanism to selectively suspend a device.
The version of the Windows operating system determines the way drivers for non-composite devices enable selective suspend.
- Windows XP: On Windows XP all client drivers must use idle request IRPs (IOCTL_INTERNAL_USB_SUBMIT_IDLE_NOTIFICATION) to power down their devices. Client drivers must not use WDM power IRPs to selectively suspend their devices. Doing so will prevent other devices from selectively suspending. See Conditions for Global Suspend in Windows XP for more information.
- Windows Vista and later versions of Windows: Driver writers have more choices for powering down devices in Windows Vista and in the later versions of Windows. Although Windows Vista supports the Windows idle request IRP mechanism, drivers are not required to use it.
The following table shows the scenarios that require the use of the idle request IRP and the ones that can use a WDM power IRP to suspend a USB device:
|Windows Version||Function on Composite Device, Armed for Wake||Function on Composite Device, Not Armed for Wake||Single Interface USB Device|
|Windows 7||Must use idle request IRP||Can use WDM Power IRP||Can use WDM Power IRP|
|Windows Server 2008||Must use idle request IRP||Can use WDM Power IRP||Can use WDM Power IRP|
|Windows Vista||Must use idle request IRP||Can use WDM Power IRP||Can use WDM Power IRP|
|Windows Server 2003||Must use idle request IRP||Must use idle request IRP||Must use idle request IRP|
|Windows XP||Must use idle request IRP||Must use idle request IRP||Must use idle request IRP|
This section explains the Windows selective suspend mechanism and includes the following topics:
Build date: 1/21/2013