ReactOS  0.4.15-dev-3299-gbe8e5fc
FxPkgPnp Class Referenceabstract

#include <fxpkgpnp.hpp>

Inheritance diagram for FxPkgPnp:
Collaboration diagram for FxPkgPnp:

Public Member Functions

VOID PnpProcessEvent (__in FxPnpEvent Event, __in BOOLEAN ProcessEventOnDifferentThread=FALSE)
 
VOID PowerProcessEvent (__in FxPowerEvent Event, __in BOOLEAN ProcessEventOnDifferentThread=FALSE)
 
VOID PowerPolicyProcessEvent (__in FxPowerPolicyEvent Event, __in BOOLEAN ProcessEventOnDifferentThread=FALSE)
 
BOOLEAN ShouldProcessPnpEventOnDifferentThread (__in KIRQL CurrentIrql, __in BOOLEAN CallerSpecifiedProcessingOnDifferentThread)
 
BOOLEAN ShouldProcessPowerPolicyEventOnDifferentThread (__in KIRQL CurrentIrql, __in BOOLEAN CallerSpecifiedProcessingOnDifferentThread)
 
VOID CleanupStateMachines (__in BOOLEAN ClenaupPnp)
 
VOID CleanupDeviceFromFailedCreate (__in MxEvent *WaitEvent)
 
virtual _Must_inspect_result_ NTSTATUS Initialize (__in PWDFDEVICE_INIT DeviceInit)
 
_Must_inspect_result_ NTSTATUS PostCreateDeviceInitialize (VOID)
 
virtual VOID FinishInitialize (__inout PWDFDEVICE_INIT DeviceInit)
 
VOID SetSpecialFileSupport (__in WDF_SPECIAL_FILE_TYPE FileType, __in BOOLEAN Supported)
 
_Must_inspect_result_ NTSTATUS RegisterCallbacks (__in PWDF_PNPPOWER_EVENT_CALLBACKS DispatchTable)
 
VOID RegisterPowerPolicyCallbacks (__in PWDF_POWER_POLICY_EVENT_CALLBACKS Callbacks)
 
NTSTATUS RegisterPowerPolicyWmiInstance (__in const GUID *Guid, __in FxWmiInstanceInternalCallbacks *Callbacks, __out FxWmiInstanceInternal **Instance)
 
NTSTATUS PowerPolicySetS0IdleSettings (__in PWDF_DEVICE_POWER_POLICY_IDLE_SETTINGS Settings)
 
NTSTATUS AssignPowerFrameworkSettings (__in PWDF_POWER_FRAMEWORK_SETTINGS PowerFrameworkSettings)
 
NTSTATUS PowerPolicySetSxWakeSettings (__in PWDF_DEVICE_POWER_POLICY_WAKE_SETTINGS Settings, __in BOOLEAN ArmForWakeIfChildrenAreArmedForWake, __in BOOLEAN IndicateChildWakeOnParentWake)
 
BOOLEAN PowerIndicateWaitWakeStatus (__in NTSTATUS WaitWakeStatus)
 
BOOLEAN PowerPolicyIsWakeEnabled (VOID)
 
ULONG PowerPolicyGetCurrentWakeReason (VOID)
 
BOOLEAN __inline PowerPolicyShouldPropagateWakeStatusToChildren (VOID)
 
VOID ChildRemoved (VOID)
 
VOID PowerPolicySetS0IdleState (__in BOOLEAN State)
 
VOID PowerPolicySetSxWakeState (__in BOOLEAN State)
 
VOID SetPowerCaps (__in PWDF_DEVICE_POWER_CAPABILITIES PowerCapabilities)
 
VOID SetPnpCaps (__in PWDF_DEVICE_PNP_CAPABILITIES PnpCapabilities)
 
VOID GetPnpState (__out PWDF_DEVICE_STATE State)
 
VOID SetPnpState (__in PWDF_DEVICE_STATE State)
 
VOID SetDeviceFailed (__in WDF_DEVICE_FAILED_ACTION FailedAction)
 
VOID SetChildBusInformation (__in PPNP_BUS_INFORMATION BusInformation)
 
_Must_inspect_result_ NTSTATUS HandleQueryBusInformation (__inout FxIrp *Irp)
 
_Must_inspect_result_ NTSTATUS __inline PowerReference (__in BOOLEAN WaitForD0, __in_opt PVOID Tag=NULL, __in_opt LONG Line=0, __in_opt PSTR File=NULL)
 
VOID __inline PowerDereference (__in_opt PVOID Tag=NULL, __in_opt LONG Line=0, __in_opt PSTR File=NULL)
 
BOOLEAN HasPowerThread (VOID)
 
VOID QueueToPowerThread (__in PWORK_QUEUE_ITEM WorkItem)
 
_Must_inspect_result_ NTSTATUS AddUsageDevice (__in MdDeviceObject DependentDevice)
 
VOID RemoveUsageDevice (__in MdDeviceObject DependentDevice)
 
_Must_inspect_result_ NTSTATUS AddRemovalDevice (__in MdDeviceObject DependentDevice)
 
VOID RemoveRemovalDevice (__in MdDeviceObject DependentDevice)
 
VOID ClearRemovalDevicesList (VOID)
 
_Must_inspect_result_ NTSTATUS AllocateEnumInfo (VOID)
 
VOID AddChildList (__in FxChildList *List)
 
VOID RemoveChildList (__in FxChildList *List)
 
VOID ChildListNotifyRemove (__inout PLONG PendingCount)
 
_Must_inspect_result_ NTSTATUS AllocateDmaEnablerList (VOID)
 
VOID AddDmaEnabler (__in FxDmaEnabler *Enabler)
 
VOID RemoveDmaEnabler (__in FxDmaEnabler *Enabler)
 
VOID RevokeDmaEnablerResources (__in FxDmaEnabler *Enabler)
 
VOID AddQueryInterface (__in FxQueryInterface *QI, __in BOOLEAN Lock)
 
VOID QueryForD3ColdInterface (VOID)
 
VOID DropD3ColdInterface (VOID)
 
BOOLEAN IsPowerPolicyOwner (VOID)
 
BOOLEAN SupportsWakeInterrupt (VOID)
 
BOOLEAN IsS0IdleWakeFromS0Enabled (VOID)
 
BOOLEAN IsS0IdleSystemManaged (VOID)
 
BOOLEAN IsS0IdleUsbSSEnabled (VOID)
 
BOOLEAN IsSxWakeEnabled (VOID)
 
_Must_inspect_result_ NTSTATUS PowerPolicyCanChildPowerUp (__out PBOOLEAN PowerUp)
 
VOID PowerPolicyChildPoweredDown (VOID)
 
POWER_ACTION GetSystemPowerAction (VOID)
 
VOID ProcessDelayedDeletion (VOID)
 
VOID SignalDeviceRemovedEvent (VOID)
 
virtual NTSTATUS FireAndForgetIrp (FxIrp *Irp)=0
 
FxCmResListGetTranslatedResourceList (VOID)
 
FxCmResListGetRawResourceList (VOID)
 
ULONG GetInterruptObjectCount (VOID)
 
VOID AckPendingWakeInterruptOperation (__in BOOLEAN ProcessPowerEventOnDifferentThread)
 
VOID SendEventToAllWakeInterrupts (__in enum FxWakeInterruptEvents WakeInterruptEvent)
 
_Must_inspect_result_ NTSTATUS ValidateCmResource (__inout PCM_PARTIAL_RESOURCE_DESCRIPTOR *CmResourceRaw, __inout PCM_PARTIAL_RESOURCE_DESCRIPTOR *CmResource)
 
_Must_inspect_result_ NTSTATUS ValidateInterruptResourceCm (__in PCM_PARTIAL_RESOURCE_DESCRIPTOR CmIntResourceRaw, __in PCM_PARTIAL_RESOURCE_DESCRIPTOR CmIntResource, __in PWDF_INTERRUPT_CONFIG Configuration)
 
BOOLEAN IsDefaultReleaseHardwareOrder (VOID)
 
BOOLEAN HasMultipleInterrupts (VOID)
 
VOID WakeInterruptCreated (VOID)
 
- Public Member Functions inherited from FxPackage
 FxPackage (__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in CfxDevice *Device, __in WDFTYPE Type)
 
__inline CfxDeviceGetDevice (VOID)
 
 DECLARE_INTERNAL_NEW_OPERATOR ()
 
- Public Member Functions inherited from FxNonPagedObject
 FxNonPagedObject (__in WDFTYPE Type, __in USHORT Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals)
 
 FxNonPagedObject (__in WDFTYPE Type, __in USHORT Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxObjectType ObjectType)
 
virtual ~FxNonPagedObject (VOID)
 
 _Acquires_lock_ (this->m_NPLock.m_Lock) __drv_maxIRQL(DISPATCH_LEVEL) __drv_setsIRQL(DISPATCH_LEVEL) VOID Lock(__out __drv_deref(__drv_savesIRQL) PKIRQL PreviousIrql)
 
 _Releases_lock_ (this->m_NPLock.m_Lock) __drv_requiresIRQL(DISPATCH_LEVEL) __inline VOID Unlock(__in __drv_restoresIRQL KIRQL PreviousIrql)
 
 _Acquires_lock_ (this->m_NPLock.m_Lock) __drv_requiresIRQL(DISPATCH_LEVEL) VOID LockAtDispatch(VOID)
 
 _Requires_lock_held_ (this->m_NPLock.m_Lock) _Releases_lock_(this -> m_NPLock.m_Lock) __drv_requiresIRQL(DISPATCH_LEVEL) __inline VOID UnlockFromDispatch(VOID)
 
- Public Member Functions inherited from FxObject
PVOID GetCOMWrapper ()
 
void SetCOMWrapper (__drv_aliasesMem PVOID Wrapper)
 
 FxObject (__in WDFTYPE Type, __in USHORT Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals)
 
virtual ~FxObject (VOID)
 
PVOID __inline operator new (__in size_t Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxObjectType Type)
 
PVOID __inline operator new (__in size_t Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals, __in_opt PWDF_OBJECT_ATTRIBUTES Attributes, __in USHORT ExtraSize=0)
 
VOID operator delete (__in PVOID Memory)
 
VOID SetNoContextHeader (VOID)
 
PVOID __inline GetObjectHandle (VOID)
 
__inline FxContextHeaderGetContextHeader (VOID)
 
__inline PFX_DRIVER_GLOBALS GetDriverGlobals (VOID)
 
WDFTYPE GetType (VOID)
 
USHORT GetObjectSize (VOID)
 
LONG GetRefCnt (VOID)
 
FxTagTrackerGetTagTracker (VOID)
 
CfxDeviceGetDevice (VOID)
 
CfxDeviceBaseGetDeviceBase (VOID)
 
VOID SetDeviceBase (__in CfxDeviceBase *DeviceBase)
 
__inline VOID CallCleanup (VOID)
 
ULONG __inline AddRef (__in_opt PVOID Tag=NULL, __in LONG Line=0, __in_opt PSTR File=NULL)
 
virtual ULONG Release (__in_opt PVOID Tag=NULL, __in LONG Line=0, __in_opt PSTR File=NULL)
 
virtual ULONG AddRefOverride (__in WDFOBJECT_OFFSET Offset, __in_opt PVOID Tag=NULL, __in LONG Line=0, __in_opt PSTR File=NULL)
 
virtual ULONG ReleaseOverride (__in WDFOBJECT_OFFSET Offset, __in_opt PVOID Tag=NULL, __in LONG Line=0, __in_opt PSTR File=NULL)
 
virtual _Must_inspect_result_ NTSTATUS QueryInterface (__in FxQueryInterfaceParams *Params)
 
VOID MarkTraceState (VOID)
 
BOOLEAN __inline IsTraceState (VOID)
 
VOID __inline TraceDroppedEvent (__in FxObjectDroppedEvent Event)
 
VOID MarkPassiveDispose (__in FxObjectLockState State=ObjectLock)
 
VOID MarkPassiveCallbacks (__in FxObjectLockState State=ObjectLock)
 
VOID MarkForceDisposeThread (__in FxObjectLockState State=ObjectLock)
 
BOOLEAN IsPassiveCallbacks (__in BOOLEAN AcquireLock=TRUE)
 
BOOLEAN IsPassiveDispose (__in BOOLEAN AcquireLock=TRUE)
 
BOOLEAN IsForceDisposeThread (__in BOOLEAN AcquireLock=TRUE)
 
VOID MarkCommitted (VOID)
 
BOOLEAN IsCommitted (VOID)
 
VOID MarkDisposeOverride (__in FxObjectLockState State=ObjectLock)
 
VOID MarkNoDeleteDDI (__in FxObjectLockState State=ObjectLock)
 
BOOLEAN IsNoDeleteDDI (VOID)
 
_Must_inspect_result_ NTSTATUS Commit (__in_opt PWDF_OBJECT_ATTRIBUTES Attributes, __out_opt WDFOBJECT *ObjectHandle, __in_opt FxObject *Parent=NULL, __in BOOLEAN AssignDriverAsDefaultParent=TRUE)
 
VOID DeleteFromFailedCreate (VOID)
 
VOID ClearEvtCallbacks (VOID)
 
BOOLEAN EarlyDispose (VOID)
 
virtual VOID DeleteObject (VOID)
 
_Must_inspect_result_ NTSTATUS AssignParentObject (__in FxObject *ParentObject)
 
_Must_inspect_result_ NTSTATUS AddContext (__in FxContextHeader *Header, __in PVOID *Context, __in PWDF_OBJECT_ATTRIBUTES Attributes)
 
_Must_inspect_result_ NTSTATUS RemoveParentAssignment (VOID)
 
_Must_inspect_result_ FxObjectGetParentObjectReferenced (__in PVOID Tag)
 
BOOLEAN IsDisposed (VOID)
 

Public Attributes

FxPnpStateAndCaps m_PnpStateAndCaps
 
ULONG m_PnpCapsAddress
 
ULONG m_PnpCapsUINumber
 
FxPowerCaps m_PowerCaps
 
BOOLEAN m_Failed
 
BYTE m_SystemPowerState
 
BYTE m_DevicePowerState
 
BYTE m_DevicePowerStateOld
 
FxRelatedDeviceListm_UsageDependentDeviceList
 
FxRelatedDeviceListm_RemovalDeviceList
 
FxWaitLockInternal m_QueryInterfaceLock
 
SINGLE_LIST_ENTRY m_QueryInterfaceHead
 
FxWaitLockInternal m_DeviceInterfaceLock
 
SINGLE_LIST_ENTRY m_DeviceInterfaceHead
 
BOOLEAN m_DeviceInterfacesCanBeEnabled
 
BOOLEAN m_SpecialSupport [WdfSpecialFileMax-1]
 
LONG m_SpecialFileCount [WdfSpecialFileMax-1]
 
ULONG m_DeviceStopCount
 
