35#if defined(EVENT_TRACING)
37#include "FdoPower.tmh"
77 Irp->StartNextPowerIrp();
78 Irp->CopyCurrentIrpStackLocationToNext();
190 Mx::MxLowerIrql(
irql);
245 Irp->GetParameterPowerState());
259 Irp->CopyCurrentIrpStackLocationToNext();
274 Irp->CopyCurrentIrpStackLocationToNext();
314 "Received set device power irp 0x%p on WDFDEVICE 0x%p !devobj 0x%p, "
315 "but the irp was not requested by the device (the power policy owner)",
357 Irp->MarkIrpPending();
358 Irp->CopyCurrentIrpStackLocationToNext();
425 Irp->GetParameterPowerStateSystemState()
563 ASSERT(!
"This state shouldn't be reachable for an FDO.");
WDFDEVICE __inline GetHandle(VOID)
MdDeviceObject __inline GetAttachedDevice(VOID)
MdDeviceObject __inline GetDeviceObject(VOID)
static FxWdmDeviceExtension * _GetFxWdmExtension(__in MdDeviceObject DeviceObject)
MdRemoveLock GetRemoveLock(VOID)
BOOLEAN PendingReturned()
VOID SetStatus(__in NTSTATUS Status)
DEVICE_POWER_STATE GetParameterPowerStateDeviceState()
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
virtual WDF_DEVICE_POWER_STATE PowerCheckDeviceTypeOverload(VOID)
virtual WDF_DEVICE_POWER_STATE PowerCheckDeviceTypeNPOverload(VOID)
_Must_inspect_result_ NTSTATUS DispatchDeviceQueryPower(__in FxIrp *Irp)
_Must_inspect_result_ NTSTATUS RaiseDevicePower(__in FxIrp *Irp)
virtual VOID PowerReleasePendingDeviceIrp(__in BOOLEAN IrpMustBePresent=TRUE)
_Must_inspect_result_ NTSTATUS DispatchSystemQueryPower(__in FxIrp *Irp)
static _Must_inspect_result_ NTSTATUS _PowerPassDown(__inout FxPkgPnp *This, __in FxIrp *Irp)
_Must_inspect_result_ NTSTATUS DispatchDeviceSetPower(__in FxIrp *Irp)
static _Must_inspect_result_ NTSTATUS _DispatchSetPower(__inout FxPkgPnp *This, __in FxIrp *Irp)
static MdCompletionRoutineType _SystemPowerS0Completion
static MdCompletionRoutineType _SystemPowerSxCompletion
virtual _Must_inspect_result_ NTSTATUS PowerCheckParentOverload(__out BOOLEAN *ParentOn)
_Must_inspect_result_ NTSTATUS DispatchSystemSetPower(__in FxIrp *Irp)
virtual VOID PowerParentPowerDereference(VOID)
static MdCompletionRoutineType RaiseDevicePowerCompletion
static _Must_inspect_result_ NTSTATUS _DispatchQueryPower(__inout FxPkgPnp *This, __in FxIrp *Irp)
_Must_inspect_result_ NTSTATUS LowerDevicePower(__in FxIrp *Irp)
VOID SetPendingDevicePowerIrp(__inout FxIrp *Irp)
VOID PowerProcessEvent(__in FxPowerEvent Event, __in BOOLEAN ProcessEventOnDifferentThread=FALSE)
BOOLEAN IsPowerPolicyOwner(VOID)
MdIrp ClearPendingDevicePowerIrp(VOID)
_Must_inspect_result_ NTSTATUS PowerPolicyHandleSystemQueryPower(__in SYSTEM_POWER_STATE QueryState)
BOOLEAN PowerPolicyIsWakeEnabled(VOID)
MdIrp GetPendingSystemPowerIrp(VOID)
VOID SetPendingSystemPowerIrp(__inout FxIrp *Irp)
NTSTATUS CompletePowerRequest(__inout FxIrp *Irp, __in NTSTATUS Status)
FxPowerPolicyMachine m_PowerPolicyMachine
VOID PowerPolicyProcessEvent(__in FxPowerPolicyEvent Event, __in BOOLEAN ProcessEventOnDifferentThread=FALSE)
POWER_STATE SetPowerState(__in POWER_STATE_TYPE Type, __in POWER_STATE State)
__inline MdDeviceObject GetObject(VOID)
static __inline VOID MxReleaseRemoveLock(__in MdRemoveLock RemoveLock, __in PVOID Tag)
_In_ PTRANSFER_PACKET _In_ ULONG _In_ PIRP OriginalIrp
#define NT_SUCCESS(StatCode)
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
MxDeviceObject deviceObject
#define FxVerifierBugCheck(FxDriverGlobals, Error,...)
#define _Must_inspect_result_
#define UNREFERENCED_PARAMETER(P)
#define STATUS_MORE_PROCESSING_REQUIRED
#define TRACE_LEVEL_ERROR
FxPowerPolicyOwnerSettings * m_Owner
BOOLEAN m_RequestedPowerUpIrp
BOOLEAN m_RequestedPowerDownIrp
_In_ PDEVICE_OBJECT DeviceObject
_In_ PWDFDEVICE_INIT _In_ BOOLEAN IsPowerPolicyOwner
enum _WDF_DEVICE_POWER_STATE WDF_DEVICE_POWER_STATE
@ WdfDevStatePowerWakingNP
_In_ SYSTEM_POWER_STATE SystemPowerState