Table of contents
TOC
Collapse the table of content
Expand the table of content

A Device Returns to Its Working State

Last Updated: 4/22/2017

[This topic applies to UMDF 1.x.]

A device that is in a low-power state returns to its working state if one of the following occurs:

  • The device detects an external event and triggers a wake signal on its bus. The kernel-mode bus driver detects the wake signal.

  • The device has been idle and a driver calls IWDFDevice2::StopIdle.

  • The system's power state has changed from a low-power state to its working (S0) state.

In each of these situations, the kernel-mode bus driver restores the device (a child device of the bus) to its working (D0) state.

For each UMDF-based function and filter driver that supports the device, the framework does the following, in sequence, one driver at a time, starting with the driver that is lowest in the driver stack:

  1. The framework calls the driver's IPnpCallback::OnD0Entry callback function (if it exists).

  2. If the driver is the device's power policy owner, the framework calls its IPowerPolicyCallbackWakeFromS0::OnDisarmWakeFromS0 or IPowerPolicyCallbackWakeFromSx::OnDisarmWakeFromSx callback function.

  3. The framework restarts all of the device's power-managed I/O queues and calls their IQueueCallbackIoResume::OnIoResume callback functions (if necessary).

  4. If the driver is using self-managed I/O, the framework calls the driver's IPnpCallbackSelfManagedIo::OnSelfManagedIoRestart callback function.

To see a diagram that shows these steps, see A User Plugs in a Device.

© 2017 Microsoft