FxPnpMachine m_PnpMachine
 
FxPowerMachine m_PowerMachine
 
FxPowerPolicyMachine m_PowerPolicyMachine
 
FxSelfManagedIoMachinem_SelfManagedIoMachine
 
SharedPowerData m_SharedPower
 
D3COLD_SUPPORT_INTERFACE m_D3ColdInterface
 
FxPnpDeviceUsageNotification m_DeviceUsageNotification
 
FxPnpDeviceUsageNotificationEx m_DeviceUsageNotificationEx
 
FxPnpDeviceRelationsQuery m_DeviceRelationsQuery
 
FxPnpDeviceD0Entry m_DeviceD0Entry
 
FxPnpDeviceD0EntryPostInterruptsEnabled m_DeviceD0EntryPostInterruptsEnabled
 
FxPnpDeviceD0ExitPreInterruptsDisabled m_DeviceD0ExitPreInterruptsDisabled
 
FxPnpDeviceD0Exit m_DeviceD0Exit
 
FxPnpDevicePrepareHardware m_DevicePrepareHardware
 
FxPnpDeviceReleaseHardware m_DeviceReleaseHardware
 
FxPnpDeviceQueryStop m_DeviceQueryStop
 
FxPnpDeviceQueryRemove m_DeviceQueryRemove
 
FxPnpDeviceSurpriseRemoval m_DeviceSurpriseRemoval
 

Protected Member Functions

 FxPkgPnp (__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in CfxDevice *Device, __in WDFTYPE Type)
 
 ~FxPkgPnp ()
 
virtual BOOLEAN Dispose (VOID)
 
virtual _Must_inspect_result_ NTSTATUS Dispatch (__in MdIrp Irp)
 
virtual const PFN_PNP_POWER_CALLBACKGetDispatchPnp (VOID)=0
 
virtual const PFN_PNP_POWER_CALLBACKGetDispatchPower (VOID)=0
 
VOID DeleteDevice (VOID)
 
VOID SetInternalFailure (VOID)
 
NTSTATUS CompletePowerRequest (__inout FxIrp *Irp, __in NTSTATUS Status)
 
NTSTATUS CompletePnpRequest (__inout FxIrp *Irp, __in NTSTATUS Status)
 
PNP_DEVICE_STATE HandleQueryPnpDeviceState (__in PNP_DEVICE_STATE PnpDeviceState)
 
_Must_inspect_result_ NTSTATUS HandleQueryBusRelations (__inout FxIrp *Irp)
 
_Must_inspect_result_ NTSTATUS HandleQueryDeviceRelations (__inout FxIrp *Irp, __inout FxRelatedDeviceList *List)
 
_Must_inspect_result_ NTSTATUS HandleQueryInterface (__inout FxIrp *Irp, __out PBOOLEAN CompleteRequest)
 
_Must_inspect_result_ NTSTATUS QueryForCapabilities (VOID)
 
VOID PnpAssignInterruptsSyncIrql (VOID)
 
_Must_inspect_result_ NTSTATUS PnpMatchResources (VOID)
 
 __drv_when (!NT_SUCCESS(return), __drv_arg(ResourcesMatched, _Must_inspect_result_)) NTSTATUS PnpPrepareHardware(__out PBOOLEAN ResourcesMatched)
 
_Must_inspect_result_ NTSTATUS PnpPrepareHardwareInternal (VOID)
 
_Must_inspect_result_ NTSTATUS PnpReleaseHardware (VOID)
 
_Must_inspect_result_ NTSTATUS PnpEnableInterfacesAndRegisterWmi (VOID)
 
_Must_inspect_result_ NTSTATUS PnpSurpriseRemoval (__inout FxIrp *Irp)
 
NTSTATUS FilterResourceRequirements (__in IO_RESOURCE_REQUIREMENTS_LIST **IoList)
 
virtual VOID PowerReleasePendingDeviceIrp (BOOLEAN IrpMustBePresent=TRUE)=0
 
VOID AddInterruptObject (__in FxInterrupt *Interrupt)
 
VOID RemoveInterruptObject (__in FxInterrupt *Interrupt)
 
VOID PnpProcessEventInner (__inout FxPostProcessInfo *Info)
 
VOID PowerProcessEventInner (__inout FxPostProcessInfo *Info)
 
VOID PowerPolicyProcessEventInner (__inout FxPostProcessInfo *Info)
 
VOID PnpEnterNewState (__in WDF_DEVICE_PNP_STATE State)
 
VOID PowerEnterNewState (__in WDF_DEVICE_POWER_STATE State)
 
VOID PowerPolicyEnterNewState (__in WDF_DEVICE_POWER_POLICY_STATE State)
 
VOID NotPowerPolicyOwnerEnterNewState (__in WDF_DEVICE_POWER_POLICY_STATE NewState)
 
_Must_inspect_result_ NTSTATUS DispatchWaitWake (__inout FxIrp *Irp)
 
VOID SaveState (__in BOOLEAN UseCanSaveState)
 
_Must_inspect_result_ NTSTATUS PnpDeviceUsageNotification (__inout FxIrp *Irp)
 
LONG GetPnpStateInternal (VOID)
 
LONG GetPnpCapsInternal (VOID)
 
virtual BOOLEAN PnpSendStartDeviceDownTheStackOverload (VOID)=0
 
virtual WDF_DEVICE_PNP_STATE PnpEventCheckForDevicePresenceOverload (VOID)=0
 
virtual WDF_DEVICE_PNP_STATE PnpEventEjectHardwareOverload (VOID)=0
 
virtual WDF_DEVICE_PNP_STATE PnpGetPostRemoveState (VOID)=0
 
virtual WDF_DEVICE_PNP_STATE PnpEventPdoRemovedOverload (VOID)=0
 
virtual WDF_DEVICE_PNP_STATE PnpEventFdoRemovedOverload (VOID)=0
 
virtual VOID PnpEventSurpriseRemovePendingOverload (VOID)
 
VOID PnpEventRemovedCommonCode (VOID)
 
VOID PnpPowerPolicyStart (VOID)
 
VOID PnpPowerPolicyStop (VOID)
 
VOID PnpPowerPolicySurpriseRemove (VOID)
 
VOID PnpPowerPolicyRemove (VOID)
 
VOID PnpFinishProcessingIrp (__in BOOLEAN IrpMustBePresent=TRUE)
 
VOID PnpDisableInterfaces (VOID)
 
virtual NTSTATUS SendIrpSynchronously (FxIrp *Irp)=0
 
virtual WDF_DEVICE_POWER_STATE PowerCheckDeviceTypeOverload (VOID)=0
 
virtual WDF_DEVICE_POWER_STATE PowerCheckDeviceTypeNPOverload (VOID)=0
 
virtual NTSTATUS PowerCheckParentOverload (BOOLEAN *ParentOn)=0
 
virtual NTSTATUS PowerEnableWakeAtBusOverload (VOID)
 
virtual VOID PowerDisableWakeAtBusOverload (VOID)
 
virtual VOID PowerParentPowerDereference (VOID)=0
 
VOID PowerGotoDx (VOID)
 
BOOLEAN PowerGotoDxIoStopped (VOID)
 
BOOLEAN PowerGotoDxIoStoppedNP (VOID)
 
BOOLEAN PowerDmaEnableAndScan (__in BOOLEAN ImplicitPowerUp)
 
VOID PowerCompletePendedWakeIrp (VOID)
 
VOID PowerCompleteWakeRequestFromWithinMachine (__in NTSTATUS Status)
 
BOOLEAN PowerMakeWakeRequestNonCancelable (__in NTSTATUS Status)
 
BOOLEAN PowerIsWakeRequestPresent (VOID)
 
VOID PowerSendIdlePowerEvent (__in FxPowerIdleEvents Event)
 
VOID PowerSendPowerDownEvents (__in FxPowerDownType Type)
 
VOID PowerSendPowerUpEvents (VOID)
 
VOID PowerSendPowerDownFailureEvent (__in FxPowerDownType Type)
 
VOID PowerSendPowerUpFailureEvent (VOID)
 
VOID PowerSetDevicePowerState (__in WDF_POWER_DEVICE_STATE State)
 
_Must_inspect_result_ BOOLEAN PowerDmaPowerUp (VOID)
 
BOOLEAN PowerDmaPowerDown (VOID)
 
VOID PowerConnectInterruptFailed (VOID)
 
VOID PowerPolicyUpdateSystemWakeSource (__in FxIrp *Irp)
 
_Must_inspect_result_ NTSTATUS PowerPolicySendDevicePowerRequest (__in DEVICE_POWER_STATE DeviceState, __in SendDeviceRequestAction Action)
 
_Must_inspect_result_ NTSTATUS PowerPolicySendWaitWakeRequest (__in SYSTEM_POWER_STATE SystemState)
 
VOID PowerPolicyCompleteSystemPowerIrp (VOID)
 
BOOLEAN PowerPolicyCancelWaitWake (VOID)
 
VOID PowerPolicySubmitUsbIdleNotification (VOID)
 
BOOLEAN PowerPolicyCancelUsbSSIfCapable (VOID)
 
VOID PowerPolicyCancelUsbSS (VOID)
 
SYSTEM_POWER_STATE PowerPolicyGetPendingSystemState (VOID)
 
_Must_inspect_result_ NTSTATUS PowerPolicyHandleSystemQueryPower (__in SYSTEM_POWER_STATE QueryState)
 
BOOLEAN PowerPolicyCanWakeFromSystemState (__in SYSTEM_POWER_STATE SystemState)
 
SYSTEM_POWER_STATE PowerPolicyGetDeviceDeepestSystemWakeState (VOID)
 
DEVICE_POWER_STATE PowerPolicyGetDeviceDeepestDeviceWakeState (__in SYSTEM_POWER_STATE SystemState)
 
BOOLEAN IsPresentPendingPnpIrp (VOID)
 
VOID SetPendingPnpIrp (__inout FxIrp *Irp, __in BOOLEAN MarkIrpPending=TRUE)
 
VOID SetPendingPnpIrpStatus (__in NTSTATUS Status)
 
MdIrp ClearPendingPnpIrp (VOID)
 
MdIrp GetPendingPnpIrp (VOID)
 
VOID SetPendingDevicePowerIrp (__inout FxIrp *Irp)
 
MdIrp ClearPendingDevicePowerIrp (VOID)
 
VOID SetPendingSystemPowerIrp (__inout FxIrp *Irp)
 
MdIrp ClearPendingSystemPowerIrp (VOID)
 
MdIrp GetPendingSystemPowerIrp (VOID)
 
BOOLEAN IsDevicePowerUpIrpPending (VOID)
 
BOOLEAN IsUsageSupported (__in DEVICE_USAGE_NOTIFICATION_TYPE Usage)
 
VOID SetUsageSupport (__in DEVICE_USAGE_NOTIFICATION_TYPE Usage, __in BOOLEAN Supported)
 
LONG AdjustUsageCount (__in DEVICE_USAGE_NOTIFICATION_TYPE Usage, __in BOOLEAN Add)
 
LONG GetUsageCount (__in __range(1, 4) ULONG Usage)
 
BOOLEAN IsInSpecialUse (VOID)
 
ULONG SetUsageNotificationFlags (__in DEVICE_USAGE_NOTIFICATION_TYPE Type, __in BOOLEAN InPath)
 
VOID RevertUsageNotificationFlags (__in DEVICE_USAGE_NOTIFICATION_TYPE Type, __in BOOLEAN InPath, __in ULONG OldFlags)
 
VOID CommitUsageNotification (__in DEVICE_USAGE_NOTIFICATION_TYPE Type, __in ULONG OldFlags)
 
_Must_inspect_result_ NTSTATUS CreatePowerThread (VOID)
 
- Protected Member Functions inherited from FxObject
 FxObject (__in WDFTYPE Type, __in USHORT Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxObjectType ObjectType)
 
FxObjectDebugExtensionGetDebugExtension (VOID)
 
BOOLEAN IsDebug (VOID)
 
VOID AllocateTagTracker (__in WDFTYPE Type)
 
virtual VOID SelfDestruct (VOID)
 
PVOID __inline GetObjectHandleUnchecked (VOID)
 
VOID __inline DestroyChildren (VOID)
 
VOID DeleteEarlyDisposedObject (VOID)
 

Static Protected Member Functions

static _Must_inspect_result_ NTSTATUS _PnpStartDevice (__inout FxPkgPnp *This, __inout FxIrp *Irp)
 
static _Must_inspect_result_ NTSTATUS _PnpQueryStopDevice (__inout FxPkgPnp *This, __inout FxIrp *Irp)
 
static _Must_inspect_result_ NTSTATUS _PnpCancelStopDevice (__inout FxPkgPnp *This, __inout FxIrp *Irp)
 
static _Must_inspect_result_ NTSTATUS _PnpStopDevice (__inout FxPkgPnp *This, __inout FxIrp *Irp)
 
static _Must_inspect_result_ NTSTATUS _PnpQueryRemoveDevice (__inout FxPkgPnp *This, __inout FxIrp *Irp)
 
static _Must_inspect_result_ NTSTATUS _PnpCancelRemoveDevice (__inout FxPkgPnp *This, __inout FxIrp *Irp)
 
static _Must_inspect_result_ NTSTATUS _PnpRemoveDevice (__inout FxPkgPnp *This, __inout FxIrp *Irp)
 
static VOID _PnpProcessEventInner (__inout FxPkgPnp *This, __inout FxPostProcessInfo *Info, __in PVOID WorkerContext)
 
static VOID _PowerProcessEventInner (__in FxPkgPnp *This, __in FxPostProcessInfo *Info, __in PVOID WorkerContext)
 
static VOID _PowerPolicyProcessEventInner (__inout FxPkgPnp *This, __inout FxPostProcessInfo *Info, __in PVOID WorkerContext)
 
static _Must_inspect_result_ NTSTATUS _DispatchWaitWake (__inout FxPkgPnp *This, __inout FxIrp *Irp)
 
static _Must_inspect_result_ NTSTATUS _PnpDeviceUsageNotification (__inout FxPkgPnp *This, __inout FxIrp *Irp)
 
static VOID _SetPowerCapState (__in ULONG Index, __in DEVICE_POWER_STATE State, __out PULONG Result)
 
static DEVICE_POWER_STATE _GetPowerCapState (__in ULONG Index, __in ULONG State)
 
