SRB_NOTIFY_IDLE_STATE

The class driver sends this request to the minidriver immediately before sending the first open request or last close request. The minidriver can use SRB_NOTIFY_IDLE_STATE as a notification to wake from USB selective suspend.

Return Value

This request is a notification packet only; any minidriver-supplied return value is ignored.

Remarks

SRB_NOTIFY_IDLE_STATE is sent in Microsoft Windows XP with Service Pack 2 (SP2) and later, but not in Microsoft Windows Server 2003.

SRB_NOTIFY_IDLE_STATE fixes the USB selective suspend problem that exists in the stream class driver (Stream.sys) in Windows XP with SP1. You can use SRB_NOTIFY_IDLE_STATE to support selective suspend within single instance minidrivers based on stream class and USBCAMD2.

In Windows XP and earlier, SRB_NOTIFY_IDLE_STATE does not exist. For Windows XP and earlier, the minidriver receives SRB_GET_DEVICE_PROPERTY to wake from an idle state. The minidriver then calls PoRequestPowerIrp to change the device state to D0.

In Windows XP with SP1 and Windows Server 2003, SRB_GET_DEVICE_PROPERTY is not sent in this situation. If you are using Stream.sys with these operating systems, follow the instructions in the Knowledge Base article mentioned earlier.

When opening the first instance of the device, the class driver sends SRB_NOTIFY_IDLE_STATE immediately before sending SRB_OPEN_DEVICE_INSTANCE.

When closing the last instance of the device, the class driver sends SRB_NOTIFY_IDLE_STATE immediately before sending the request for the device to transition to state D3.

When the stream class driver sends an SRB_NOTIFY_IDLE_STATE request, the minidriver receives a call to StrMiniReceiveDevicePacket.

See also

SRB_GET_DEVICE_PROPERTY

SRB_OPEN_DEVICE_INSTANCE

StrMiniReceiveDevicePacket