static WDF_DEVICE_PNP_STATE PnpEventCheckForDevicePresence (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventEjectHardware (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventInitStarting (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventInitSurpriseRemoved (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventHardwareAvailable (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventEnableInterfaces (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventHardwareAvailablePowerPolicyFailed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventQueryRemoveAskDriver (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventQueryRemoveEnsureDeviceAwake (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventQueryRemovePending (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventQueryRemoveStaticCheck (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventQueriedRemoving (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventQueryStopAskDriver (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventQueryStopEnsureDeviceAwake (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventQueryStopPending (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventQueryStopStaticCheck (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventQueryCanceled (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventRemoved (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventPdoRemoved (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventRemovedPdoWait (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventRemovedPdoSurpriseRemoved (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventRemovingDisableInterfaces (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventRestarting (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventStarted (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventStartedCancelStop (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventStartedCancelRemove (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventStartedRemoving (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventStartingFromStopped (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventStopped (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventStoppedWaitForStartCompletion (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventStartedStopping (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventSurpriseRemoved (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventInitQueryRemove (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventInitQueryRemoveCanceled (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventFdoRemoved (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventQueriedSurpriseRemove (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventSurpriseRemoveIoStarted (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventFailedPowerDown (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventFailedIoStarting (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventFailedOwnHardware (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventFailed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventFailedPowerPolicyRemoved (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventFailedSurpriseRemoved (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventFailedStarted (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventFailedInit (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventPdoInitFailed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventRestart (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventRestartReleaseHardware (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventRestartHardwareAvailable (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventPdoRestart (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventRemovedChildrenRemoved (__inout FxPkgPnp *This)
 
static WDF_DEVICE_PNP_STATE PnpEventFinal (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerCheckDeviceType (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerCheckDeviceTypeNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerEnablingWakeAtBus (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerEnablingWakeAtBusNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerCheckParentState (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerCheckParentStateNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerDZero (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerD0NP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerD0BusWakeOwner (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerD0BusWakeOwnerNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerD0ArmedForWake (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerD0ArmedForWakeNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerGotoImplicitD3DisarmWakeAtBus (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerD0DisarmingWakeAtBus (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerD0DisarmingWakeAtBusNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerD0Starting (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerD0StartingConnectInterrupt (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerD0StartingDmaEnable (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerD0StartingStartSelfManagedIo (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerDecideD0State (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerGotoD3Stopped (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerStartingCheckDeviceType (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerStartingChild (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerDxDisablingWakeAtBus (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerDxDisablingWakeAtBusNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerGotoDNotZero (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerGotoDNotZeroNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerGotoDNotZeroIoStopped (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerGotoDNotZeroIoStoppedNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerGotoDxNPFailed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerGotoDxArmedForWake (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerGotoDxArmedForWakeNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerDNotZeroNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerGotoDxIoStoppedArmedForWake (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerGotoDxIoStoppedArmedForWakeNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerCheckParentStateArmedForWake (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerCheckParentStateArmedForWakeNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerStartSelfManagedIo (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerStartSelfManagedIoNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerStartSelfManagedIoFailed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerStartSelfManagedIoFailedNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerWakePending (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerWakePendingNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerWaking (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerWakingNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerWakingConnectInterrupt (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerWakingConnectInterruptNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerWakingConnectInterruptFailed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerWakingConnectInterruptFailedNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerWakingDmaEnable (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerWakingDmaEnableNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerWakingDmaEnableFailed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerWakingDmaEnableFailedNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerReportPowerUpFailedDerefParent (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerReportPowerUpFailed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerPowerFailedPowerDown (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerReportPowerDownFailed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerInitialConnectInterruptFailed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerInitialDmaEnableFailed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerInitialSelfManagedIoFailed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerInitialPowerUpFailedDerefParent (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerInitialPowerUpFailed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerDxSurpriseRemovedPowerDown (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerDxSurpriseRemovedPowerUp (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerDxStoppedDisarmWake (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerDxStoppedDisarmWakeNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerGotoDxStoppedDisableInterruptNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerGotoDxStopped (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerGotoStopped (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerStoppedCompleteDx (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerDxStoppedDecideDxState (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerDxStoppedArmForWake (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerDxStoppedArmForWakeNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerFinalPowerDownFailed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerD0SurpriseRemoved (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerSurpriseRemoved (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerUpFailedDerefParent (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerUpFailed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerGotoDxFailed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerGotoDxStoppedDisableInterrupt (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerUpFailedDerefParentNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerUpFailedNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerNotifyingD0ExitToWakeInterrupts (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerNotifyingD0EntryToWakeInterrupts (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerNotifyingD0ExitToWakeInterruptsNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_STATE PowerNotifyingD0EntryToWakeInterruptsNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStarting (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStartingPoweredUp (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStartingPoweredUpFailed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStartingSucceeded (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStartingFailed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStartingDecideS0Wake (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStartedIdleCapable (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolIdleCapableDeviceIdle (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolDeviceIdleReturnToActive (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolDeviceIdleSleeping (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolDeviceIdleStopping (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredNoWake (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredNoWakeCompletePowerDown (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolWaitingUnarmedQueryIdle (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolS0NoWakePowerUp (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolS0NoWakeCompletePowerUp (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemSleepFromDeviceWaitingUnarmed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemSleepNeedWake (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemSleepNeedWakeCompletePowerUp (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemSleepPowerRequestFailed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolCheckPowerPageable (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSleepingWakeWakeArrived (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSleepingWakeRevertArmWake (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemAsleepWakeArmed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemWakeDeviceWakeEnabled (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemWakeDeviceWakeEnabledWakeCanceled (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemWakeDeviceWakeDisarm (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemWakeDeviceWakeTriggeredS0 (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemWakeDeviceWokeDisarm (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSleepingWakeWakeArrivedNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSleepingWakeRevertArmWakeNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSleepingWakePowerDownFailed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSleepingWakePowerDownFailedWakeCanceled (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemAsleepWakeArmedNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemWakeDeviceWakeEnabledNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemWakeDeviceWakeEnabledWakeCanceledNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemWakeDeviceWakeDisarmNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemWakeDeviceWakeTriggeredS0NP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemWakeDeviceWokeDisarmNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemWakeDeviceWakeCompletePowerUp (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSleeping (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSleepingNoWakePowerDown (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSleepingNoWakeCompletePowerDown (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSleepingNoWakeDxRequestFailed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSleepingWakePowerDown (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSleepingSendWake (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemAsleepNoWake (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemWakeDeviceWakeDisabled (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemWakeDeviceToD0 (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemWakeDeviceToD0CompletePowerUp (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemWakeQueryIdle (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStartedWakeCapable (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolWakeCapableDeviceIdle (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolWakeCapableUsbSSCompleted (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredDecideUsbSS (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCapablePowerDown (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCapableSendWake (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCapableUsbSS (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCapableWakeArrived (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCapableCancelWake (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCapableWakeCanceled (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCapableCleanup (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCapableDxAllocFailed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCapableUndoPowerDown (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCompletedPowerDown (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCompletedPowerUp (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCompletedHardwareStarted (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolWaitingArmedUsbSS (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolWaitingArmedQueryIdle (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolIoPresentArmed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolIoPresentArmedWakeCanceled (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolS0WakeDisarm (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolS0WakeCompletePowerUp (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeSucceeded (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCompletedDisarm (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolWakeFailedUsbSS (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCapablePowerDownFailedCancelWake (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCapablePowerDownFailedWakeCanceled (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCapablePowerDownFailedUsbSS (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolCancelingWakeForSystemSleep (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolCancelingWakeForSystemSleepWakeCanceled (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolDisarmingWakeForSystemSleepCompletePowerUp (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolPowerUpForSystemSleepFailed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolWokeFromS0UsbSS (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolWokeFromS0 (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolWokeFromS0NotifyDriver (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStoppingResetDevice (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStoppingResetDeviceCompletePowerUp (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStoppingResetDeviceFailed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStoppingD0 (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStoppingD0Failed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStoppingDisarmWake (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStoppingDisarmWakeCancelWake (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStoppingDisarmWakeWakeCanceled (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStopping (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStoppingSucceeded (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStoppingFailed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStoppingSendStatus (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStoppedRemoving (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolRemoved (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolRestarting (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolRestartingFailed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStoppingCancelTimer (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStoppingCancelUsbSS (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStoppingCancelWake (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolCancelUsbSS (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStarted (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStartedCancelTimer (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStartedWakeCapableCancelTimerForSleep (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStartedWakeCapableSleepingUsbSS (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStartedIdleCapableCancelTimerForSleep (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolDeviceD0PowerRequestFailed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolDevicePowerRequestFailed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSleepingPowerDownNotProcessed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCapablePowerDownNotProcessed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredNoWakePowerDownNotProcessed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredNoWakeUndoPowerDown (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredNoWakeReturnToActive (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredNoWakePoweredDownDisableIdleTimer (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolPowerUpForSystemSleepNotSeen (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolWaitingArmedStoppingCancelUsbSS (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolWaitingArmedWakeFailedCancelUsbSS (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolWaitingArmedIoPresentCancelUsbSS (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolWaitingArmedWakeSucceededCancelUsbSS (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolCancelingUsbSSForSystemSleep (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolStoppingD0CancelUsbSS (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolWaitingArmedWakeInterruptFired (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemWakeDeviceWakeInterruptFired (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolSystemWakeDeviceWakeInterruptFiredNP (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE PowerPolTimerExpiredWakeCapableWakeInterruptArrived (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE NotPowerPolOwnerStarting (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE NotPowerPolOwnerStarted (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE NotPowerPolOwnerGotoDx (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE NotPowerPolOwnerGotoDxInDx (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE NotPowerPolOwnerGotoD0 (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE NotPowerPolOwnerGotoD0InD0 (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE NotPowerPolOwnerStopping (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE NotPowerPolOwnerStoppingSendStatus (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE NotPowerPolOwnerStartingFailed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE NotPowerPolOwnerStoppingFailed (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE NotPowerPolOwnerStoppingPoweringUp (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE NotPowerPolOwnerStoppingPoweringDown (__inout FxPkgPnp *This)
 
static WDF_DEVICE_POWER_POLICY_STATE NotPowerPolOwnerRemoved (__inout FxPkgPnp *This)
 
static VOID _PowerSetSystemWakeSource (__in FxIrp *Irp)
 
static CPPNP_STATE_TABLE GetPnpTableEntry (__in WDF_DEVICE_PNP_STATE State)
 
static CPPOWER_STATE_TABLE GetPowerTableEntry (__in WDF_DEVICE_POWER_STATE State)
 
static CPPOWER_POLICY_STATE_TABLE GetPowerPolicyTableEntry (__in WDF_DEVICE_POWER_POLICY_STATE State)
 
static _Must_inspect_result_ CPNOT_POWER_POLICY_OWNER_STATE_TABLE GetNotPowerPolicyOwnerTableEntry (__in WDF_DEVICE_POWER_POLICY_STATE State)
 
static NTSTATUS _S0IdleQueryInstance (__in CfxDevice *Device, __in FxWmiInstanceInternal *Instance, __in ULONG OutBufferSize, __out PVOID OutBuffer, __out PULONG BufferUsed)
 
static NTSTATUS _S0IdleSetInstance (__in CfxDevice *Device, __in FxWmiInstanceInternal *Instance, __in ULONG InBufferSize, __in PVOID InBuffer)
 
static NTSTATUS _S0IdleSetItem (__in CfxDevice *Device, __in FxWmiInstanceInternal *Instance, __in ULONG DataItemId, __in ULONG InBufferSize, __in PVOID InBuffer)
 
static NTSTATUS _SxWakeQueryInstance (__in CfxDevice *Device, __in FxWmiInstanceInternal *Instaace, __in ULONG OutBufferSize, __out PVOID OutBuffer, __out PULONG BufferUsed)
 
static NTSTATUS _SxWakeSetInstance (__in CfxDevice *Device, __in FxWmiInstanceInternal *Instance, __in ULONG InBufferSize, __in PVOID InBuffer)
 
static NTSTATUS _SxWakeSetItem (__in CfxDevice *Device, __in FxWmiInstanceInternal *Instance, __in ULONG DataItemId, __in ULONG InBufferSize, __in PVOID InBuffer)
 
static DEVICE_USAGE_NOTIFICATION_TYPE _SpecialTypeToUsage (__in WDF_SPECIAL_FILE_TYPE Type)
 
static WDF_SPECIAL_FILE_TYPE _UsageToSpecialType (__in DEVICE_USAGE_NOTIFICATION_TYPE Type)
 
- Static Protected Member Functions inherited from FxObject
static PVOID _GetBase (__in FxObject *Object)
 

Protected Attributes

MxEventm_DeviceRemoveProcessed
 
LONG m_PendingChildCount
 
BYTE m_DeviceWake [DeviceWakeStates]
 
BYTE m_SystemWake
 
BYTE m_FailedAction
 
BYTE m_SetDeviceRemoveProcessed
 
POWER_THREAD_INTERFACE m_PowerThreadInterface
 
FxEnumerationInfom_EnumInfo
 
FxCmResListm_Resources
 
FxCmResListm_ResourcesRaw
 
FxSpinLockTransactionedListm_DmaEnablerList
 
PNP_BUS_INFORMATION m_BusInformation
 
UCHAR m_BusEnumRetries
 
UCHAR m_SystemPowerAction
 
BOOLEAN m_CapsQueried
 
BOOLEAN m_InternalFailure
 
BOOLEAN m_HasPowerThread
 
BOOLEAN m_ReleaseHardwareAfterDescendantsOnFailure
 
PFN_IO_CONNECT_INTERRUPT_EX m_IoConnectInterruptEx
 
PFN_IO_DISCONNECT_INTERRUPT_EX m_IoDisconnectInterruptEx
 
PFN_IO_REPORT_INTERRUPT_ACTIVE m_IoReportInterruptActive
 
PFN_IO_REPORT_INTERRUPT_INACTIVE m_IoReportInterruptInactive
 
- Protected Attributes inherited from FxObject
union {
   CfxDeviceBase *   m_DeviceBase
 
   CfxDevice *   m_Device
 
}; 
 

Static Protected Attributes

static MdCancelRoutineType _PowerWaitWakeCancelRoutine
 
static MdRequestPowerCompleteType _PowerPolDeviceWaitWakeComplete
 
static MdRequestPowerCompleteType _PowerPolDevicePowerDownComplete
 
static MdRequestPowerCompleteType _PowerPolDevicePowerUpComplete
 
static MdCompletionRoutineType _PowerPolicyWaitWakeCompletionRoutine
 
static MdCompletionRoutineType _PowerPolicyUsbSelectiveSuspendCompletionRoutine
 
static const GUID GUID_POWER_THREAD_INTERFACE
 

Private Member Functions

VOID DisconnectInterruptNP (VOID)
 
NTSTATUS UpdateWmiInstanceForS0Idle (__in FxWmiInstanceAction Action)
 
VOID ReadRegistryS0Idle (__in PCUNICODE_STRING ValueName, __out BOOLEAN *Enabled)
 
NTSTATUS UpdateWmiInstanceForSxWake (__in FxWmiInstanceAction Action)
 
VOID ReadRegistrySxWake (__in PCUNICODE_STRING ValueName, __out BOOLEAN *Enabled)
 
VOID WriteStateToRegistry (__in HANDLE RegKey, __in PUNICODE_STRING ValueName, __in ULONG Value)
 
NTSTATUS ReadStateFromRegistry (_In_ PCUNICODE_STRING ValueName, _Out_ PULONG Value)
 
NTSTATUS UpdateWmiInstance (_In_ FxWmiInstanceAction Action, _In_ BOOLEAN ForS0Idle)
 
VOID PowerPolicyCheckAssumptions (VOID)
 
VOID PowerCheckAssumptions (VOID)
 
VOID PnpCheckAssumptions (VOID)
 
VOID NotifyResourceobjectsToReleaseResources (VOID)
 
_Must_inspect_result_ NTSTATUS NotifyResourceObjectsD0 (__in ULONG NotifyFlags)
 
NTSTATUS NotifyResourceObjectsDx (__in ULONG NotifyFlags)
 
BOOLEAN PnpCheckAndIncrementRestartCount (VOID)
 
BOOLEAN PnpIncrementRestartCountLogic (_In_ HANDLE RestartKey, _In_ BOOLEAN CreatedNewKey)
 
VOID PnpCleanupForRemove (__in BOOLEAN GracefulRemove)
 
virtual NTSTATUS ProcessRemoveDeviceOverload (FxIrp *Irp)=0
 
virtual VOID DeleteSymbolicLinkOverload (BOOLEAN GracefulRemove)=0
 
virtual VOID QueryForReenumerationInterface (VOID)=0
 
virtual VOID ReleaseReenumerationInterface (VOID)=0
 
virtual NTSTATUS AskParentToRemoveAndReenumerate (VOID)=0
 
_Must_inspect_result_ NTSTATUS CreatePowerThreadIfNeeded (VOID)
 
virtual NTSTATUS QueryForPowerThread (VOID)=0
 
VOID ReleasePowerThread (VOID)
 
_Must_inspect_result_ NTSTATUS HandleQueryInterfaceForPowerThread (__inout FxIrp *Irp, __out PBOOLEAN CompleteRequest)
 
_Must_inspect_result_ NTSTATUS PnpPowerReferenceSelf (VOID)
 
VOID PnpPowerDereferenceSelf (VOID)
 
BOOLEAN PowerPolicyCanIdlePowerDown (__in DEVICE_POWER_STATE DxState)
 
VOID PowerPolicyPostParentToD0ToChildren (VOID)
 
VOID PowerPolicyChildrenCanPowerUp (VOID)
 
VOID __inline PowerPolicyDisarmWakeFromSx (VOID)
 
_Must_inspect_result_ NTSTATUS PowerPolicyPowerDownForSx (__in DEVICE_POWER_STATE DxState, __in SendDeviceRequestAction Action)
 
VOID PowerPolicyBlockChildrenPowerUp (VOID)
 
_Must_inspect_result_ NTSTATUS PnpPowerReferenceDuringQueryPnp (VOID)
 

Static Private Member Functions

static VOID _PowerThreadEnqueue (__in PVOID Context, __in PWORK_QUEUE_ITEM WorkItem)
 
static VOID STDCALL _PowerThreadInterfaceReference (__inout PVOID Context)
 
static VOID STDCALL _PowerThreadInterfaceDereference (__inout PVOID Context)
 

Private Attributes

friend FxPnpMachine
 
friend FxPowerMachine
 
friend FxPowerPolicyMachine
 
friend FxPowerPolicyOwnerSettings
 
friend FxInterrupt
 
FxCREvent m_CleanupEventUm
 
MxEvent m_RemoveEventUm
 
ULONG m_InterruptObjectCount
 
LIST_ENTRY m_InterruptListHead
 
ULONG m_WakeInterruptCount
 
ULONG m_WakeInterruptPendingAckCount
 
BOOLEAN m_SystemWokenByWakeInterrupt
 
BOOLEAN m_WakeInterruptsKeepConnected
 
BOOLEAN m_AchievedStart
 
FxSystemThreadm_PowerThread
 
LONG m_PowerThreadInterfaceReferenceCount
 
FxCREventm_PowerThreadEvent
 
MdIrp m_PendingPnPIrp
 
MdIrp m_PendingSystemPowerIrp
 
MdIrp m_PendingDevicePowerIrp
 
FxPnpStateCallbackm_PnpStateCallbacks
 
FxPowerStateCallbackm_PowerStateCallbacks
 
FxPowerPolicyStateCallbackm_PowerPolicyStateCallbacks
 

Static Private Attributes

static const PNP_STATE_TABLE m_WdfPnpStates []
 
static const POWER_STATE_TABLE m_WdfPowerStates []
 
static const POWER_POLICY_STATE_TABLE m_WdfPowerPolicyStates []
 
static const NOT_POWER_POLICY_OWNER_STATE_TABLE m_WdfNotPowerPolicyOwnerStates []
 
static const PNP_EVENT_TARGET_STATE m_PnpInitOtherStates []
 
static const PNP_EVENT_TARGET_STATE m_PnpInitStartingOtherStates []
 
static const PNP_EVENT_TARGET_STATE m_PnpHardwareAvailableOtherStates []
 
static const PNP_EVENT_TARGET_STATE m_PnpQueryStopPendingOtherStates []
 
static const PNP_EVENT_TARGET_STATE m_PnpRemovedPdoWaitOtherStates []
 
static const PNP_EVENT_TARGET_STATE m_PnpRestartingOtherStates []
 
static const PNP_EVENT_TARGET_STATE m_PnpStartedOtherStates []
 
static const PNP_EVENT_TARGET_STATE m_PnpQueryRemovePendingOtherStates []
 
static const PNP_EVENT_TARGET_STATE m_PnpQueriedRemovingOtherStates []
 
static const PNP_EVENT_TARGET_STATE m_PnpInitQueryRemoveOtherStates []
 
static const PNP_EVENT_TARGET_STATE m_PnpStoppedOtherStates []
 
static const PNP_EVENT_TARGET_STATE m_PnpStoppedWaitForStartCompletionOtherStates []
 
static const PNP_EVENT_TARGET_STATE m_PnpStartedStoppingOtherStates []
 
static const PNP_EVENT_TARGET_STATE m_PnpStartedStoppingFailedOtherStates []
 
static const PNP_EVENT_TARGET_STATE m_PnpEjectFailedOtherStates []
 
static const PNP_EVENT_TARGET_STATE m_PnpStartedRemovingOtherStates []
 
static const PNP_EVENT_TARGET_STATE m_PnpFailedPowerDownOtherStates []
 
static const PNP_EVENT_TARGET_STATE m_PnpFailedIoStartingOtherStates []
 
static const PNP_EVENT_TARGET_STATE m_PnpFailedWaitForRemoveOtherStates []
 
static const PNP_EVENT_TARGET_STATE m_PnpRestartOtherStates []
 
static const PNP_EVENT_TARGET_STATE m_PnpRestartReleaseHardware []
 
static const PNP_EVENT_TARGET_STATE m_PnpRestartHardwareAvailableOtherStates []
 
static const POWER_EVENT_TARGET_STATE m_PowerD0OtherStates []
 
static const POWER_EVENT_TARGET_STATE m_PowerD0NPOtherStates []
 
static const POWER_EVENT_TARGET_STATE m_PowerD0BusWakeOwnerOtherStates []
 
static const POWER_EVENT_TARGET_STATE m_PowerD0BusWakeOwnerNPOtherStates []
 
static const POWER_EVENT_TARGET_STATE m_PowerD0ArmedForWakeOtherStates []
 
static const POWER_EVENT_TARGET_STATE m_PowerD0ArmedForWakeNPOtherStates []
 
static const POWER_EVENT_TARGET_STATE m_PowerDNotZeroOtherStates []
 
static const POWER_EVENT_TARGET_STATE m_PowerDNotZeroNPOtherStates []
 
static const POWER_EVENT_TARGET_STATE m_DxArmedForWakeOtherStates []
 
static const POWER_EVENT_TARGET_STATE m_DxArmedForWakeNPOtherStates []
 
static const POWER_EVENT_TARGET_STATE m_WakePendingOtherStates []
 
static const POWER_EVENT_TARGET_STATE m_WakePendingNPOtherStates []
 
static const POWER_EVENT_TARGET_STATE m_DxSurpriseRemovedOtherStates []
 
static const POWER_EVENT_TARGET_STATE m_PowerStoppedOtherStates []
 
static const POWER_EVENT_TARGET_STATE m_PowerDxStoppedOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolObjectCreatedOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolStartingOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolStartedIdleCapableOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolIdleCapableDeviceIdleOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolTimerExpiredNoWakeOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolTimerExpiredNoWakeCompletePowerDownOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolWaitingUnarmedOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolS0NoWakePowerUpOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolS0NoWakeCompletePowerUpOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSystemSleepNeedWakeOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSystemSleepNeedWakeCompletePowerUpOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSystemAsleepWakeArmedOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSystemAsleepWakeArmedNPOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSystemWakeDeviceToD0OtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSystemWakeDeviceToD0CompletePowerUpOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolStartedWakeCapableOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolWakeCapableDeviceIdleOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolTimerExpiredWakeCapablePowerDownOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolTimerExpiredWakeCapableSendWakeOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolTimerExpiredWakeCapableUsbSSOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolWaitingArmedOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolDisarmingWakeForSystemSleepCompletePowerUpOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolCancelingWakeForSystemSleepWakeCanceledOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolWokeFromS0OtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolStoppingResetDeviceOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolStoppingResetDeviceCompletePowerUpOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolStoppingD0OtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolStoppingDisarmWakeOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolStoppingDisarmWakeCancelWakeOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolIoPresentArmedOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolIoPresentArmedWakeCanceledOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolS0WakeCompletePowerUpOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolTimerExpiredWakeCapableWakeSucceededOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolTimerExpiredWakeCapableWakeFailedOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolTimerExpiredWakeCapablePowerDownFailedCancelWakeOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolCancelingWakeForSystemSleepOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolTimerExpiredWakeCapableWakeArrivedOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolTimerExpiredWakeCapableCancelWakeOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolTimerExpiredWakeCompletedPowerDownOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolTimerExpiredWakeCompletedPowerUpOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSystemWakeDeviceWakeEnabledOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSystemWakeDeviceWakeEnabledNPOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSystemWakeDeviceWakeEnabledWakeCanceledOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSystemWakeDeviceWakeEnabledWakeCanceledNPOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSleepingWakeWakeArrivedOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSystemWakeDeviceWakeTriggeredS0OtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSystemWakeDeviceWakeTriggeredS0NPOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSystemWakeDeviceWakeCompletePowerUpOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSleepingNoWakePowerDownOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSleepingNoWakeCompletePowerDownOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSleepingWakePowerDownOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSleepingSendWakeOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSleepingWakeWakeArrivedNPOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSleepingWakePowerDownFailedOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolStartedOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolStartedWaitForIdleTimeoutOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolDevicePowerRequestFailedOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolStoppingOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolStoppedOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolRestartingOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolStoppingCancelWakeOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolCancelUsbSSOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSleepingWakeRevertArmWakeOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSleepingWakeRevertArmWakeNPOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolRemovedOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolTimerExpiredWakeCapableWakeInterruptArrivedOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolTimerExpiredWakeCapablePowerDownFailedWakeInterruptArrivedOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolWaitingArmedWakeInterruptFiredDuringPowerDownOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_NotPowerPolOwnerObjectCreatedStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_NotPowerPolOwnerStartingStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_NotPowerPolOwnerStartingSucceededStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_NotPowerPolOwnerStartingFailedStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_NotPowerPolOwnerGotoDxStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_NotPowerPolOwnerGotoDxInDxStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_NotPowerPolOwnerDxStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_NotPowerPolOwnerGotoD0States []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_NotPowerPolOwnerGotoD0InD0States []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_NotPowerPolOwnerStoppedStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_NotPowerPolOwnerStoppingWaitForImplicitPowerDownStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_NotPowerPolOwnerStoppingPoweringUpStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_NotPowerPolOwnerStoppingPoweringDownStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_NotPowerPolOwnerRemovedStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolWaitingArmedWakeInterruptFiredOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSystemWakeDeviceWakeInterruptFiredOtherStates []
 
static const POWER_POLICY_EVENT_TARGET_STATE m_PowerPolSystemWakeDeviceWakeInterruptFiredNPOtherStates []
 
static const PWCHAR m_RestartStartAchievedName = RESTART_START_ACHIEVED_NAME
 
static const PWCHAR m_RestartStartTimeName = RESTART_START_TIME_NAME
 
static const PWCHAR m_RestartCountName = RESTART_COUNT_NAME
 
static const ULONG m_RestartTimePeriodMaximum = 60
 
static const ULONG m_RestartCountMaximum = 5
 

Additional Inherited Members

- Static Public Member Functions inherited from FxObject
static FxObject_FromDisposeEntry (__in PSINGLE_LIST_ENTRY Entry)
 
static FxObject_GetObjectFromHandle (__in WDFOBJECT Handle, __inout PWDFOBJECT_OFFSET ObjectOffset)
 
static PVOID __inline _ToHandle (__in FxObject *Object)
 
static VOID __inline _ReferenceActual (__in WDFOBJECT Object, __in_opt PVOID Tag, __in LONG Line, __in PSTR File)
 
static VOID __inline _DereferenceActual (__in WDFOBJECT Object, __in_opt PVOID Tag, __in LONG Line, __in PSTR File)
 
static PVOID _GetDebugBase (__in FxObject *Object)
 
static PFX_POOL_HEADER _CleanupPointer (__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxObject *Object)
 
static _Must_inspect_result_ NTSTATUS _GetEffectiveLock (__in FxObject *Object, __in_opt IFxHasCallbacks *Callbacks, __in BOOLEAN AutomaticLocking, __in BOOLEAN PassiveCallbacks, __out FxCallbackLock **CallbackLock, __out_opt FxObject **CallbackLockObject)
 
static _Must_inspect_result_ NTSTATUS _ObjectQuery (_In_ FxObject *Object, _In_ CONST GUID *Guid, _In_ ULONG QueryBufferLength, _Out_writes_bytes_(QueryBufferLength) PVOID QueryBuffer)
 

Detailed Description

Definition at line 488 of file fxpkgpnp.hpp.

Constructor & Destructor Documentation

◆ FxPkgPnp()

FxPkgPnp::FxPkgPnp ( __in PFX_DRIVER_GLOBALS  FxDriverGlobals,
__in CfxDevice Device,
__in WDFTYPE  Type 
)
protected

Definition at line 48 of file fxpkgpnp.cpp.

52  :
53  FxPackage(FxDriverGlobals, Device, Type)
54 {
55  ULONG i;
56 
60 
61  //
62  // Initialize the structures to the default state and then override the
63  // non WDF std default values to the unsupported / off values.
64  //
72 
82  ;
83 
84  m_PnpCapsAddress = (ULONG) -1;
85  m_PnpCapsUINumber = (ULONG) -1;
86 
95  ;
96 
99 
100  m_PowerCaps.D1Latency = (ULONG) -1;
101  m_PowerCaps.D2Latency = (ULONG) -1;
102  m_PowerCaps.D3Latency = (ULONG) -1;
103 
104  m_PowerCaps.States = 0;
105  for (i = 0; i < PowerSystemMaximum; i++) {
107  }
108 
112 
123 
124  m_DeviceStopCount = 0;
128 
129  //
130  // We only set the pending child count to 1 once we know we have successfully
131  // created an FxDevice and initialized it fully. If we delete an FxDevice
132  // which is half baked, it cannot have any FxChildLists which have any
133  // pending children on them.
134  //
136 
138 
141 
142  m_Failed = FALSE;
144 
148 
153 
157 
159 
160  m_EnumInfo = NULL;
161 
162  m_Resources = NULL;
164 
172 
176 
178 
179 #if (FX_CORE_MODE==FX_CORE_KERNEL_MODE)
180  //
181  // Interrupt APIs for Vista and forward
182  //
185 
186  //
187  // Interrupt APIs for Windows 8 and forward
188  //
191 
192 #endif
193 
195 
197 }
BYTE SystemWake
Definition: fxpkgpnp.hpp:413
ULONG D1Latency
Definition: fxpkgpnp.hpp:423
FxCREvent * m_PowerThreadEvent
Definition: fxpkgpnp.hpp:4354
LONG m_PendingChildCount
Definition: fxpkgpnp.hpp:4178
PINTERFACE_REFERENCE InterfaceReference
Definition: miniport.h:124
POWER_THREAD_INTERFACE m_PowerThreadInterface
Definition: fxpkgpnp.hpp:4213
ULONG m_DeviceStopCount
Definition: fxpkgpnp.hpp:4146
SINGLE_LIST_ENTRY m_QueryInterfaceHead
Definition: fxpkgpnp.hpp:4122
static VOID _PowerThreadEnqueue(__in PVOID Context, __in PWORK_QUEUE_ITEM WorkItem)
Definition: fxpkgpnp.hpp:3944
USHORT Size
Definition: miniport.h:121
BOOLEAN m_SystemWokenByWakeInterrupt
Definition: fxpkgpnp.hpp:4330
ULONG D3Latency
Definition: fxpkgpnp.hpp:425
MdIrp m_PendingDevicePowerIrp
Definition: fxpkgpnp.hpp:4372
LONG m_PowerThreadInterfaceReferenceCount
Definition: fxpkgpnp.hpp:4352
BYTE m_SetDeviceRemoveProcessed
Definition: fxpkgpnp.hpp:4198
LIST_ENTRY m_InterruptListHead
Definition: fxpkgpnp.hpp:4310
UCHAR m_SystemPowerAction
Definition: fxpkgpnp.hpp:4242
BOOLEAN m_ExtendWatchDogTimer
Definition: fxpkgpnp.hpp:196
FxSpinLockTransactionedList * m_DmaEnablerList
Definition: fxpkgpnp.hpp:4227
BYTE m_FailedAction
Definition: fxpkgpnp.hpp:4191
BOOLEAN m_Failed
Definition: fxpkgpnp.hpp:4095
MdIrp m_WaitWakeIrp
Definition: fxpkgpnp.hpp:180
ULONG m_PnpCapsAddress
Definition: fxpkgpnp.hpp:4090
BOOLEAN m_InternalFailure
Definition: fxpkgpnp.hpp:4249
BOOLEAN m_SpecialSupport[WdfSpecialFileMax-1]
Definition: fxpkgpnp.hpp:4133
FxEnumerationInfo * m_EnumInfo
Definition: fxpkgpnp.hpp:4215
PFN_IO_DISCONNECT_INTERRUPT_EX m_IoDisconnectInterruptEx
Definition: fxpkgpnp.hpp:4289
#define FALSE
Definition: types.h:117
FxCmResList * m_Resources
Definition: fxpkgpnp.hpp:4220
LONG m_SpecialFileCount[WdfSpecialFileMax-1]
Definition: fxpkgpnp.hpp:4139
VOID MarkDisposeOverride(__in FxObjectLockState State=ObjectLock)
Definition: fxobject.hpp:1101
ULONG States
Definition: fxpkgpnp.hpp:418
FxRelatedDeviceList * m_UsageDependentDeviceList
Definition: fxpkgpnp.hpp:4113
ULONG m_WakeInterruptCount
Definition: fxpkgpnp.hpp:4316
BYTE m_DevicePowerState
Definition: fxpkgpnp.hpp:4105
FxPowerPolicyStateCallback * m_PowerPolicyStateCallbacks
Definition: fxpkgpnp.hpp:4378
USHORT Caps
Definition: fxpkgpnp.hpp:406
BOOLEAN m_HasPowerThread
Definition: fxpkgpnp.hpp:4256
BOOLEAN m_CapsQueried
Definition: fxpkgpnp.hpp:4247
Type
Definition: Type.h:6
FxPackage(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in CfxDevice *Device, __in WDFTYPE Type)
Definition: fxpackage.cpp:31
PFN_POWER_THREAD_ENQUEUE PowerThreadEnqueue
Definition: fxpkgpnp.hpp:110
ULONG m_InterruptObjectCount
Definition: fxpkgpnp.hpp:4308
MxEvent * m_DeviceRemoveProcessed
Definition: fxpkgpnp.hpp:4172
BYTE DeviceWake
Definition: fxpkgpnp.hpp:412
unsigned char UCHAR
Definition: xmlstorage.h:181
struct _SINGLE_LIST_ENTRY * Next
Definition: ntbasedef.h:629
SINGLE_LIST_ENTRY m_DeviceInterfaceHead
Definition: fxpkgpnp.hpp:4126
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
FxLibraryGlobalsType FxLibraryGlobals
Definition: globals.cpp:95
BYTE m_DevicePowerStateOld
Definition: fxpkgpnp.hpp:4108
FxPnpStateAndCaps m_PnpStateAndCaps
Definition: fxpkgpnp.hpp:4088
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
PINTERFACE_DEREFERENCE InterfaceDereference
Definition: miniport.h:125
FxSystemThread * m_PowerThread
Definition: fxpkgpnp.hpp:4350
#define InitializeListHead(ListHead)
Definition: env_spec_w32.h:944
PFN_IO_CONNECT_INTERRUPT_EX m_IoConnectInterruptEx
Definition: fxpkgpnp.hpp:4288
PFN_IO_DISCONNECT_INTERRUPT_EX IoDisconnectInterruptEx
Definition: fxglobals.h:732
PFN_IO_REPORT_INTERRUPT_INACTIVE m_IoReportInterruptInactive
Definition: fxpkgpnp.hpp:4294
ULONG m_PnpCapsUINumber
Definition: fxpkgpnp.hpp:4091
FxRelatedDeviceList * m_RemovalDeviceList
Definition: fxpkgpnp.hpp:4115
PFN_IO_REPORT_INTERRUPT_ACTIVE IoReportInterruptActive
Definition: fxglobals.h:762
#define NULL
Definition: types.h:112
BOOLEAN m_AchievedStart
Definition: fxpkgpnp.hpp:4344
FxPowerCaps m_PowerCaps
Definition: fxpkgpnp.hpp:4093
FxPnpStateCallback * m_PnpStateCallbacks
Definition: fxpkgpnp.hpp:4374
SharedPowerData m_SharedPower
Definition: fxpkgpnp.hpp:4161
unsigned int ULONG
Definition: retypes.h:1
FxCmResList * m_ResourcesRaw
Definition: fxpkgpnp.hpp:4225
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
BYTE m_SystemPowerState
Definition: fxpkgpnp.hpp:4102
static VOID STDCALL _PowerThreadInterfaceDereference(__inout PVOID Context)
Definition: fxpkgpnp.cpp:5292
MdIrp m_PendingPnPIrp
Definition: fxpkgpnp.hpp:4360
BOOLEAN m_DeviceInterfacesCanBeEnabled
Definition: fxpkgpnp.hpp:4128
PFN_IO_CONNECT_INTERRUPT_EX IoConnectInterruptEx
Definition: fxglobals.h:730
PFN_IO_REPORT_INTERRUPT_ACTIVE m_IoReportInterruptActive
Definition: fxpkgpnp.hpp:4293
PVOID Context
Definition: miniport.h:123
FxSelfManagedIoMachine * m_SelfManagedIoMachine
Definition: fxpkgpnp.hpp:4155
USHORT Version
Definition: miniport.h:122
MdIrp m_PendingSystemPowerIrp
Definition: fxpkgpnp.hpp:4366
BOOLEAN m_WakeInterruptsKeepConnected
Definition: fxpkgpnp.hpp:4339
ULONG m_WakeInterruptPendingAckCount
Definition: fxpkgpnp.hpp:4323
PFN_IO_REPORT_INTERRUPT_INACTIVE IoReportInterruptInactive
Definition: fxglobals.h:764
static VOID STDCALL _PowerThreadInterfaceReference(__inout PVOID Context)
Definition: fxpkgpnp.cpp:5262
static VOID _SetPowerCapState(__in ULONG Index, __in DEVICE_POWER_STATE State, __out PULONG Result)
Definition: fxpkgpnp.cpp:5616
D3COLD_SUPPORT_INTERFACE m_D3ColdInterface
Definition: fxpkgpnp.hpp:4166
ULONG D2Latency
Definition: fxpkgpnp.hpp:424
FxPowerStateCallback * m_PowerStateCallbacks
Definition: fxpkgpnp.hpp:4376
BOOLEAN m_WaitWakeOwner
Definition: fxpkgpnp.hpp:186
BOOLEAN m_ReleaseHardwareAfterDescendantsOnFailure
Definition: fxpkgpnp.hpp:4277

◆ ~FxPkgPnp()

FxPkgPnp::~FxPkgPnp ( )
protected

Definition at line 199 of file fxpkgpnp.cpp.

200 {
202 
204 
205  //
206  // We should either have zero pending children or we never made it out of
207  // the init state during a failed WDFDEVICE create or failed EvtDriverDeviceAdd
208  //
211 
212 
214  while (ple != NULL) {
215  FxDeviceInterface* pDI;
216 
218 
219  //
220  // Advance to the next before deleting the current
221  //
222  ple = ple->Next;
223 
224  //
225  // No longer in the list
226  //
227  pDI->m_Entry.Next = NULL;
228 
229  delete pDI;
230  }
232 
233  if (m_DmaEnablerList != NULL) {
234  delete m_DmaEnablerList;
236  }
237 
238  if (m_RemovalDeviceList != NULL) {
239  delete m_RemovalDeviceList;
241  }
242 
246  }
247 
248  if (m_PnpStateCallbacks != NULL) {
249  delete m_PnpStateCallbacks;
250  }
251 
252  if (m_PowerStateCallbacks != NULL) {
253  delete m_PowerStateCallbacks;
254  }
255 
258  }
259 
260  if (m_SelfManagedIoMachine != NULL) {
261  delete m_SelfManagedIoMachine;
263  }
264 
265  if (m_EnumInfo != NULL) {
266  delete m_EnumInfo;
267  m_EnumInfo = NULL;
268  }
269 
270  if (m_Resources != NULL) {
271  m_Resources->RELEASE(this);
272  m_Resources = NULL;
273  }
274 
275  if (m_ResourcesRaw != NULL) {
276  m_ResourcesRaw->RELEASE(this);
278  }
279 
281 }
LONG m_PendingChildCount
Definition: fxpkgpnp.hpp:4178
CfxDevice * m_Device
Definition: fxobject.hpp:329
static FxDeviceInterface * _FromEntry(__in PSINGLE_LIST_ENTRY Entry)
Definition: ntbasedef.h:628
LIST_ENTRY m_InterruptListHead
Definition: fxpkgpnp.hpp:4310
FxSpinLockTransactionedList * m_DmaEnablerList
Definition: fxpkgpnp.hpp:4227
static __inline VOID MxAssert(__in BOOLEAN Condition)
Definition: mxgeneralkm.h:165
_Must_inspect_result_ FORCEINLINE BOOLEAN IsListEmpty(_In_ const LIST_ENTRY *ListHead)
Definition: rtlfuncs.h:57
PSINGLE_LIST_ENTRY ple
FxEnumerationInfo * m_EnumInfo
Definition: fxpkgpnp.hpp:4215
FxCmResList * m_Resources
Definition: fxpkgpnp.hpp:4220
FxRelatedDeviceList * m_UsageDependentDeviceList
Definition: fxpkgpnp.hpp:4113
FxPowerPolicyStateCallback * m_PowerPolicyStateCallbacks
Definition: fxpkgpnp.hpp:4378
#define ASSERT(a)
Definition: mode.c:44
static __inline KIRQL MxGetCurrentIrql()
Definition: mxgeneralkm.h:86
struct _SINGLE_LIST_ENTRY * Next
Definition: ntbasedef.h:629
__inline WDF_DEVICE_PNP_STATE GetDevicePnpState()
Definition: fxdevice.hpp:1149
SINGLE_LIST_ENTRY m_DeviceInterfaceHead
Definition: fxpkgpnp.hpp:4126
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
FxRelatedDeviceList * m_RemovalDeviceList
Definition: fxpkgpnp.hpp:4115
#define NULL
Definition: types.h:112
FxPnpStateCallback * m_PnpStateCallbacks
Definition: fxpkgpnp.hpp:4374
SINGLE_LIST_ENTRY m_Entry
FxCmResList * m_ResourcesRaw
Definition: fxpkgpnp.hpp:4225
FxSelfManagedIoMachine * m_SelfManagedIoMachine
Definition: fxpkgpnp.hpp:4155
FxPowerStateCallback * m_PowerStateCallbacks
Definition: fxpkgpnp.hpp:4376

Member Function Documentation

◆ __drv_when()

FxPkgPnp::__drv_when ( NT_SUCCESSreturn,
__drv_arg(ResourcesMatched, _Must_inspect_result_  
)
protected

◆ _DispatchWaitWake()

_Must_inspect_result_ NTSTATUS FxPkgPnp::_DispatchWaitWake ( __inout FxPkgPnp This,
__inout FxIrp Irp 
)
staticprotected

Definition at line 2400 of file fxpkgpnp.cpp.

2425 {
2426  return This->DispatchWaitWake(Irp);
2427 }
_In_ PIRP Irp
Definition: csq.h:116

◆ _GetPowerCapState()

DEVICE_POWER_STATE FxPkgPnp::_GetPowerCapState ( __in ULONG  Index,
__in ULONG  State 
)
staticprotected

Definition at line 5657 of file fxpkgpnp.cpp.

5676 {
5677  ASSERT(Index < 8);
5678  // isolate the value and normalize it
5679  return (DEVICE_POWER_STATE) ((State & (0xF << (Index * 4))) >> (Index * 4));
5680 }
enum _DEVICE_POWER_STATE DEVICE_POWER_STATE
#define ASSERT(a)
Definition: mode.c:44
_In_ WDFCOLLECTION _In_ ULONG Index

Referenced by FxPkgPdo::HandleQueryCapabilities(), FxPkgFdo::HandleQueryCapabilitiesCompletion(), and PowerPolSleepingNoWakePowerDown().

◆ _PnpCancelRemoveDevice()

_Must_inspect_result_ NTSTATUS FxPkgPnp::_PnpCancelRemoveDevice ( __inout FxPkgPnp This,
__inout FxIrp Irp 
)
staticprotected

Definition at line 2026 of file fxpkgpnp.cpp.

2049 {
2050  //
2051  // Seed the irp with success
2052  //
2053  Irp->SetStatus(STATUS_SUCCESS);
2054 
2055  //
2056  // Pend it and transition the state machine
2057  //
2058 
2059  This->SetPendingPnpIrp(Irp);
2060  This->PnpProcessEvent(PnpEventCancelRemove);
2061 
2062  return STATUS_PENDING;
2063 }
_In_ PIRP Irp
Definition: csq.h:116
#define STATUS_PENDING
Definition: ntstatus.h:82
#define STATUS_SUCCESS
Definition: shellext.h:65

◆ _PnpCancelStopDevice()

_Must_inspect_result_ NTSTATUS FxPkgPnp::_PnpCancelStopDevice ( __inout FxPkgPnp This,
__inout FxIrp Irp 
)
staticprotected

Definition at line 1901 of file fxpkgpnp.cpp.

1928 {
1929  //
1930  // Seed the irp with success
1931  //
1932  Irp->SetStatus(STATUS_SUCCESS);
1933 
1934  //
1935  // Pend it and transition the state machine
1936  //
1937  This->SetPendingPnpIrp(Irp);
1938  This->PnpProcessEvent(PnpEventCancelStop);
1939 
1940  return STATUS_PENDING;
1941 }
_In_ PIRP Irp
Definition: csq.h:116
#define STATUS_PENDING
Definition: ntstatus.h:82
#define STATUS_SUCCESS
Definition: shellext.h:65

◆ _PnpDeviceUsageNotification()

_Must_inspect_result_ NTSTATUS FxPkgPnp::_PnpDeviceUsageNotification ( __inout FxPkgPnp This,
__inout FxIrp Irp 
)
staticprotected

Definition at line 3857 of file fxpkgpnp.cpp.

3861 {
3862  return This->PnpDeviceUsageNotification(Irp);
3863 }
_In_ PIRP Irp
Definition: csq.h:116

◆ _PnpProcessEventInner()

VOID FxPkgPnp::_PnpProcessEventInner ( __inout FxPkgPnp This,
__inout FxPostProcessInfo Info,
__in PVOID  WorkerContext 
)
staticprotected

Definition at line 952 of file pnpstatemachine.cpp.

957 {
958  UNREFERENCED_PARAMETER(WorkerContext);
959 
960  //
961  // Take the state machine lock.
962  //
963  This->m_PnpMachine.m_StateMachineLock.AcquireLock(
964  This->GetDriverGlobals()
965  );
966 
967  //
968  // Call the function that will actually run the state machine.
969  //
970  This->PnpProcessEventInner(Info);
971 
972  //
973  // We are being called from the work item and m_WorkItemRunning is > 0, so
974  // we cannot be deleted yet.
975  //
976  ASSERT(Info->SomethingToDo() == FALSE);
977 
978  //
979  // Now release the lock
980  //
981  This->m_PnpMachine.m_StateMachineLock.ReleaseLock(
982  This->GetDriverGlobals()
983  );
984 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
Definition: wdfchildlist.h:683
#define FALSE
Definition: types.h:117
#define ASSERT(a)
Definition: mode.c:44

Referenced by PostCreateDeviceInitialize().

◆ _PnpQueryRemoveDevice()

_Must_inspect_result_ NTSTATUS FxPkgPnp::_PnpQueryRemoveDevice ( __inout FxPkgPnp This,
__inout FxIrp Irp 
)
staticprotected

Definition at line 1981 of file fxpkgpnp.cpp.

2005 {
2006  //
2007  // By default we handle this state.
2008  //
2009  Irp->SetStatus(STATUS_SUCCESS);
2010 
2011  //
2012  // Keep this IRP around, since we're going to deal with it later.
2013  //
2014  This->SetPendingPnpIrp(Irp);
2015 
2016  //
2017  // Now run the state machine on this thread.
2018  //
2019  This->PnpProcessEvent(PnpEventQueryRemove);
2020 
2021  return STATUS_PENDING;
2022 }
_In_ PIRP Irp
Definition: csq.h:116
#define STATUS_PENDING
Definition: ntstatus.h:82
#define STATUS_SUCCESS
Definition: shellext.h:65

◆ _PnpQueryStopDevice()

_Must_inspect_result_ NTSTATUS FxPkgPnp::_PnpQueryStopDevice ( __inout FxPkgPnp This,
__inout FxIrp Irp 
)
staticprotected

Definition at line 1850 of file fxpkgpnp.cpp.

1885 {
1886  //
1887  // Keep this IRP around, since we're going to deal with it later.
1888  //
1889  This->SetPendingPnpIrp(Irp);
1890 
1891  //
1892  // Now run the state machine on this thread.
1893  //
1894  This->PnpProcessEvent(PnpEventQueryStop);
1895 
1896  return STATUS_PENDING;
1897 }
_In_ PIRP Irp
Definition: csq.h:116
#define STATUS_PENDING
Definition: ntstatus.h:82

◆ _PnpRemoveDevice()

_Must_inspect_result_ NTSTATUS FxPkgPnp::_PnpRemoveDevice ( __inout FxPkgPnp This,
__inout FxIrp Irp 
)
staticprotected

Definition at line 2275 of file fxpkgpnp.cpp.

2298 {
2299 #if (FX_CORE_MODE==FX_CORE_USER_MODE)
2300  MxEvent * event = This->m_RemoveEventUm.GetSelfPointer();
2301 #else
2302  MxEvent eventOnStack;
2303  eventOnStack.Initialize(SynchronizationEvent, FALSE);
2304  MxEvent * event = eventOnStack.GetSelfPointer();
2305 #endif
2306 
2307  NTSTATUS status;
2308 
2310  This->m_Device->GetRemoveLock(),
2311  Irp->GetIrp());
2312 
2313 #if DBG
2315 #else
2317 #endif
2318 
2319  //
2320  // Keep this object around after m_Device has RELEASE'ed its reference to
2321  // this package.
2322  //
2323  This->ADDREF(Irp);
2324 
2325  //
2326  // Removes are always success
2327  //
2328  Irp->SetStatus(STATUS_SUCCESS);
2329 
2330  ASSERT(This->m_DeviceRemoveProcessed == NULL);
2331  This->m_DeviceRemoveProcessed = event;
2332 
2333  //
2334  // Post the event and wait for the FxDevice to destroy itself or determine
2335  // it has not been reported missing yet (for PDOs and bus filters).
2336  //
2337  This->PnpProcessEvent(PnpEventRemove);
2338 
2340  This->GetDriverGlobals(), TRACE_LEVEL_INFORMATION, TRACINGPNP,
2341  "WDFDEVICE %p, !devobj %p waiting for remove event to finish processing",
2342  This->m_Device->GetHandle(), This->m_Device->GetDeviceObject());
2343 
2344  //
2345  // No need to wait in a critical region because we are in the context of a
2346  // pnp request which is in the system context.
2347  //
2348  event->WaitFor(Executive, KernelMode, FALSE, NULL);
2349 
2350  This->m_DeviceRemoveProcessed = NULL;
2351 
2352  status = This->ProcessRemoveDeviceOverload(Irp);
2353 
2354  //
2355  // Release the reference added at the top. This is most likely going to be
2356  // the last reference on the package for KMDF. For UMDF, host manages the
2357  // lifetime of FxDevice so this may not be the last release for UMDF.
2358  //
2359  This->RELEASE(Irp);
2360 
2361  return status;
2362 }
static __inline NTSTATUS MxAcquireRemoveLock(__in MdRemoveLock RemoveLock, __in_opt PVOID Tag)
Definition: mxgeneralkm.h:268
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
LONG NTSTATUS
Definition: precomp.h:26
#define TRACE_LEVEL_INFORMATION
Definition: storswtr.h:29
MxEvent * GetSelfPointer(VOID)
Definition: mxevent.h:110
CHECK_RETURN_IF_USER_MODE __inline NTSTATUS Initialize(__in EVENT_TYPE Type, __in BOOLEAN InitialState)
Definition: mxeventkm.h:55
#define FALSE
Definition: types.h:117
_In_ PIRP Irp
Definition: csq.h:116
#define ASSERT(a)
Definition: mode.c:44
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
struct _cl_event * event
Definition: glext.h:7739
#define TRACINGPNP
Definition: dbgtrace.h:67
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
#define NULL
Definition: types.h:112
#define STATUS_SUCCESS
Definition: shellext.h:65
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

◆ _PnpStartDevice()

_Must_inspect_result_ NTSTATUS FxPkgPnp::_PnpStartDevice ( __inout FxPkgPnp This,
__inout FxIrp Irp 
)
staticprotected

Definition at line 1823 of file fxpkgpnp.cpp.

1841 {
1842  This->SetPendingPnpIrp(Irp);
1843  This->PnpProcessEvent(PnpEventStartDevice);
1844 
1845  return STATUS_PENDING;
1846 }
_In_ PIRP Irp
Definition: csq.h:116
#define STATUS_PENDING
Definition: ntstatus.h:82

◆ _PnpStopDevice()

_Must_inspect_result_ NTSTATUS FxPkgPnp::_PnpStopDevice ( __inout FxPkgPnp This,
__inout FxIrp Irp 
)
staticprotected

Definition at line 1945 of file fxpkgpnp.cpp.

1964 {
1965  //
1966  // Seed the irp with success
1967  //
1968  Irp->SetStatus(STATUS_SUCCESS);
1969 
1970  //
1971  // Pend and transition the state machine
1972  //
1973  This->SetPendingPnpIrp(Irp);
1974  This->PnpProcessEvent(PnpEventStop);
1975 
1976  return STATUS_PENDING;
1977 }
_In_ PIRP Irp
Definition: csq.h:116
#define STATUS_PENDING
Definition: ntstatus.h:82
#define STATUS_SUCCESS
Definition: shellext.h:65

◆ _PowerPolicyProcessEventInner()

VOID FxPkgPnp::_PowerPolicyProcessEventInner ( __inout FxPkgPnp This,
__inout FxPostProcessInfo Info,
__in PVOID  WorkerContext 
)
staticprotected

Definition at line 3048 of file powerpolicystatemachine.cpp.

3053 {
3054 
3056 
3057  //
3058  // Take the state machine lock.
3059  //
3060  This->m_PowerPolicyMachine.m_StateMachineLock.AcquireLock(
3061  This->GetDriverGlobals()
3062  );
3063 
3064  //
3065  // Call the function that will actually run the state machine.
3066  //
3067  This->PowerPolicyProcessEventInner(Info);
3068 
3069  //
3070  // We are being called from the work item and m_WorkItemRunning is > 0, so
3071  // we cannot be deleted yet.
3072  //
3073  ASSERT(Info->SomethingToDo() == FALSE);
3074 
3075  //
3076  // Now release the lock
3077  //
3078  This->m_PowerPolicyMachine.m_StateMachineLock.ReleaseLock(
3079  This->GetDriverGlobals()
3080  );
3081 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
Definition: wdfchildlist.h:683
#define FALSE
Definition: types.h:117
#define ASSERT(a)
Definition: mode.c:44

Referenced by PostCreateDeviceInitialize().

◆ _PowerProcessEventInner()

VOID FxPkgPnp::_PowerProcessEventInner ( __in FxPkgPnp This,
__in FxPostProcessInfo Info,
__in PVOID  WorkerContext 
)
staticprotected

Definition at line 1309 of file powerstatemachine.cpp.

1314 {
1315 
1316  UNREFERENCED_PARAMETER(WorkerContext);
1317 
1318  //
1319  // Take the state machine lock.
1320  //
1321  This->m_PowerMachine.m_StateMachineLock.AcquireLock(
1322  This->GetDriverGlobals()
1323  );
1324 
1325  //
1326  // Call the function that will actually run the state machine.
1327  //
1328  This->PowerProcessEventInner(Info);
1329 
1330  //
1331  // We are being called from the work item and m_WorkItemRunning is > 0, so
1332  // we cannot be deleted yet.
1333  //
1334  ASSERT(Info->SomethingToDo() == FALSE);
1335 
1336  //
1337  // Now release the lock
1338  //
1339  This->m_PowerMachine.m_StateMachineLock.ReleaseLock(
1340  This->GetDriverGlobals()
1341  );
1342 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
Definition: wdfchildlist.h:683
#define FALSE
Definition: types.h:117
#define ASSERT(a)
Definition: mode.c:44

Referenced by PostCreateDeviceInitialize().

◆ _PowerSetSystemWakeSource()

VOID FxPkgPnp::_PowerSetSystemWakeSource ( __in FxIrp Irp)
staticprotected

Definition at line 133 of file powerstatemachinekm.cpp.

148 {
149  PoSetSystemWake(Irp->GetIrp());
150 }
_In_ PIRP Irp
Definition: csq.h:116

Referenced by PowerMakeWakeRequestNonCancelable().

◆ _PowerThreadEnqueue()

static VOID FxPkgPnp::_PowerThreadEnqueue ( __in PVOID  Context,
__in PWORK_QUEUE_ITEM  WorkItem 
)
inlinestaticprivate

Definition at line 3944 of file fxpkgpnp.hpp.

3948  {
3949  BOOLEAN result;
3950 
3951  result = ((FxPkgPnp*) Context)->m_PowerThread->QueueWorkItem(WorkItem);
3952 #if DBG
3953  ASSERT(result);
3954 #else
3956 #endif
3957  }
GLuint64EXT * result
Definition: glext.h:11304
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
unsigned char BOOLEAN
#define ASSERT(a)
Definition: mode.c:44
_Must_inspect_result_ _In_ PWDF_WORKITEM_CONFIG _In_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWORKITEM * WorkItem
Definition: wdfworkitem.h:110

Referenced by FxPkgPnp().

◆ _PowerThreadInterfaceDereference()

VOID FxPkgPnp::_PowerThreadInterfaceDereference ( __inout PVOID  Context)
staticprivate

Definition at line 5292 of file fxpkgpnp.cpp.

5310 {
5311  FxPkgPnp* pThis;
5312 
5313  pThis = (FxPkgPnp*) Context;
5314 
5316  pThis->m_PowerThreadEvent->Set();
5317  }
5318 }
FxCREvent * m_PowerThreadEvent
Definition: fxpkgpnp.hpp:4354
LONG m_PowerThreadInterfaceReferenceCount
Definition: fxpkgpnp.hpp:4352
VOID Set(VOID)
Definition: fxwaitlock.hpp:144
#define InterlockedDecrement
Definition: armddk.h:52

Referenced by FxPkgPnp().

◆ _PowerThreadInterfaceReference()

VOID FxPkgPnp::_PowerThreadInterfaceReference ( __inout PVOID  Context)
staticprivate

Definition at line 5262 of file fxpkgpnp.cpp.

5277 {
5278  LONG count;
5279 
5282  );
5283 
5284 #if DBG
5285  ASSERT(count >= 2);
5286 #else
5288 #endif
5289 }
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
GLuint GLuint GLsizei count
Definition: gl.h:1545
LONG m_PowerThreadInterfaceReferenceCount
Definition: fxpkgpnp.hpp:4352
long LONG
Definition: pedump.c:60
#define ASSERT(a)
Definition: mode.c:44
#define InterlockedIncrement
Definition: armddk.h:53

Referenced by FxPkgPnp().

◆ _S0IdleQueryInstance()

NTSTATUS FxPkgPnp::_S0IdleQueryInstance ( __in CfxDevice Device,
__in FxWmiInstanceInternal Instance,
__in ULONG  OutBufferSize,
__out PVOID  OutBuffer,
__out PULONG  BufferUsed 
)
staticprotected

Definition at line 3455 of file fxpkgpnp.cpp.

3462 {
3463  *((BOOLEAN*) OutBuffer) =
3465  *BufferUsed = sizeof(BOOLEAN);
3466 
3467  return STATUS_SUCCESS;
3468 }
_In_ ULONG _Out_ PULONG BufferUsed
Definition: wdfwmi.h:92
_In_ UCHAR _In_ ULONG _Out_ PUCHAR _Outptr_result_bytebuffer_ OutBufferLength PVOID * OutBuffer
Definition: scsi.h:4071
FxPowerPolicyMachine m_PowerPolicyMachine
Definition: fxpkgpnp.hpp:4153
unsigned char BOOLEAN
FxPowerPolicyOwnerSettings * m_Owner
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
#define STATUS_SUCCESS
Definition: shellext.h:65

◆ _S0IdleSetInstance()

NTSTATUS FxPkgPnp::_S0IdleSetInstance ( __in CfxDevice Device,
__in FxWmiInstanceInternal Instance,
__in ULONG  InBufferSize,
__in PVOID  InBuffer 
)
staticprotected

Definition at line 3471 of file fxpkgpnp.cpp.

3477 {
3478  BOOLEAN value;
3479 
3480 
3481  //
3482  // FxWmiIrpHandler makes sure the buffer is at least one byte big, so we
3483  // don't check the buffer size.
3484  //
3485 
3486  value = *(PBOOLEAN) InBuffer;
3487 
3488  (Device->m_PkgPnp)->PowerPolicySetS0IdleState(value);
3489 
3490  return STATUS_SUCCESS;
3491 }
Definition: pdh_main.c:93
unsigned char BOOLEAN
VOID PowerPolicySetS0IdleState(__in BOOLEAN State)
Definition: fxpkgpnp.cpp:3710
char * PBOOLEAN
Definition: retypes.h:11
GLsizei const GLfloat * value
Definition: glext.h:6069
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
#define STATUS_SUCCESS
Definition: shellext.h:65

◆ _S0IdleSetItem()

NTSTATUS FxPkgPnp::_S0IdleSetItem ( __in CfxDevice Device,
__in FxWmiInstanceInternal Instance,
__in ULONG  DataItemId,
__in ULONG  InBufferSize,
__in PVOID  InBuffer 
)
staticprotected

Definition at line 3494 of file fxpkgpnp.cpp.

3501 {
3502  BOOLEAN value;
3503 
3504  if (DataItemId != 0) {
3506  }
3507 
3508  if (InBufferSize < sizeof(BOOLEAN)) {
3509  return STATUS_BUFFER_TOO_SMALL;
3510  }
3511 
3512  value = *(BOOLEAN*) InBuffer;
3513  (Device->m_PkgPnp)->PowerPolicySetS0IdleState(value);
3514 
3515  return STATUS_SUCCESS;
3516 }
Definition: pdh_main.c:93
#define STATUS_INVALID_DEVICE_REQUEST
Definition: udferr_usr.h:138
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:69
unsigned char BOOLEAN
VOID PowerPolicySetS0IdleState(__in BOOLEAN State)
Definition: fxpkgpnp.cpp:3710
_In_ ULONG DataItemId
Definition: wdfwmi.h:123
_In_ ULONG InBufferSize
Definition: wdfwmi.h:106
GLsizei const GLfloat * value
Definition: glext.h:6069
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
#define STATUS_SUCCESS
Definition: shellext.h:65

◆ _SetPowerCapState()

VOID FxPkgPnp::_SetPowerCapState ( __in ULONG  Index,
__in DEVICE_POWER_STATE  State,
__out PULONG  Result 
)
staticprotected

Definition at line 5616 of file fxpkgpnp.cpp.

5639 {
5640  //
5641  // We store off state in 4 bits, starting at the lowest byte
5642  //
5643  ASSERT(Index < 8);
5644 
5645  //
5646  // Erase the old value
5647  //
5648  *Result &= ~(0xF << (Index * 4));
5649 
5650  //
5651  // Write in the new one
5652  //
5653  *Result |= (0xF & State) << (Index * 4);
5654 }
_In_ ULONG _In_ ULONG State
Definition: potypes.h:516
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:426
#define ASSERT(a)
Definition: mode.c:44
_In_ WDFCOLLECTION _In_ ULONG Index

Referenced by FxPkgPnp(), FxPowerPolicyOwnerSettings::FxPowerPolicyOwnerSettings(), QueryForCapabilities(), and SetPowerCaps().

◆ _SpecialTypeToUsage()

static DEVICE_USAGE_NOTIFICATION_TYPE FxPkgPnp::_SpecialTypeToUsage ( __in WDF_SPECIAL_FILE_TYPE  Type)
inlinestaticprotected

◆ _SxWakeQueryInstance()

NTSTATUS FxPkgPnp::_SxWakeQueryInstance ( __in CfxDevice Device,
__in FxWmiInstanceInternal Instaace,
__in ULONG  OutBufferSize,
__out PVOID  OutBuffer,
__out PULONG  BufferUsed 
)
staticprotected

Definition at line 3519 of file fxpkgpnp.cpp.

3526 {
3527  *((BOOLEAN*) OutBuffer) =
3529  *BufferUsed = sizeof(BOOLEAN);
3530 
3531  return STATUS_SUCCESS;
3532 }
_In_ ULONG _Out_ PULONG BufferUsed
Definition: wdfwmi.h:92
_In_ UCHAR _In_ ULONG _Out_ PUCHAR _Outptr_result_bytebuffer_ OutBufferLength PVOID * OutBuffer
Definition: scsi.h:4071
FxPowerPolicyMachine m_PowerPolicyMachine
Definition: fxpkgpnp.hpp:4153
unsigned char BOOLEAN
FxPowerPolicyOwnerSettings * m_Owner
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
#define STATUS_SUCCESS
Definition: shellext.h:65

◆ _SxWakeSetInstance()

NTSTATUS FxPkgPnp::_SxWakeSetInstance ( __in CfxDevice Device,
__in FxWmiInstanceInternal Instance,
__in ULONG  InBufferSize,
__in PVOID  InBuffer 
)
staticprotected

Definition at line 3535 of file fxpkgpnp.cpp.

3541 {
3542  BOOLEAN value;
3543 
3544  //
3545  // FxWmiIrpHandler makes sure that the buffer is at least one byte big, so
3546  // we don't check the buffer size
3547  //
3548  value = *(PBOOLEAN) InBuffer;
3549 
3550  (Device->m_PkgPnp)->PowerPolicySetSxWakeState(value);
3551 
3552  return STATUS_SUCCESS;
3553 }
Definition: pdh_main.c:93
unsigned char BOOLEAN
char * PBOOLEAN
Definition: retypes.h:11
GLsizei const GLfloat * value
Definition: glext.h:6069
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
VOID PowerPolicySetSxWakeState(__in BOOLEAN State)
Definition: fxpkgpnp.cpp:3720
#define STATUS_SUCCESS
Definition: shellext.h:65

◆ _SxWakeSetItem()

NTSTATUS FxPkgPnp::_SxWakeSetItem ( __in CfxDevice Device,
__in FxWmiInstanceInternal Instance,
__in ULONG  DataItemId,
__in ULONG  InBufferSize,
__in PVOID  InBuffer 
)
staticprotected

Definition at line 3556 of file fxpkgpnp.cpp.

3563 {
3564  BOOLEAN value;
3565 
3566  if (DataItemId != 0) {
3568  }
3569 
3570  if (InBufferSize < sizeof(BOOLEAN)) {
3571  return STATUS_BUFFER_TOO_SMALL;
3572  }
3573 
3574  value = *(BOOLEAN*) InBuffer;
3575  (Device->m_PkgPnp)->PowerPolicySetSxWakeState(value);
3576 
3577  return STATUS_SUCCESS;
3578 }
Definition: pdh_main.c:93
#define STATUS_INVALID_DEVICE_REQUEST
Definition: udferr_usr.h:138
#define STATUS_BUFFER_TOO_SMALL
Definition: shellext.h:69
unsigned char BOOLEAN
_In_ ULONG DataItemId
Definition: wdfwmi.h:123
_In_ ULONG InBufferSize
Definition: wdfwmi.h:106
GLsizei const GLfloat * value
Definition: glext.h:6069
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
VOID PowerPolicySetSxWakeState(__in BOOLEAN State)
Definition: fxpkgpnp.cpp:3720
#define STATUS_SUCCESS
Definition: shellext.h:65

◆ _UsageToSpecialType()

static WDF_SPECIAL_FILE_TYPE FxPkgPnp::_UsageToSpecialType ( __in DEVICE_USAGE_NOTIFICATION_TYPE  Type)
inlinestaticprotected

Definition at line 3202 of file fxpkgpnp.hpp.

Referenced by PnpDeviceUsageNotification().

◆ AckPendingWakeInterruptOperation()

VOID FxPkgPnp::AckPendingWakeInterruptOperation ( __in BOOLEAN  ProcessPowerEventOnDifferentThread)

Definition at line 6211 of file fxpkgpnp.cpp.

6232 {
6236  ProcessPowerEventOnDifferentThread
6237  );
6238  }
6239 }
long LONG
Definition: pedump.c:60
VOID PowerProcessEvent(__in FxPowerEvent Event, __in BOOLEAN ProcessEventOnDifferentThread=FALSE)
#define InterlockedDecrement
Definition: armddk.h:52
ULONG m_WakeInterruptPendingAckCount
Definition: fxpkgpnp.hpp:4323

◆ AddChildList()

VOID FxPkgPnp::AddChildList ( __in FxChildList List)

Definition at line 4970 of file fxpkgpnp.cpp.

4973 {
4975  "Adding FxChildList %p, WDFCHILDLIST %p", List,
4976  List->GetHandle());
4977 
4979  &List->m_TransactionLink);
4980 }
NTSTATUS Add(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxTransactionedEntry *Entry)
FxEnumerationInfo * m_EnumInfo
Definition: fxpkgpnp.hpp:4215
FxWaitLockTransactionedList m_ChildListList
Definition: fxpkgpnp.hpp:485
#define TRACE_LEVEL_VERBOSE
Definition: storswtr.h:30
_Must_inspect_result_ _In_ WDFCMRESLIST List
Definition: wdfresource.h:550
#define TRACINGPNP
Definition: dbgtrace.h:67
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxobject.hpp:734
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)

Referenced by FxDevice::AddChildList().

◆ AddDmaEnabler()

VOID FxPkgPnp::AddDmaEnabler ( __in FxDmaEnabler Enabler)

Definition at line 277 of file fxpkgpnpkm.cpp.

280 {
282  "Adding DmaEnabler %p, WDFDMAENABLER %p",
283  Enabler, Enabler->GetObjectHandle());
284 
285  m_DmaEnablerList->Add(GetDriverGlobals(), &Enabler->m_TransactionLink);
286 }
NTSTATUS Add(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxTransactionedEntry *Entry)
FxSpinLockTransactionedList * m_DmaEnablerList
Definition: fxpkgpnp.hpp:4227
#define TRACE_LEVEL_VERBOSE
Definition: storswtr.h:30
#define TRACINGPNP
Definition: dbgtrace.h:67
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxobject.hpp:734
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)

Referenced by FxDevice::AddDmaEnabler().

◆ AddInterruptObject()

VOID FxPkgPnp::AddInterruptObject ( __in FxInterrupt Interrupt)
protected

Definition at line 5928 of file fxpkgpnp.cpp.

5959 {
5962 }
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_INTERRUPT_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFINTERRUPT * Interrupt
Definition: wdfinterrupt.h:372
LIST_ENTRY m_InterruptListHead
Definition: fxpkgpnp.hpp:4310
#define InsertTailList(ListHead, Entry)
ULONG m_InterruptObjectCount
Definition: fxpkgpnp.hpp:4308

Referenced by FxInterrupt::Initialize().

◆ AddQueryInterface()

VOID FxPkgPnp::AddQueryInterface ( __in FxQueryInterface QI,
__in BOOLEAN  Lock 
)

Definition at line 5017 of file fxpkgpnp.cpp.

5035 {
5037 
5038  if (Lock) {
5039  m_QueryInterfaceLock.AcquireLock(GetDriverGlobals());
5040  }
5041 
5042  ASSERT(QI->m_Entry.Next == NULL);
5043 
5044  //
5045  // Iterate until we find the end of the list and then append the new
5046  // structure. ppPrev is the pointer to the Next pointer value. When we
5047  // get to the end, ppPrev will be equal to the Next field which points to NULL.
5048  //
5051 
5052  while (pCur != NULL) {
5053  ppPrev = &pCur->Next;
5054  pCur = pCur->Next;
5055  }
5056 
5057  *ppPrev = &QI->m_Entry;
5058 
5059  if (Lock) {
5060  m_QueryInterfaceLock.ReleaseLock(GetDriverGlobals());
5061  }
5062 }
SINGLE_LIST_ENTRY m_QueryInterfaceHead
Definition: fxpkgpnp.hpp:4122
Definition: ntbasedef.h:628
#define QI(I)
#define ASSERT(a)
Definition: mode.c:44
struct _SINGLE_LIST_ENTRY * Next
Definition: ntbasedef.h:629
FxWaitLockInternal m_QueryInterfaceLock
Definition: fxpkgpnp.hpp:4120
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxobject.hpp:734
SINGLE_LIST_ENTRY * pCur
#define NULL
Definition: types.h:112
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
Definition: wdfsync.h:124
SINGLE_LIST_ENTRY ** ppPrev

◆ AddRemovalDevice()

_Must_inspect_result_ NTSTATUS FxPkgPnp::AddRemovalDevice ( __in MdDeviceObject  DependentDevice)

Definition at line 4753 of file fxpkgpnp.cpp.

4756 {
4757  FxRelatedDevice* pRelated;
4758  NTSTATUS status;
4759 
4760  if (m_RemovalDeviceList == NULL) {
4761  KIRQL irql;
4762 
4763  Lock(&irql);
4764  if (m_RemovalDeviceList == NULL) {
4766 
4767  if (m_RemovalDeviceList != NULL) {
4769  }
4770  else {
4772 
4775  "Could not allocate removal device list for WDFDEVICE %p, "
4776  "%!STATUS!", m_Device->GetHandle(), status);
4777  }
4778  }
4779  else {
4780  //
4781  // another thread allocated the list already
4782  //
4784  }
4785  Unlock(irql);
4786 
4787  if (!NT_SUCCESS(status)) {
4788  return status;
4789  }
4790  }
4791 
4792  pRelated = new(GetDriverGlobals())
4794  if (pRelated == NULL) {
4796  }
4797 
4799 
4800  if (NT_SUCCESS(status)) {
4801  //
4802  // RemovalRelations are queried automatically by PnP when the device is
4803  // going to be query removed. No need to tell pnp that the list changed
4804  // until it needs to query for it.
4805  //
4806  DO_NOTHING();
4807  }
4808  else {
4809  pRelated->DeleteFromFailedCreate();
4810  }
4811 
4812  return status;
4813 }
__drv_restoresIRQL KIRQL __in BOOLEAN Unlock
Definition: fxobject.hpp:1474
CfxDevice * m_Device
Definition: fxobject.hpp:329
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
WDFDEVICE __inline GetHandle(VOID)
Definition: fxdevice.hpp:237
LONG NTSTATUS
Definition: precomp.h:26
KIRQL irql
Definition: wave.h:1
UCHAR KIRQL
Definition: env_spec_w32.h:591
_Must_inspect_result_ _In_ WDFDEVICE _In_ PDEVICE_OBJECT DependentDevice
Definition: wdfdevice.h:2260
_Must_inspect_result_ NTSTATUS Add(__in PFX_DRIVER_GLOBALS Globals, __inout FxRelatedDevice *Entry)
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
#define TRACINGPNP
Definition: dbgtrace.h:67
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxobject.hpp:734
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
FxRelatedDeviceList * m_RemovalDeviceList
Definition: fxpkgpnp.hpp:4115
#define NULL
Definition: types.h:112
VOID DeleteFromFailedCreate(VOID)
Definition: fxobject.cpp:391
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
Definition: wdfsync.h:124
#define STATUS_SUCCESS
Definition: shellext.h:65
static SERVICE_STATUS status
Definition: service.c:31
#define DO_NOTHING()
Definition: mxgeneral.h:32
Definition: ps.c:97

◆ AddUsageDevice()

_Must_inspect_result_ NTSTATUS FxPkgPnp::AddUsageDevice ( __in MdDeviceObject  DependentDevice)

Definition at line 4685 of file fxpkgpnp.cpp.

4688 {
4689  FxRelatedDevice* pRelated;
4690  NTSTATUS status;
4691 
4693  KIRQL irql;
4694 
4695  Lock(&irql);
4698 
4701  }
4702  else {
4704 
4707  "Could not allocate usage device list for WDFDEVICE %p, "
4708  "%!STATUS!", m_Device->GetHandle(), status);
4709  }
4710 
4711  }
4712  else {
4713  //
4714  // another thread allocated the list already
4715  //
4717  }
4718  Unlock(irql);
4719 
4720  if (!NT_SUCCESS(status)) {
4721  return status;
4722  }
4723  }
4724 
4725  pRelated = new(GetDriverGlobals())
4727 
4728  if (pRelated == NULL) {
4730  }
4731 
4733 
4734  if (!NT_SUCCESS(status)) {
4735  pRelated->DeleteFromFailedCreate();
4736  }
4737 
4738  return status;
4739 }
__drv_restoresIRQL KIRQL __in BOOLEAN Unlock
Definition: fxobject.hpp:1474
CfxDevice * m_Device
Definition: fxobject.hpp:329
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
WDFDEVICE __inline GetHandle(VOID)
Definition: fxdevice.hpp:237
LONG NTSTATUS
Definition: precomp.h:26
KIRQL irql
Definition: wave.h:1
UCHAR KIRQL
Definition: env_spec_w32.h:591
_Must_inspect_result_ _In_ WDFDEVICE _In_ PDEVICE_OBJECT DependentDevice
Definition: wdfdevice.h:2260
_Must_inspect_result_ NTSTATUS Add(__in PFX_DRIVER_GLOBALS Globals, __inout FxRelatedDevice *Entry)
FxRelatedDeviceList * m_UsageDependentDeviceList
Definition: fxpkgpnp.hpp:4113
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
#define TRACINGPNP
Definition: dbgtrace.h:67
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxobject.hpp:734
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
#define NULL
Definition: types.h:112
VOID DeleteFromFailedCreate(VOID)
Definition: fxobject.cpp:391
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
Definition: wdfsync.h:124
#define STATUS_SUCCESS
Definition: shellext.h:65
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

◆ AdjustUsageCount()

LONG FxPkgPnp::AdjustUsageCount ( __in DEVICE_USAGE_NOTIFICATION_TYPE  Usage,
__in BOOLEAN  Add 
)
inlineprotected

Definition at line 3147 of file fxpkgpnp.hpp.

3151  {
3152  if (Add) {
3154  }
3155  else {
3157  }
3158  }
_Must_inspect_result_ _In_ USAGE _In_ USHORT _In_ USAGE Usage
Definition: hidpi.h:382
LONG m_SpecialFileCount[WdfSpecialFileMax-1]
Definition: fxpkgpnp.hpp:4139
#define InterlockedDecrement
Definition: armddk.h:52
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1

Referenced by RevertUsageNotificationFlags(), and SetUsageNotificationFlags().

◆ AllocateDmaEnablerList()

_Must_inspect_result_ NTSTATUS FxPkgPnp::AllocateDmaEnablerList ( VOID  )

Definition at line 241 of file fxpkgpnpkm.cpp.

244 {
247  KIRQL irql;
248 
249  if (m_DmaEnablerList != NULL) {
250  return STATUS_SUCCESS;
251  }
252 
253  Lock(&irql);
254  if (m_DmaEnablerList == NULL) {
256 
257  if (pList != NULL) {
260  }
261  else {
263  }
264  }
265  else {
266  //
267  // Already have a DMA list
268  //
270  }
271  Unlock(irql);
272 
273  return status;
274 }
__drv_restoresIRQL KIRQL __in BOOLEAN Unlock
Definition: fxobject.hpp:1474
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
LONG NTSTATUS
Definition: precomp.h:26
KIRQL irql
Definition: wave.h:1
FxSpinLockTransactionedList * m_DmaEnablerList
Definition: fxpkgpnp.hpp:4227
UCHAR KIRQL
Definition: env_spec_w32.h:591
FxChildList * pList
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxobject.hpp:734
#define NULL
Definition: types.h:112
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
Definition: wdfsync.h:124
#define STATUS_SUCCESS
Definition: shellext.h:65
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

Referenced by FxDevice::AllocateDmaEnablerList().

◆ AllocateEnumInfo()

_Must_inspect_result_ NTSTATUS FxPkgPnp::AllocateEnumInfo ( VOID  )

Definition at line 4920 of file fxpkgpnp.cpp.

4923 {
4924  KIRQL irql;
4925  NTSTATUS status;
4926 
4927  if (m_EnumInfo != NULL) {
4928  return STATUS_SUCCESS;
4929  }
4930 
4931  Lock(&irql);
4932  if (m_EnumInfo == NULL) {
4934 
4935  if (m_EnumInfo != NULL) {
4937 
4938  if (!NT_SUCCESS(status)) {
4939  delete m_EnumInfo;
4940  m_EnumInfo = NULL;
4941 
4943  TRACINGPNP,
4944  "Could not initialize enum info for "
4945  "WDFDEVICE %p, %!STATUS!",
4946  m_Device->GetHandle(), status);
4947  }
4948 
4949  }
4950  else {
4952 
4954  "Could not allocate enum info for WDFDEVICE %p, "
4955  "%!STATUS!", m_Device->GetHandle(), status);
4956  }
4957  }
4958  else {
4959  //
4960  // another thread allocated the list already
4961  //
4963  }
4964  Unlock(irql);
4965 
4966  return status;
4967 }
__drv_restoresIRQL KIRQL __in BOOLEAN Unlock
Definition: fxobject.hpp:1474
CfxDevice * m_Device
Definition: fxobject.hpp:329
NTSTATUS Initialize(VOID)
Definition: fxpkgpnp.hpp:442
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
WDFDEVICE __inline GetHandle(VOID)
Definition: fxdevice.hpp:237
LONG NTSTATUS
Definition: precomp.h:26
KIRQL irql
Definition: wave.h:1
UCHAR KIRQL
Definition: env_spec_w32.h:591
FxEnumerationInfo * m_EnumInfo
Definition: fxpkgpnp.hpp:4215
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
#define TRACINGPNP
Definition: dbgtrace.h:67
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxobject.hpp:734
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
#define NULL
Definition: types.h:112
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
Definition: wdfsync.h:124
#define STATUS_SUCCESS
Definition: shellext.h:65
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

Referenced by FxDevice::AllocateEnumInfo(), and FxPkgFdo::Initialize().

◆ AskParentToRemoveAndReenumerate()

virtual NTSTATUS FxPkgPnp::AskParentToRemoveAndReenumerate ( VOID  )
privatepure virtual

Implemented in FxPkgPdo, and FxPkgFdo.

Referenced by SetDeviceFailed().

◆ AssignPowerFrameworkSettings()

NTSTATUS FxPkgPnp::AssignPowerFrameworkSettings ( __in PWDF_POWER_FRAMEWORK_SETTINGS  PowerFrameworkSettings)

Definition at line 6243 of file fxpkgpnp.cpp.

6246 {
6247 // NTSTATUS status;
6248 // PPO_FX_COMPONENT_IDLE_STATE idleStates = NULL;
6249 // ULONG idleStatesSize = 0;
6250 // PPO_FX_COMPONENT component = NULL;
6251 // ULONG componentSize = 0;
6252 // PPOX_SETTINGS poxSettings = NULL;
6253 // ULONG poxSettingsSize = 0;
6254 // BYTE * buffer = NULL;
6255 
6256 // if (FALSE==(IdleTimeoutManagement::_SystemManagedIdleTimeoutAvailable())) {
6257 // //
6258 // // If system-managed idle timeout is not available on this OS, then
6259 // // there is nothing to do.
6260 // //
6261 // DoTraceLevelMessage(
6262 // GetDriverGlobals(), TRACE_LEVEL_INFORMATION, TRACINGPNP,
6263 // "WDFDEVICE %p !devobj %p Power framework is not supported on the "
6264 // "current OS. Therefore, the power framework settings will not take "
6265 // "effect.",
6266 // m_Device->GetHandle(),
6267 // m_Device->GetDeviceObject()
6268 // );
6269 // return STATUS_SUCCESS;
6270 // }
6271 
6272 // if (NULL != PowerFrameworkSettings->Component) {
6273 // //
6274 // // Caller should ensure that IdleStateCount is not zero
6275 // //
6276 // ASSERT(0 != PowerFrameworkSettings->Component->IdleStateCount);
6277 
6278 // //
6279 // // Compute buffer size needed for storing F-states
6280 // //
6281 // status = RtlULongMult(
6282 // PowerFrameworkSettings->Component->IdleStateCount,
6283 // sizeof(*(PowerFrameworkSettings->Component->IdleStates)),
6284 // &idleStatesSize
6285 // );
6286 // if (FALSE == NT_SUCCESS(status)) {
6287 // DoTraceLevelMessage(
6288 // GetDriverGlobals(), TRACE_LEVEL_ERROR, TRACINGPNP,
6289 // "WDFDEVICE %p !devobj %p Unable to compute length of buffer "
6290 // "required to store F-states. RtlULongMult failed with "
6291 // "%!STATUS!",
6292 // m_Device->GetHandle(),
6293 // m_Device->GetDeviceObject(),
6294 // status
6295 // );
6296 // goto exit;
6297 // }
6298 
6299 // //
6300 // // Compute buffer size needed for storing component information
6301 // // (including F-states)
6302 // //
6303 // status = RtlULongAdd(idleStatesSize,
6304 // sizeof(*component),
6305 // &componentSize);
6306 // if (FALSE == NT_SUCCESS(status)) {
6307 // DoTraceLevelMessage(
6308 // GetDriverGlobals(), TRACE_LEVEL_ERROR, TRACINGPNP,
6309 // "WDFDEVICE %p !devobj %p Unable to compute length of buffer "
6310 // "required to store driver's component information. RtlULongAdd "
6311 // "failed with %!STATUS!",
6312 // m_Device->GetHandle(),
6313 // m_Device->GetDeviceObject(),
6314 // status
6315 // );
6316 // goto exit;
6317 // }
6318 // }
6319 
6320 // //
6321 // // Compute total buffer size needed for power framework settings
6322 // //
6323 // status = RtlULongAdd(componentSize,
6324 // sizeof(*poxSettings),
6325 // &poxSettingsSize);
6326 // if (FALSE == NT_SUCCESS(status)) {
6327 // DoTraceLevelMessage(
6328 // GetDriverGlobals(), TRACE_LEVEL_ERROR, TRACINGPNP,
6329 // "WDFDEVICE %p !devobj %p Unable to compute length of buffer "
6330 // "required to store driver's power framework settings. RtlULongAdd "
6331 // "failed with %!STATUS!",
6332 // m_Device->GetHandle(),
6333 // m_Device->GetDeviceObject(),
6334 // status
6335 // );
6336 // goto exit;
6337 // }
6338 
6339 // //
6340 // // Allocate memory to copy the settings
6341 // //
6342 // buffer = (BYTE *) MxMemory::MxAllocatePoolWithTag(NonPagedPool,
6343 // poxSettingsSize,
6344 // GetDriverGlobals()->Tag);
6345 // if (NULL == buffer) {
6346 // status = STATUS_INSUFFICIENT_RESOURCES;
6347 //