ReactOS  0.4.15-dev-2947-g59e1b78
FxPkgPdo Class Reference

#include <fxpkgpdo.hpp>

Inheritance diagram for FxPkgPdo:
Collaboration diagram for FxPkgPdo:

Public Member Functions

 FxPkgPdo (__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in CfxDevice *Device)
 
 ~FxPkgPdo ()
 
virtual _Must_inspect_result_ NTSTATUS Initialize (__in PWDFDEVICE_INIT DeviceInit)
 
virtual VOID FinishInitialize (__in PWDFDEVICE_INIT DeviceInit)
 
VOID RegisterCallbacks (__in PWDF_PDO_EVENT_CALLBACKS DispatchTable)
 
_Must_inspect_result_ NTSTATUS AddEjectionDevice (__in MdDeviceObject DependentDevice)
 
VOID RemoveEjectionDevice (__in MdDeviceObject DependentDevice)
 
VOID ClearEjectionDevicesList (VOID)
 
_Must_inspect_result_ NTSTATUS HandleQueryInterfaceForReenumerate (__in FxIrp *Irp, __out PBOOLEAN CompleteRequest)
 
__inline BOOLEAN IsForwardRequestToParentEnabled (VOID)
 
- Public Member Functions inherited from FxPkgPnp
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)
 
_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

SINGLE_LIST_ENTRY m_DeviceTextHead
 
LCID m_DefaultLocale
 
FxDeviceDescriptionEntrym_Description
 
FxChildListm_OwningChildList
 
FxPnpDeviceResourcesQuery m_DeviceResourcesQuery
 
FxPnpDeviceResourceRequirementsQuery m_DeviceResourceRequirementsQuery
 
FxPnpDeviceEject m_DeviceEject
 
FxPnpDeviceSetLock m_DeviceSetLock
 
FxPowerDeviceEnableWakeAtBus m_DeviceEnableWakeAtBus
 
FxPowerDeviceDisableWakeAtBus m_DeviceDisableWakeAtBus
 
FxPnpDeviceReportedMissing m_DeviceReportedMissing
 
BOOLEAN m_RawOK
 
BOOLEAN m_Static
 
BOOLEAN m_AddedToStaticList
 
BOOLEAN m_AllowForwardRequestToParent
 
- Public Attributes inherited from FxPkgPnp
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 Attributes

PWSTR m_DeviceID
 
PWSTR m_InstanceID
 
PWSTR m_HardwareIDs
 
PWSTR m_CompatibleIDs
 
PWSTR m_ContainerID
 
PWSTR m_IDsAllocation
 
FxRelatedDeviceListm_EjectionDeviceList
 
MxEventm_DeviceEjectProcessed
 
BOOLEAN m_CanBeDeleted
 
BOOLEAN m_EnableWakeAtBusInvoked
 
- Protected Attributes inherited from FxPkgPnp
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
 
}; 
 

Private Member Functions

virtual _Must_inspect_result_ NTSTATUS SendIrpSynchronously (__in FxIrp *Irp)
 
virtual _Must_inspect_result_ NTSTATUS FireAndForgetIrp (__inout FxIrp *Irp)
 
_Must_inspect_result_ NTSTATUS PnpQueryDeviceRelations (__inout FxIrp *Irp)
 
_Must_inspect_result_ NTSTATUS PnpQueryCapabilities (__inout FxIrp *Irp)
 
VOID HandleQueryCapabilities (__inout PDEVICE_CAPABILITIES ReportedCaps, __in PDEVICE_CAPABILITIES ParentCaps)
 
_Must_inspect_result_ NTSTATUS PnpQueryResources (__inout FxIrp *Irp)
 
_Must_inspect_result_ NTSTATUS PnpQueryResourceRequirements (__inout FxIrp *Irp)
 
virtual BOOLEAN PnpSendStartDeviceDownTheStackOverload (VOID)
 
virtual WDF_DEVICE_PNP_STATE PnpEventEjectHardwareOverload (VOID)
 
virtual WDF_DEVICE_PNP_STATE PnpEventCheckForDevicePresenceOverload (VOID)
 
virtual WDF_DEVICE_PNP_STATE PnpEventPdoRemovedOverload (VOID)
 
virtual WDF_DEVICE_PNP_STATE PnpEventFdoRemovedOverload (VOID)
 
virtual VOID PnpEventSurpriseRemovePendingOverload (VOID)
 
virtual WDF_DEVICE_PNP_STATE PnpGetPostRemoveState (VOID)
 
_Must_inspect_result_ NTSTATUS DispatchSystemSetPower (__in FxIrp *Irp)
 
_Must_inspect_result_ NTSTATUS DispatchDeviceSetPower (__in FxIrp *Irp)
 
virtual _Must_inspect_result_ NTSTATUS PowerCheckParentOverload (__in BOOLEAN *ParentOn)
 
virtual WDF_DEVICE_POWER_STATE PowerCheckDeviceTypeOverload (VOID)
 
virtual WDF_DEVICE_POWER_STATE PowerCheckDeviceTypeNPOverload (VOID)
 
virtual _Must_inspect_result_ NTSTATUS PowerEnableWakeAtBusOverload (VOID)
 
virtual VOID PowerDisableWakeAtBusOverload (VOID)
 
virtual VOID PowerParentPowerDereference (VOID)
 
virtual VOID PowerReleasePendingDeviceIrp (__in BOOLEAN IrpMustBePresent=TRUE)
 
virtual _Must_inspect_result_ NTSTATUS ProcessRemoveDeviceOverload (__inout FxIrp *Irp)
 
virtual VOID DeleteSymbolicLinkOverload (__in BOOLEAN GracefulRemove)
 
virtual VOID QueryForReenumerationInterface (VOID)
 
virtual VOID ReleaseReenumerationInterface (VOID)
 
virtual _Must_inspect_result_ NTSTATUS AskParentToRemoveAndReenumerate (VOID)
 
virtual _Must_inspect_result_ NTSTATUS QueryForPowerThread (VOID)
 
virtual const PFN_PNP_POWER_CALLBACKGetDispatchPnp (VOID)
 
virtual const PFN_PNP_POWER_CALLBACKGetDispatchPower (VOID)
 
VOID PowerNotifyParentChildWakeArmed (VOID)
 
VOID PowerNotifyParentChildWakeDisarmed (VOID)
 

Static Private Member Functions

static _Must_inspect_result_ NTSTATUS _PnpCompleteIrp (__in FxPkgPnp *This, __inout FxIrp *Irp)
 
static _Must_inspect_result_ NTSTATUS _PnpQueryDeviceRelations (__in FxPkgPnp *This, __inout FxIrp *Irp)
 
static _Must_inspect_result_ NTSTATUS _PnpQueryInterface (IN FxPkgPnp *This, IN FxIrp *Irp)
 
static _Must_inspect_result_ NTSTATUS _PnpQueryCapabilities (__inout FxPkgPnp *This, __inout FxIrp *Irp)
 
static VOID STDCALL _QueryCapsWorkItem (__in MdDeviceObject DeviceObject, __in PVOID Context)
 
static _Must_inspect_result_ NTSTATUS _PnpQueryResources (__inout FxPkgPnp *This, __inout FxIrp *Irp)
 
static _Must_inspect_result_ NTSTATUS _PnpQueryResourceRequirements (__inout FxPkgPnp *This, __inout FxIrp *Irp)
 
static _Must_inspect_result_ NTSTATUS _PnpQueryDeviceText (__inout FxPkgPnp *This, __inout FxIrp *Irp)
 
static _Must_inspect_result_ NTSTATUS _PnpFilterResourceRequirements (__inout FxPkgPnp *This, __inout FxIrp *Irp)
 
static _Must_inspect_result_ NTSTATUS _PnpEject (__inout FxPkgPnp *This, __inout FxIrp *Irp)
 
static _Must_inspect_result_ NTSTATUS _PnpSetLock (__inout FxPkgPnp *This, __inout FxIrp *Irp)
 
static _Must_inspect_result_ NTSTATUS _PnpQueryId (__inout FxPkgPnp *This, __inout FxIrp *Irp)
 
static _Must_inspect_result_ NTSTATUS _PnpQueryPnpDeviceState (__inout FxPkgPnp *This, __inout FxIrp *Irp)
 
static _Must_inspect_result_ NTSTATUS _PnpQueryBusInformation (__inout FxPkgPnp *This, __inout FxIrp *Irp)
 
static _Must_inspect_result_ NTSTATUS _PnpSurpriseRemoval (__inout FxPkgPnp *This, __inout FxIrp *Irp)
 
static _Must_inspect_result_ NTSTATUS _DispatchPowerSequence (__inout FxPkgPnp *This, __in FxIrp *Irp)
 
static _Must_inspect_result_ NTSTATUS _DispatchSetPower (__inout FxPkgPnp *This, __in FxIrp *Irp)
 
static _Must_inspect_result_ NTSTATUS _DispatchQueryPower (__inout FxPkgPnp *This, __in FxIrp *Irp)
 
static VOID STDCALL _RemoveAndReenumerateSelf (__in PVOID Context)
 

Static Private Attributes

static const PFN_PNP_POWER_CALLBACK m_PdoPnpFunctionTable [IRP_MN_SURPRISE_REMOVAL+1]
 
static const PFN_PNP_POWER_CALLBACK m_PdoPowerFunctionTable [IRP_MN_QUERY_POWER+1]
 

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)
 
- Protected Member Functions inherited from FxPkgPnp
 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)
 
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)
 
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 NTSTATUS PowerCheckParentOverload (BOOLEAN *ParentOn)=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 inherited from FxPkgPnp
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)
 
- Static Protected Attributes inherited from FxPkgPnp
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
 

Detailed Description

Definition at line 31 of file fxpkgpdo.hpp.

Constructor & Destructor Documentation

◆ FxPkgPdo()

FxPkgPdo::FxPkgPdo ( __in PFX_DRIVER_GLOBALS  FxDriverGlobals,
__in CfxDevice Device 
)

Definition at line 81 of file fxpkgpdo.cpp.

84  :
85  FxPkgPnp(FxDriverGlobals, Device, FX_TYPE_PACKAGE_PDO)
86 /*++
87 
88 Routine Description:
89 
90  This is the constructor for the FxPkgPdo. Don't do any initialization
91  that might fail here.
92 
93 Arguments:
94 
95  none
96 
97 Returns:
98 
99  none
100 
101 --*/
102 
103 {
105 
106  m_DeviceID = NULL;
107  m_InstanceID = NULL;
112 
113  m_RawOK = FALSE;
114  m_Static = FALSE;
116 
117  //
118  // By default the PDO is the owner of wait wake irps (only case where this
119  // wouldn't be the case is for a bus filter to be sitting above us).
120  //
122 
125 
128 
131 }
#define TRUE
Definition: types.h:120
PWSTR m_DeviceID
Definition: fxpkgpdo.hpp:77
BOOLEAN m_AddedToStaticList
Definition: fxpkgpdo.hpp:63
PWSTR m_CompatibleIDs
Definition: fxpkgpdo.hpp:98
BOOLEAN m_CanBeDeleted
Definition: fxpkgpdo.hpp:123
PWSTR m_InstanceID
Definition: fxpkgpdo.hpp:84
#define FALSE
Definition: types.h:117
PWSTR m_HardwareIDs
Definition: fxpkgpdo.hpp:91
BOOLEAN m_RawOK
Definition: fxpkgpdo.hpp:59
FxChildList * m_OwningChildList
Definition: fxpkgpdo.hpp:42
PWSTR m_ContainerID
Definition: fxpkgpdo.hpp:105
BOOLEAN m_EnableWakeAtBusInvoked
Definition: fxpkgpdo.hpp:141
struct _SINGLE_LIST_ENTRY * Next
Definition: ntbasedef.h:629
BOOLEAN m_Static
Definition: fxpkgpdo.hpp:61
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474
FxDeviceDescriptionEntry * m_Description
Definition: fxpkgpdo.hpp:40
PWSTR m_IDsAllocation
Definition: fxpkgpdo.hpp:111
#define NULL
Definition: types.h:112
MxEvent * m_DeviceEjectProcessed
Definition: fxpkgpdo.hpp:121
SharedPowerData m_SharedPower
Definition: fxpkgpnp.hpp:4161
FxPkgPnp(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in CfxDevice *Device, __in WDFTYPE Type)
Definition: fxpkgpnp.cpp:48
FxRelatedDeviceList * m_EjectionDeviceList
Definition: fxpkgpdo.hpp:113
SINGLE_LIST_ENTRY m_DeviceTextHead
Definition: fxpkgpdo.hpp:37
BOOLEAN m_WaitWakeOwner
Definition: fxpkgpnp.hpp:186

◆ ~FxPkgPdo()

FxPkgPdo::~FxPkgPdo ( )

Definition at line 133 of file fxpkgpdo.cpp.

151 {
152  //
153  // If IoCreateDevice fails on a dynamically created PDO, m_Description will
154  // be != NULL b/c we will not go through the pnp state machine in its entirety
155  // for cleanup. FxChildList will need a valid m_Description to cleanup upon
156  // failure from EvtChildListDeviceCrate, so we just leave m_Description alone
157  // here if != NULL.
158  //
159  // ASSERT(m_Description == NULL);
160 
162 
163  //
164  // This will free the underlying memory for m_DeviceID, m_InstanceID,
165  // m_HardwareIDs, m_CompatibleIDs and m_ContainerID
166  //
167  if (m_IDsAllocation != NULL) {
170  }
171 
172  if (m_OwningChildList != NULL) {
173  m_OwningChildList->RELEASE(this);
174  }
175 
176  if (m_EjectionDeviceList != NULL) {
177  delete m_EjectionDeviceList;
179  }
180 }
FxChildList * m_OwningChildList
Definition: fxpkgpdo.hpp:42
static void _CleanupList(__inout PSINGLE_LIST_ENTRY Head)
PWSTR m_IDsAllocation
Definition: fxpkgpdo.hpp:111
#define NULL
Definition: types.h:112
void FxPoolFree(__in_xcount(ptr is at an offset from AllocationStart) PVOID ptr)
Definition: wdfpool.cpp:361
FxRelatedDeviceList * m_EjectionDeviceList
Definition: fxpkgpdo.hpp:113
SINGLE_LIST_ENTRY m_DeviceTextHead
Definition: fxpkgpdo.hpp:37

Member Function Documentation

◆ _DispatchPowerSequence()

_Must_inspect_result_ NTSTATUS FxPkgPdo::_DispatchPowerSequence ( __inout FxPkgPnp This,
__in FxIrp Irp 
)
staticprivate

Definition at line 39 of file pdopower.cpp.

57 {
58  return ((FxPkgPdo*) This)->CompletePowerRequest(Irp, STATUS_NOT_SUPPORTED);
59 }
return STATUS_NOT_SUPPORTED
_In_ PIRP Irp
Definition: csq.h:116

◆ _DispatchQueryPower()

_Must_inspect_result_ NTSTATUS FxPkgPdo::_DispatchQueryPower ( __inout FxPkgPnp This,
__in FxIrp Irp 
)
staticprivate

Definition at line 201 of file pdopower.cpp.

219 {
220  FxPkgPdo* pThis;
222 
223  pThis = ((FxPkgPdo*) This);
224 
225  if (Irp->GetParameterPowerType() == SystemPowerState
226  &&
227  This->PowerPolicyIsWakeEnabled()) {
228 
230  Irp->GetParameterPowerStateSystemState()
231  );
232  }
233  else {
235  }
236 
237  return pThis->CompletePowerRequest(Irp, status);
238 }
_Must_inspect_result_ NTSTATUS PowerPolicyHandleSystemQueryPower(__in SYSTEM_POWER_STATE QueryState)
Definition: fxpkgpnp.cpp:3582
LONG NTSTATUS
Definition: precomp.h:26
_In_ PIRP Irp
Definition: csq.h:116
NTSTATUS CompletePowerRequest(__inout FxIrp *Irp, __in NTSTATUS Status)
Definition: fxpkgpnp.cpp:5404
#define STATUS_SUCCESS
Definition: shellext.h:65
_In_ SYSTEM_POWER_STATE SystemPowerState
Definition: iotypes.h:7519
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

◆ _DispatchSetPower()

_Must_inspect_result_ NTSTATUS FxPkgPdo::_DispatchSetPower ( __inout FxPkgPnp This,
__in FxIrp Irp 
)
staticprivate

Definition at line 63 of file pdopower.cpp.

84 {
85  if (Irp->GetParameterPowerType() == SystemPowerState) {
87  }
88  else {
90  }
91 }
_In_ PIRP Irp
Definition: csq.h:116
_Must_inspect_result_ NTSTATUS DispatchSystemSetPower(__in FxIrp *Irp)
Definition: pdopower.cpp:95
_In_ SYSTEM_POWER_STATE SystemPowerState
Definition: iotypes.h:7519
_Must_inspect_result_ NTSTATUS DispatchDeviceSetPower(__in FxIrp *Irp)
Definition: pdopower.cpp:151

◆ _PnpCompleteIrp()

_Must_inspect_result_ NTSTATUS FxPkgPdo::_PnpCompleteIrp ( __in FxPkgPnp This,
__inout FxIrp Irp 
)
staticprivate

Definition at line 414 of file fxpkgpdo.cpp.

418 {
419  return ((FxPkgPdo*) This)->CompletePnpRequest(Irp, Irp->GetStatus());
420 }
_In_ PIRP Irp
Definition: csq.h:116

◆ _PnpEject()

_Must_inspect_result_ NTSTATUS FxPkgPdo::_PnpEject ( __inout FxPkgPnp This,
__inout FxIrp Irp 
)
staticprivate

Definition at line 968 of file fxpkgpdo.cpp.

991 {
992  MxEvent event;
993  FxPkgPdo* pdoPkg;
995 
996  pdoPkg = (FxPkgPdo*)This;
997 
998  //
999  // This will make sure no new state changing pnp irps arrive while
1000  // we are still processing this one. Also, note that irp is not being
1001  // marked pending.
1002  //
1003  pdoPkg->SetPendingPnpIrp(Irp, FALSE);
1004 
1005  status = event.Initialize(SynchronizationEvent, FALSE);
1006  if (!NT_SUCCESS(status)) {
1007 
1010  "Event allocation failed while processing eject for WDFDEVICE %p,"
1011  " %!STATUS!",
1012  pdoPkg->m_Device->GetHandle(), status);
1013  }
1014  else {
1015  ASSERT(pdoPkg->m_DeviceEjectProcessed == NULL);
1016  pdoPkg->m_DeviceEjectProcessed = event.GetSelfPointer();
1017 
1018  //
1019  // let state machine process eject
1020  //
1021  pdoPkg->PnpProcessEvent(PnpEventEject);
1022 
1023  //
1024  // No need to wait in a critical region because we are in the context of a
1025  // pnp request which is in the system context.
1026  //
1027  event.WaitFor(Executive, KernelMode, FALSE, NULL);
1028 
1029  pdoPkg->m_DeviceEjectProcessed = NULL;
1030 
1031  status = Irp->GetStatus();
1032  }
1033 
1034  //
1035  // complete request
1036  //
1037 
1038  pdoPkg->ClearPendingPnpIrp();
1039  pdoPkg->CompletePnpRequest(Irp, status);
1040 
1041  return status;
1042 }
CfxDevice * m_Device
Definition: fxobject.hpp:329
VOID PnpProcessEvent(__in FxPnpEvent Event, __in BOOLEAN ProcessEventOnDifferentThread=FALSE)
WDFDEVICE __inline GetHandle(VOID)
Definition: fxdevice.hpp:237
LONG NTSTATUS
Definition: precomp.h:26
VOID SetPendingPnpIrp(__inout FxIrp *Irp, __in BOOLEAN MarkIrpPending=TRUE)
Definition: fxpkgpnp.cpp:4883
MxEvent * GetSelfPointer(VOID)
Definition: mxevent.h:110
#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
MdIrp ClearPendingPnpIrp(VOID)
Definition: fxpkgpnp.hpp:3029
#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
MxEvent * m_DeviceEjectProcessed
Definition: fxpkgpdo.hpp:121
static SERVICE_STATUS status
Definition: service.c:31
NTSTATUS CompletePnpRequest(__inout FxIrp *Irp, __in NTSTATUS Status)
Definition: fxpkgpnp.cpp:5752
Definition: ps.c:97

◆ _PnpFilterResourceRequirements()

_Must_inspect_result_ NTSTATUS FxPkgPdo::_PnpFilterResourceRequirements ( __inout FxPkgPnp This,
__inout FxIrp Irp 
)
staticprivate

Definition at line 343 of file fxpkgpdokm.cpp.

362 {
364 
365  //
366  // Give the Framework objects a pass at the list.
367  //
368  status = ((FxPkgPdo*) This)->FilterResourceRequirements(
369  (PIO_RESOURCE_REQUIREMENTS_LIST*)(&Irp->GetIrp()->IoStatus.Information)
370  );
371 
372  if (NT_SUCCESS(status)) {
373  //
374  // Upon successful internal filtering, return the embedded status.
375  //
376  status = Irp->GetStatus();
377  }
378  else {
379  //
380  // Only on failure do we change the status of the irp
381  //
382  Irp->SetStatus(status);
383  }
384 
385  return ((FxPkgPdo*) This)->CompletePnpRequest(Irp, status);
386 }
LONG NTSTATUS
Definition: precomp.h:26
_In_ PIRP Irp
Definition: csq.h:116
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

◆ _PnpQueryBusInformation()

_Must_inspect_result_ NTSTATUS FxPkgPdo::_PnpQueryBusInformation ( __inout FxPkgPnp This,
__inout FxIrp Irp 
)
staticprivate

Definition at line 1529 of file fxpkgpdo.cpp.

1547 {
1548  FxPkgPdo* pThis;
1549  NTSTATUS status;
1550 
1551  pThis = (FxPkgPdo*) This;
1552 
1553  status = pThis->m_Device->m_ParentDevice->m_PkgPnp->
1555 
1556  return pThis->CompletePnpRequest(Irp, status);
1557 }
CfxDevice * m_Device
Definition: fxobject.hpp:329
CfxDevice * m_ParentDevice
Definition: fxdevice.hpp:569
_Must_inspect_result_ NTSTATUS HandleQueryBusInformation(__inout FxIrp *Irp)
Definition: fxpkgpnp.cpp:947
LONG NTSTATUS
Definition: precomp.h:26
_In_ PIRP Irp
Definition: csq.h:116
FxPkgPnp * m_PkgPnp
Definition: fxdevice.hpp:670
static SERVICE_STATUS status
Definition: service.c:31
NTSTATUS CompletePnpRequest(__inout FxIrp *Irp, __in NTSTATUS Status)
Definition: fxpkgpnp.cpp:5752
Definition: ps.c:97

◆ _PnpQueryCapabilities()

_Must_inspect_result_ NTSTATUS FxPkgPdo::_PnpQueryCapabilities ( __inout FxPkgPnp This,
__inout FxIrp Irp 
)
staticprivate

Definition at line 551 of file fxpkgpdo.cpp.

555 {
556  return ((FxPkgPdo*) This)->PnpQueryCapabilities(Irp);
557 }
_In_ PIRP Irp
Definition: csq.h:116

◆ _PnpQueryDeviceRelations()

_Must_inspect_result_ NTSTATUS FxPkgPdo::_PnpQueryDeviceRelations ( __in FxPkgPnp This,
__inout FxIrp Irp 
)
staticprivate

Definition at line 424 of file fxpkgpdo.cpp.

428 {
429  return ((FxPkgPdo*) This)->PnpQueryDeviceRelations(Irp);
430 }
_In_ PIRP Irp
Definition: csq.h:116

◆ _PnpQueryDeviceText()

_Must_inspect_result_ NTSTATUS FxPkgPdo::_PnpQueryDeviceText ( __inout FxPkgPnp This,
__inout FxIrp Irp 
)
staticprivate

Definition at line 858 of file fxpkgpdo.cpp.

880 {
881  FxPkgPdo* pThis;
882  LCID localeId;
883  FxDeviceText *pDeviceTextObject;
886 
887  pThis = (FxPkgPdo*) This;
889 
890  localeId = Irp->GetParameterQueryDeviceTextLocaleId();
891  status = Irp->GetStatus();
892 
893  //
894  // The PDO package maintains a collection of "DeviceText" objects. We
895  // will look up the item in the collection with the "appropriate" locale.
896  //
897  // If no entries are found in the collection for the given locale, then
898  // we will use the "default locale" property of the PDO and use the
899  // entry for the "default locale".
900  //
901 
902  //
903  // Try to find the FxDeviceText object for the given locale.
904  //
905  pDeviceTextObject = FindObjectForGivenLocale(
906  &pThis->m_DeviceTextHead, localeId);
907 
908  if (pDeviceTextObject == NULL) {
909  pDeviceTextObject = FindObjectForGivenLocale(
910  &pThis->m_DeviceTextHead, pThis->m_DefaultLocale);
911  }
912 
913  if (pDeviceTextObject != NULL) {
914  PWCHAR pInformation;
915 
916  pInformation = NULL;
917 
918  switch (Irp->GetParameterQueryDeviceTextType()) {
920  pInformation = pDeviceTextObject->m_Description;
921  break;
922 
924  pInformation = pDeviceTextObject->m_LocationInformation;
925  break;
926  }
927 
928  //
929  // Information should now point to a valid unicode string.
930  //
931  if (pInformation != NULL) {
932  PWCHAR pBuffer;
933  size_t length;
934 
935  length = (wcslen(pInformation) + 1) * sizeof(WCHAR);
936 
937  //
938  // Make sure the information field of the IRP isn't already set.
939  //
940  ASSERT(Irp->GetInformation() == NULL);
941 
944 
945  if (pBuffer != NULL) {
946  RtlCopyMemory(pBuffer, pInformation, length);
947  Irp->SetInformation((ULONG_PTR) pBuffer);
948 
950  }
951  else {
953 
956  "WDFDEVICE %p failing Query Device Text, type %d, %!STATUS!",
957  pThis->m_Device->GetHandle(),
958  Irp->GetParameterQueryDeviceTextType(), status);
959  }
960  }
961  }
962 
963  return pThis->CompletePnpRequest(Irp, status);
964 }
CfxDevice * m_Device
Definition: fxobject.hpp:329
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
WDFDEVICE __inline GetHandle(VOID)
Definition: fxdevice.hpp:237
PWCHAR m_Description
LONG NTSTATUS
Definition: precomp.h:26
DWORD LCID
Definition: nls.h:13
uint16_t * PWCHAR
Definition: typedefs.h:56
PWCHAR m_LocationInformation
uint32_t ULONG_PTR
Definition: typedefs.h:65
_In_ PIRP Irp
Definition: csq.h:116
static __inline PVOID MxAllocatePoolWithTag(__in POOL_TYPE PoolType, __in SIZE_T NumberOfBytes, __in ULONG Tag)
Definition: mxmemorykm.h:30
LCID m_DefaultLocale
Definition: fxpkgpdo.hpp:38
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
PVOID pBuffer
PFX_DRIVER_GLOBALS pFxDriverGlobals
#define ASSERT(a)
Definition: mode.c:44
__wchar_t WCHAR
Definition: xmlstorage.h:180
#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
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define STATUS_SUCCESS
Definition: shellext.h:65
static SERVICE_STATUS status
Definition: service.c:31
SINGLE_LIST_ENTRY m_DeviceTextHead
Definition: fxpkgpdo.hpp:37
NTSTATUS CompletePnpRequest(__inout FxIrp *Irp, __in NTSTATUS Status)
Definition: fxpkgpnp.cpp:5752
Definition: ps.c:97
FxDeviceText * FindObjectForGivenLocale(__in PSINGLE_LIST_ENTRY Head, __in LCID LocaleId)
Definition: fxpkgpdo.cpp:820

◆ _PnpQueryId()

_Must_inspect_result_ NTSTATUS FxPkgPdo::_PnpQueryId ( __inout FxPkgPnp This,
__inout FxIrp Irp 
)
staticprivate

Definition at line 1359 of file fxpkgpdo.cpp.

1363 {
1364  FxPkgPdo* pThis;
1365  NTSTATUS status;
1366  PWCHAR pBuffer;
1367  PCWSTR pSrc;
1368  size_t cbLength;
1370  BUS_QUERY_ID_TYPE queryIdType;
1371 
1372  pThis = (FxPkgPdo*) This;
1374  status = Irp->GetStatus();
1375  cbLength = 0;
1376 
1377  queryIdType = Irp->GetParameterQueryIdType();
1378 
1379  switch (queryIdType) {
1380  case BusQueryDeviceID:
1381  case BusQueryInstanceID:
1382  case BusQueryContainerID:
1383  if (queryIdType == BusQueryDeviceID) {
1384  pSrc = pThis->m_DeviceID;
1385  }
1386  else if (queryIdType == BusQueryInstanceID) {
1387  pSrc = pThis->m_InstanceID;
1388  }
1389  else {
1390  pSrc = pThis->m_ContainerID;
1391  }
1392 
1393  if (pSrc != NULL) {
1394  cbLength = (wcslen(pSrc) + 1) * sizeof(WCHAR);
1395 
1397  PagedPool, cbLength, pFxDriverGlobals->Tag);
1398  }
1399  else {
1400  status = Irp->GetStatus();
1401  break;
1402  }
1403 
1404  if (pBuffer != NULL) {
1405 
1406  //
1407  // This will copy the NULL terminator too
1408  //
1409  RtlCopyMemory(pBuffer, pSrc, cbLength);
1410  Irp->SetInformation((ULONG_PTR) pBuffer);
1412  }
1413  else {
1415  }
1416  break;
1417 
1418  case BusQueryHardwareIDs:
1419  case BusQueryCompatibleIDs:
1420  if (queryIdType == BusQueryHardwareIDs) {
1421  pSrc = pThis->m_HardwareIDs;
1422  }
1423  else {
1424  pSrc = pThis->m_CompatibleIDs;
1425  }
1426 
1427  if (pSrc != NULL) {
1428  cbLength = FxCalculateTotalMultiSzStringSize(pSrc);
1429  }
1430  else {
1431  //
1432  // Must return an empty list
1433  //
1434  cbLength = 2 * sizeof(UNICODE_NULL);
1435  }
1436 
1438  PagedPool, cbLength, pFxDriverGlobals->Tag);
1439 
1440  if (pBuffer != NULL) {
1441  if (pSrc != NULL) {
1442  RtlCopyMemory(pBuffer, pSrc, cbLength);
1443  }
1444  else {
1445  RtlZeroMemory(pBuffer, cbLength);
1446  }
1447 
1448  Irp->SetInformation((ULONG_PTR) pBuffer);
1450  }
1451  else {
1453  }
1454  break;
1455  }
1456 
1457  if (!NT_SUCCESS(status)) {
1458  Irp->SetInformation(NULL);
1459 
1460  if (status == STATUS_NOT_SUPPORTED) {
1463  "WDFDEVICE %p does not have a string for PnP query IdType "
1464  "%!BUS_QUERY_ID_TYPE!, %!STATUS!",
1465  pThis->m_Device->GetHandle(),
1466  queryIdType, status);
1467  }
1468  else {
1471  "WDFDEVICE %p could not alloc string for PnP query IdType "
1472  "%!BUS_QUERY_ID_TYPE!, %!STATUS!",
1473  pThis->m_Device->GetHandle(),
1474  queryIdType, status);
1475  }
1476  }
1477 
1478  return ((FxPkgPdo*) pThis)->CompletePnpRequest(Irp, status);
1479 }
CfxDevice * m_Device
Definition: fxobject.hpp:329
const uint16_t * PCWSTR
Definition: typedefs.h:57
return STATUS_NOT_SUPPORTED
enum _BUS_QUERY_ID_TYPE BUS_QUERY_ID_TYPE
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
WDFDEVICE __inline GetHandle(VOID)
Definition: fxdevice.hpp:237
LONG NTSTATUS
Definition: precomp.h:26
PWSTR m_DeviceID
Definition: fxpkgpdo.hpp:77
uint16_t * PWCHAR
Definition: typedefs.h:56
PWSTR m_CompatibleIDs
Definition: fxpkgpdo.hpp:98
uint32_t ULONG_PTR
Definition: typedefs.h:65
PWSTR m_InstanceID
Definition: fxpkgpdo.hpp:84
#define UNICODE_NULL
_In_ PIRP Irp
Definition: csq.h:116
PWSTR m_HardwareIDs
Definition: fxpkgpdo.hpp:91
static __inline PVOID MxAllocatePoolWithTag(__in POOL_TYPE PoolType, __in SIZE_T NumberOfBytes, __in ULONG Tag)
Definition: mxmemorykm.h:30
size_t FxCalculateTotalMultiSzStringSize(__in __nullnullterminated PCWSTR MultiSz)
Definition: stringutil.cpp:84
PVOID pBuffer
PFX_DRIVER_GLOBALS pFxDriverGlobals
PWSTR m_ContainerID
Definition: fxpkgpdo.hpp:105
__wchar_t WCHAR
Definition: xmlstorage.h:180
#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
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define STATUS_SUCCESS
Definition: shellext.h:65
static SERVICE_STATUS status
Definition: service.c:31
NTSTATUS CompletePnpRequest(__inout FxIrp *Irp, __in NTSTATUS Status)
Definition: fxpkgpnp.cpp:5752
Definition: ps.c:97

◆ _PnpQueryInterface()

_Must_inspect_result_ NTSTATUS FxPkgPdo::_PnpQueryInterface ( IN FxPkgPnp This,
IN FxIrp Irp 
)
staticprivate

Definition at line 522 of file fxpkgpdo.cpp.

540 {
542  BOOLEAN completeIrp;
543 
544  status = ((FxPkgPdo*) This)->HandleQueryInterface(Irp, &completeIrp);
545 
546  return ((FxPkgPdo*) This)->CompletePnpRequest(Irp, status);
547 }
LONG NTSTATUS
Definition: precomp.h:26
_In_ PIRP Irp
Definition: csq.h:116
unsigned char BOOLEAN
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

◆ _PnpQueryPnpDeviceState()

_Must_inspect_result_ NTSTATUS FxPkgPdo::_PnpQueryPnpDeviceState ( __inout FxPkgPnp This,
__inout FxIrp Irp 
)
staticprivate

Definition at line 1483 of file fxpkgpdo.cpp.

1501 {
1502  PNP_DEVICE_STATE pnpDeviceState;
1503  PFX_DRIVER_GLOBALS FxDriverGlobals = This->GetDriverGlobals();
1504 
1506  "Entering QueryPnpDeviceState handler");
1507 
1508  pnpDeviceState = ((FxPkgPdo*) This)->HandleQueryPnpDeviceState(
1509  (PNP_DEVICE_STATE) Irp->GetInformation());
1510 
1511  Irp->SetInformation((ULONG_PTR) pnpDeviceState);
1512 
1514  FxDriverGlobals, TRACE_LEVEL_INFORMATION, TRACINGPNP,
1515  "WDFDEVICE 0x%p !devobj 0x%p returning PNP_DEVICE_STATE 0x%d IRP 0x%p",
1516  This->GetDevice()->GetHandle(),
1517  This->GetDevice()->GetDeviceObject(),
1518  pnpDeviceState,
1519  Irp->GetIrp());
1520 
1522  "Exiting QueryPnpDeviceState handler");
1523 
1524  return ((FxPkgPdo*) This)->CompletePnpRequest(Irp, STATUS_SUCCESS);
1525 }
ULONG PNP_DEVICE_STATE
Definition: iotypes.h:997
#define TRACE_LEVEL_INFORMATION
Definition: storswtr.h:29
uint32_t ULONG_PTR
Definition: typedefs.h:65
_In_ PIRP Irp
Definition: csq.h:116
#define TRACE_LEVEL_VERBOSE
Definition: storswtr.h:30
#define TRACINGPNP
Definition: dbgtrace.h:67
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
#define STATUS_SUCCESS
Definition: shellext.h:65

◆ _PnpQueryResourceRequirements()

_Must_inspect_result_ NTSTATUS FxPkgPdo::_PnpQueryResourceRequirements ( __inout FxPkgPnp This,
__inout FxIrp Irp 
)
staticprivate

Definition at line 131 of file fxpkgpdokm.cpp.

135 {
136  return ((FxPkgPdo*) This)->PnpQueryResourceRequirements(Irp);
137 }
_In_ PIRP Irp
Definition: csq.h:116

◆ _PnpQueryResources()

_Must_inspect_result_ NTSTATUS FxPkgPdo::_PnpQueryResources ( __inout FxPkgPnp This,
__inout FxIrp Irp 
)
staticprivate

Definition at line 39 of file fxpkgpdokm.cpp.

43 {
44  return ((FxPkgPdo*) This)->PnpQueryResources(Irp);
45 }
_In_ PIRP Irp
Definition: csq.h:116

◆ _PnpSetLock()

_Must_inspect_result_ NTSTATUS FxPkgPdo::_PnpSetLock ( __inout FxPkgPnp This,
__inout FxIrp Irp 
)
staticprivate

Definition at line 1323 of file fxpkgpdo.cpp.

1341 {
1342  NTSTATUS status;
1343  BOOLEAN lock;
1344 
1345  lock = Irp->GetParameterSetLockLock();
1346 
1347  status = ((FxPkgPdo*) This)->m_DeviceSetLock.Invoke(
1348  ((FxPkgPdo*) This)->m_Device->GetHandle(), lock);
1349 
1350  if (NT_SUCCESS(status)) {
1351  Irp->SetInformation(NULL);
1352  }
1353 
1354  return ((FxPkgPdo*) This)->CompletePnpRequest(Irp, status);
1355 }
CfxDevice * m_Device
Definition: fxobject.hpp:329
rwlock_t lock
Definition: tcpcore.h:1163
WDFDEVICE __inline GetHandle(VOID)
Definition: fxdevice.hpp:237
LONG NTSTATUS
Definition: precomp.h:26
_In_ PIRP Irp
Definition: csq.h:116
unsigned char BOOLEAN
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
#define NULL
Definition: types.h:112
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

◆ _PnpSurpriseRemoval()

_Must_inspect_result_ NTSTATUS FxPkgPdo::_PnpSurpriseRemoval ( __inout FxPkgPnp This,
__inout FxIrp Irp 
)
staticprivate

Definition at line 1561 of file fxpkgpdo.cpp.

1565 {
1566  FxPkgPdo* pThis;
1567 
1568  pThis = (FxPkgPdo*) This;
1569 
1571 
1572  return pThis->PnpSurpriseRemoval(Irp);
1573 }
_In_ PIRP Irp
Definition: csq.h:116
_Must_inspect_result_ NTSTATUS PnpSurpriseRemoval(__inout FxIrp *Irp)
Definition: fxpkgpnp.cpp:2366
FxDeviceDescriptionEntry * m_Description
Definition: fxpkgpdo.hpp:40
VOID DeviceSurpriseRemoved(VOID)

◆ _QueryCapsWorkItem()

VOID FxPkgPdo::_QueryCapsWorkItem ( __in MdDeviceObject  DeviceObject,
__in PVOID  Context 
)
staticprivate

Definition at line 779 of file fxpkgpdo.cpp.

783 {
784  STACK_DEVICE_CAPABILITIES parentCapabilities;
785  MdWorkItem pItem;
786  FxPkgPdo* pPkgPdo;
787  FxIrp irp;
789  MxDeviceObject parentDeviceObject;
790 
792  pItem = (MdWorkItem) irp.GetContext(0);
793 
795 
796  parentDeviceObject.SetObject(
798 
801  &parentDeviceObject,
802  NULL, // D3ColdInterface
803  &parentCapabilities);
804 
805  if (NT_SUCCESS(status)) {
806 #pragma prefast(suppress:__WARNING_POTENTIAL_BUFFER_OVERFLOW_HIGH_PRIORITY, "prefast is confused")
809  &parentCapabilities.DeviceCaps
810  );
812  }
813 
815 
816  MxWorkItem::_Free(pItem);
817 }
CfxDevice * m_Device
Definition: fxobject.hpp:329
CfxDevice * m_ParentDevice
Definition: fxdevice.hpp:569
PVOID GetContext(__in ULONG Index)
Definition: fxirpum.cpp:361
MdDeviceObject __inline GetDeviceObject(VOID)
Definition: fxdevice.hpp:174
LONG NTSTATUS
Definition: precomp.h:26
static FxDevice * GetFxDevice(__in MdDeviceObject DeviceObject)
Definition: fxdeviceum.cpp:60
Definition: fxirp.hpp:28
VOID HandleQueryCapabilities(__inout PDEVICE_CAPABILITIES ReportedCaps, __in PDEVICE_CAPABILITIES ParentCaps)
Definition: fxpkgpdo.cpp:666
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055
_Must_inspect_result_ NTSTATUS GetStackCapabilities(__in PFX_DRIVER_GLOBALS DriverGlobals, __in MxDeviceObject *DeviceInStack, __in_opt PD3COLD_SUPPORT_INTERFACE D3ColdInterface, __out PSTACK_DEVICE_CAPABILITIES Capabilities)
Definition: supportkm.cpp:48
IWudfIrp * MdIrp
Definition: mxum.h:103
PIO_WORKITEM MdWorkItem
Definition: mxworkitemkm.h:27
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
__inline FxPkgPdo * GetPdoPkg(VOID)
Definition: fxdevice.hpp:1254
FxPkgPdo * pPkgPdo
static __inline VOID _Free(__in MdWorkItem Item)
Definition: mxworkitemkm.h:81
DEVICE_CAPABILITIES DeviceCaps
Definition: device_common.h:30
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxobject.hpp:734
__inline VOID SetObject(__in_opt MdDeviceObject DeviceObject)
#define NULL
Definition: types.h:112
PDEVICE_CAPABILITIES GetParameterDeviceCapabilities()
Definition: fxirpum.cpp:1132
#define STATUS_SUCCESS
Definition: shellext.h:65
MdIrp SetIrp(MdIrp irp)
Definition: fxirpkm.hpp:71
static SERVICE_STATUS status
Definition: service.c:31
FxIrp * irp
NTSTATUS CompletePnpRequest(__inout FxIrp *Irp, __in NTSTATUS Status)
Definition: fxpkgpnp.cpp:5752
Definition: ps.c:97

Referenced by PnpQueryCapabilities().

◆ _RemoveAndReenumerateSelf()

VOID FxPkgPdo::_RemoveAndReenumerateSelf ( __in PVOID  Context)
staticprivate

Definition at line 1665 of file fxpkgpdo.cpp.

1681 {
1682  ((FxPkgPdo*) Context)->AskParentToRemoveAndReenumerate();
1683 }

Referenced by HandleQueryInterfaceForReenumerate().

◆ AddEjectionDevice()

_Must_inspect_result_ NTSTATUS FxPkgPdo::AddEjectionDevice ( __in MdDeviceObject  DependentDevice)

Definition at line 1826 of file fxpkgpdo.cpp.

1829 {
1830  FxRelatedDevice* pRelated;
1831  NTSTATUS status;
1832 
1833  if (m_EjectionDeviceList == NULL) {
1834  KIRQL irql;
1835 
1836  Lock(&irql);
1837  if (m_EjectionDeviceList == NULL) {
1839 
1840  if (m_EjectionDeviceList != NULL) {
1842  }
1843  else {
1847  "Could not allocate ejection device list for PDO WDFDEVICE %p",
1848 
1849  m_Device->GetHandle());
1850  }
1851  }
1852  else {
1853  //
1854  // another thread allocated the list already
1855  //
1857  }
1858  Unlock(irql);
1859 
1860  if (!NT_SUCCESS(status)) {
1861  return status;
1862  }
1863  }
1864 
1865  pRelated = new(GetDriverGlobals())
1867 
1868  if (pRelated == NULL) {
1870  }
1871 
1873 
1874  if (NT_SUCCESS(status)) {
1875  //
1876  // EjectRelations are queried automatically by PnP when the device is
1877  // going to be ejected. No need to tell pnp that the list changed
1878  // until it needs to query for it.
1879  //
1880  DO_NOTHING();
1881  }
1882  else {
1883  pRelated->DeleteFromFailedCreate();
1884  }
1885 
1886  return status;
1887 }
__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)
#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
FxRelatedDeviceList * m_EjectionDeviceList
Definition: fxpkgpdo.hpp:113
#define DO_NOTHING()
Definition: mxgeneral.h:32
Definition: ps.c:97

◆ AskParentToRemoveAndReenumerate()

_Must_inspect_result_ NTSTATUS FxPkgPdo::AskParentToRemoveAndReenumerate ( VOID  )
privatevirtual

Implements FxPkgPnp.

Definition at line 1598 of file fxpkgpdo.cpp.

1616 {
1617  //
1618  // Static children do not support reenumeration.
1619  //
1620  if (m_Description != NULL && m_Static == FALSE) {
1622  return STATUS_SUCCESS;
1623  }
1624 
1625  return STATUS_NOT_FOUND;
1626 }
#define FALSE
Definition: types.h:117
FxChildList * GetParentList(VOID)
#define STATUS_NOT_FOUND
Definition: shellext.h:72
BOOLEAN m_Static
Definition: fxpkgpdo.hpp:61
VOID ReenumerateEntry(__inout FxDeviceDescriptionEntry *Entry)
FxDeviceDescriptionEntry * m_Description
Definition: fxpkgpdo.hpp:40
#define NULL
Definition: types.h:112
#define STATUS_SUCCESS
Definition: shellext.h:65

◆ ClearEjectionDevicesList()

VOID FxPkgPdo::ClearEjectionDevicesList ( VOID  )

Definition at line 1906 of file fxpkgpdo.cpp.

1909 {
1911 
1912  if (m_EjectionDeviceList != NULL) {
1914  while ((pEntry = m_EjectionDeviceList->GetNextEntry(NULL)) != NULL) {
1916  pEntry->GetDevice());
1917  }
1919  }
1920 
1921  //
1922  // EjectRelations are queried automatically by PnP when the device is
1923  // going to be ejected. No need to tell pnp that the list changed
1924  // until it needs to query for it.
1925  //
1926 }
VOID Remove(__in PFX_DRIVER_GLOBALS Globals, __in MdDeviceObject Device)
_Must_inspect_result_ FxRelatedDevice * GetNextEntry(__in_opt FxRelatedDevice *Entry)
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxobject.hpp:734
VOID UnlockFromEnum(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
#define NULL
Definition: types.h:112
VOID LockForEnum(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
PLIST_ENTRY pEntry
Definition: fxioqueue.cpp:4484
FxRelatedDeviceList * m_EjectionDeviceList
Definition: fxpkgpdo.hpp:113

◆ DeleteSymbolicLinkOverload()

VOID FxPkgPdo::DeleteSymbolicLinkOverload ( __in BOOLEAN  GracefulRemove)
privatevirtual

Definition at line 1630 of file fxpkgpdo.cpp.

1646 {
1647  if (GracefulRemove) {
1648  //
1649  // We will remove the symbolic link when we determine if the PDO was
1650  // reported missing or not.
1651  //
1652  return;
1653  }
1654  else if (m_Description->IsDeviceReportedMissing()) {
1655  //
1656  // Surprise removed and we have reported the PDO as missing
1657  //
1658 
1660  }
1661 }
CfxDevice * m_Device
Definition: fxobject.hpp:329
VOID DeleteSymbolicLink(VOID)
FxDeviceDescriptionEntry * m_Description
Definition: fxpkgpdo.hpp:40
BOOLEAN IsDeviceReportedMissing(VOID)

◆ DispatchDeviceSetPower()

_Must_inspect_result_ NTSTATUS FxPkgPdo::DispatchDeviceSetPower ( __in FxIrp Irp)
private

Definition at line 151 of file pdopower.cpp.

154 {
155  if (IsPowerPolicyOwner()) {
158  //
159  // A power irp arrived, but we did not request it. ASSERT and log
160  // an error.
161  //
164  "Received set device power irp 0x%p on WDFDEVICE 0x%p !devobj 0x%p, "
165  "but the irp was not requested by the device (the power policy owner)",
166  Irp->GetIrp(),
167  m_Device->GetHandle(),
169 
170  ASSERTMSG("Received set device power irp but the irp was not "
171  "requested by the device (the power policy owner)\n",
172  FALSE);
173  }
174 
175  //
176  // We are no longer requesting a power irp because we received the one
177  // we requested.
178  //
181  }
182  else {
184  }
185  }
186 
188 
189  if (Irp->GetParameterPowerStateDeviceState() == PowerDeviceD0) {
191  }
192  else {
194  }
195 
196  return STATUS_PENDING;
197 }
CfxDevice * m_Device
Definition: fxobject.hpp:329
MdDeviceObject __inline GetDeviceObject(VOID)
Definition: fxdevice.hpp:174
WDFDEVICE __inline GetHandle(VOID)
Definition: fxdevice.hpp:237
FxPowerPolicyMachine m_PowerPolicyMachine
Definition: fxpkgpnp.hpp:4153
#define FALSE
Definition: types.h:117
_In_ PIRP Irp
Definition: csq.h:116
#define ASSERTMSG(msg, exp)
Definition: nt_native.h:431
VOID PowerProcessEvent(__in FxPowerEvent Event, __in BOOLEAN ProcessEventOnDifferentThread=FALSE)
FxPowerPolicyOwnerSettings * m_Owner
#define STATUS_PENDING
Definition: ntstatus.h:82
VOID SetPendingDevicePowerIrp(__inout FxIrp *Irp)
Definition: fxpkgpnp.hpp:3050
BOOLEAN IsPowerPolicyOwner(VOID)
Definition: fxpkgpnp.hpp:3612
#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)

Referenced by _DispatchSetPower().

◆ DispatchSystemSetPower()

_Must_inspect_result_ NTSTATUS FxPkgPdo::DispatchSystemSetPower ( __in FxIrp Irp)
private

Definition at line 95 of file pdopower.cpp.

98 {
99  KIRQL irql;
101 
102  m_SystemPowerState = (BYTE) Irp->GetParameterPowerStateSystemState();
104  Irp->GetParameterPowerState());
105 
106  if (IsPowerPolicyOwner()) {
108  //
109  // Ideally we would like to complete the S0 irp before we start
110  // processing the event in the state machine so that the D0 irp
111  // comes after the S0 is moving up the stack...
112  //
113  // ... BUT ...
114  //
115  // ... by allowing the S0 irp to go up the stack first, we must then
116  // handle pnp requests from the current power policy state (because
117  // the S0 irp could be the last S irp in the system and when completed,
118  // the pnp lock is released). So, we process the event first so
119  // that we can move into a state where we can handle pnp events in
120  // the power policy state machine.
121  //
122  // We mitigate the situation a little bit by forcing the processing of the
123  // event to occur on the power policy thread rather then in the current
124  // context.
125  //
126  Mx::MxRaiseIrql(DISPATCH_LEVEL, &irql);
128  Mx::MxLowerIrql(irql);
129 
131  }
132  else {
133  //
134  // Power policy state machine will complete the request later
135  //
138  return STATUS_PENDING;
139  }
140  }
141  else {
142  //
143  // Since we are not the power policy owner, we just complete all S irps
144  //
146  }
147 }
POWER_STATE SetPowerState(__in POWER_STATE_TYPE Type, __in POWER_STATE State)
CfxDevice * m_Device
Definition: fxobject.hpp:329
MdDeviceObject __inline GetDeviceObject(VOID)
Definition: fxdevice.hpp:174
KIRQL irql
Definition: wave.h:1
UCHAR KIRQL
Definition: env_spec_w32.h:591
_In_ PIRP Irp
Definition: csq.h:116
#define STATUS_PENDING
Definition: ntstatus.h:82
VOID PowerPolicyProcessEvent(__in FxPowerPolicyEvent Event, __in BOOLEAN ProcessEventOnDifferentThread=FALSE)
BOOLEAN IsPowerPolicyOwner(VOID)
Definition: fxpkgpnp.hpp:3612
unsigned char BYTE
Definition: xxhash.c:193
MxDeviceObject deviceObject
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
NTSTATUS CompletePowerRequest(__inout FxIrp *Irp, __in NTSTATUS Status)
Definition: fxpkgpnp.cpp:5404
VOID SetPendingSystemPowerIrp(__inout FxIrp *Irp)
Definition: fxpkgpnp.hpp:3082
BYTE m_SystemPowerState
Definition: fxpkgpnp.hpp:4102
#define STATUS_SUCCESS
Definition: shellext.h:65
_In_ SYSTEM_POWER_STATE SystemPowerState
Definition: iotypes.h:7519

Referenced by _DispatchSetPower().

◆ FinishInitialize()

VOID FxPkgPdo::FinishInitialize ( __in PWDFDEVICE_INIT  DeviceInit)
virtual

Definition at line 340 of file fxpkgpdo.cpp.

343 {
344  PdoInit* pdoInit;
345 
346  pdoInit = &DeviceInit->Pdo;
347 
348  m_DefaultLocale = pdoInit->DefaultLocale;
350  pdoInit->DeviceText.Next = NULL;
351 
352  //
353  // Important to do this last since this will cause a pnp state machine
354  // transition
355  //
356  FxPkgPnp::FinishInitialize(DeviceInit); // __super call
357 }
SINGLE_LIST_ENTRY DeviceText
virtual VOID FinishInitialize(__inout PWDFDEVICE_INIT DeviceInit)
Definition: fxpkgpnp.cpp:1240
LCID m_DefaultLocale
Definition: fxpkgpdo.hpp:38
struct _SINGLE_LIST_ENTRY * Next
Definition: ntbasedef.h:629
#define NULL
Definition: types.h:112
_In_ PWDFDEVICE_INIT DeviceInit
Definition: wdfcontrol.h:113
SINGLE_LIST_ENTRY m_DeviceTextHead
Definition: fxpkgpdo.hpp:37

◆ FireAndForgetIrp()

_Must_inspect_result_ NTSTATUS FxPkgPdo::FireAndForgetIrp ( __inout FxIrp Irp)
privatevirtual

Definition at line 384 of file fxpkgpdo.cpp.

399 {
401 
402  status = Irp->GetStatus();
403 
404  if (Irp->GetMajorFunction() == IRP_MJ_POWER) {
406  }
407  else {
408  return CompletePnpRequest(Irp, status);
409  }
410 }
LONG NTSTATUS
Definition: precomp.h:26
_In_ PIRP Irp
Definition: csq.h:116
#define IRP_MJ_POWER
NTSTATUS CompletePowerRequest(__inout FxIrp *Irp, __in NTSTATUS Status)
Definition: fxpkgpnp.cpp:5404
static SERVICE_STATUS status
Definition: service.c:31
NTSTATUS CompletePnpRequest(__inout FxIrp *Irp, __in NTSTATUS Status)
Definition: fxpkgpnp.cpp:5752
Definition: ps.c:97

◆ GetDispatchPnp()

virtual const PFN_PNP_POWER_CALLBACK* FxPkgPdo::GetDispatchPnp ( VOID  )
inlineprivatevirtual

Implements FxPkgPnp.

Definition at line 560 of file fxpkgpdo.hpp.

563  {
564  return m_PdoPnpFunctionTable;
565  }
static const PFN_PNP_POWER_CALLBACK m_PdoPnpFunctionTable[IRP_MN_SURPRISE_REMOVAL+1]
Definition: fxpkgpdo.hpp:147

◆ GetDispatchPower()

virtual const PFN_PNP_POWER_CALLBACK* FxPkgPdo::GetDispatchPower ( VOID  )
inlineprivatevirtual

Implements FxPkgPnp.

Definition at line 569 of file fxpkgpdo.hpp.

572  {
574  }
static const PFN_PNP_POWER_CALLBACK m_PdoPowerFunctionTable[IRP_MN_QUERY_POWER+1]
Definition: fxpkgpdo.hpp:152

◆ HandleQueryCapabilities()

VOID FxPkgPdo::HandleQueryCapabilities ( __inout PDEVICE_CAPABILITIES  ReportedCaps,
__in PDEVICE_CAPABILITIES  ParentCaps 
)
private

Definition at line 666 of file fxpkgpdo.cpp.

670 {
671  LONG pnpCaps;
672  ULONG i;
673 
674  //
675  // PowerSystemUnspecified is reserved for system use as per the DDK
676  //
677  for (i = PowerSystemWorking; i < PowerSystemMaximum; i++) {
679 
681 
682  if (state == PowerDeviceMaximum) {
683  //
684  // PDO did not specify any value, use parent's cap
685  //
686 #pragma prefast(suppress:__WARNING_POTENTIAL_BUFFER_OVERFLOW_HIGH_PRIORITY, "Esp:675")
687  ReportedCaps->DeviceState[i] = ParentCaps->DeviceState[i];
688  }
689  else {
690  //
691  // Use PDO's reported value
692  //
693  ReportedCaps->DeviceState[i] = state;
694  }
695  }
696 
697  pnpCaps = GetPnpCapsInternal();
698 
699  //
700  // Appropriately fill the DeviceCapabilities structure.
701  //
702  SET_PNP_CAP(pnpCaps, ReportedCaps, LockSupported);
703  SET_PNP_CAP(pnpCaps, ReportedCaps, EjectSupported);
704  SET_PNP_CAP(pnpCaps, ReportedCaps, Removable);
705  SET_PNP_CAP(pnpCaps, ReportedCaps, DockDevice);
706  SET_PNP_CAP(pnpCaps, ReportedCaps, UniqueID);
707 
709  SET_PNP_CAP(pnpCaps, ReportedCaps, SilentInstall);
710  }
711  else if (m_RawOK) {
712  //
713  // By default, we report raw devices as silent install devices
714  // because if they are raw, they don't need any further
715  // installation.
716  //
717  ReportedCaps->SilentInstall = TRUE;
718  }
719 
720  SET_PNP_CAP(pnpCaps, ReportedCaps, SurpriseRemovalOK);
721  SET_PNP_CAP(pnpCaps, ReportedCaps, HardwareDisabled);
722  SET_PNP_CAP(pnpCaps, ReportedCaps, NoDisplayInUI);
723 
724  SET_POWER_CAP(m_PowerCaps.Caps , ReportedCaps, WakeFromD0);
725  SET_POWER_CAP(m_PowerCaps.Caps , ReportedCaps, WakeFromD1);
726  SET_POWER_CAP(m_PowerCaps.Caps , ReportedCaps, WakeFromD2);
727  SET_POWER_CAP(m_PowerCaps.Caps , ReportedCaps, WakeFromD3);
728  SET_POWER_CAP(m_PowerCaps.Caps , ReportedCaps, DeviceD1);
729  SET_POWER_CAP(m_PowerCaps.Caps , ReportedCaps, DeviceD2);
730 
731  if (m_RawOK) {
732  ReportedCaps->RawDeviceOK = TRUE;
733  }
734 
735  ReportedCaps->UINumber = m_PnpCapsUINumber;
736  ReportedCaps->Address = m_PnpCapsAddress;
737 
739  ReportedCaps->SystemWake = (SYSTEM_POWER_STATE) m_PowerCaps.SystemWake;
740  }
741  else {
742  ReportedCaps->SystemWake = ParentCaps->SystemWake;
743  }
744 
745  //
746  // Set the least-powered device state from which the device can
747  // wake the system.
748  //
750  ReportedCaps->DeviceWake = (DEVICE_POWER_STATE) m_PowerCaps.DeviceWake;
751  }
752  else {
753  ReportedCaps->DeviceWake = ParentCaps->DeviceWake;
754  }
755 
756  //
757  // Set the Device wake up latencies.
758  //
759  if (m_PowerCaps.D1Latency != (ULONG) -1) {
760  ReportedCaps->D1Latency = m_PowerCaps.D1Latency;
761  }
762  else {
763  ReportedCaps->D1Latency = 0;
764  }
765 
766  if (m_PowerCaps.D2Latency != (ULONG) -1) {
767  ReportedCaps->D2Latency = m_PowerCaps.D2Latency;
768  }
769  else {
770  ReportedCaps->D2Latency = 0;
771  }
772 
773  if (m_PowerCaps.D3Latency != (ULONG) -1) {
774  ReportedCaps->D3Latency = m_PowerCaps.D3Latency;
775  }
776 }
BYTE SystemWake
Definition: fxpkgpnp.hpp:413
ULONG D1Latency
Definition: fxpkgpnp.hpp:423
#define SET_PNP_CAP(caps, pCaps, FieldName)
Definition: pnppriv.hpp:279
#define TRUE
Definition: types.h:120
ULONG D3Latency
Definition: fxpkgpnp.hpp:425
LONG GetPnpCapsInternal(VOID)
Definition: fxpkgpnp.cpp:5466
enum _SYSTEM_POWER_STATE SYSTEM_POWER_STATE
ULONG m_PnpCapsAddress
Definition: fxpkgpnp.hpp:4090
long LONG
Definition: pedump.c:60
ULONG States
Definition: fxpkgpnp.hpp:418
#define SET_POWER_CAP(caps, pCaps, FieldName)
Definition: pnppriv.hpp:289
enum _DEVICE_POWER_STATE DEVICE_POWER_STATE
BOOLEAN m_RawOK
Definition: fxpkgpdo.hpp:59
USHORT Caps
Definition: fxpkgpnp.hpp:406
BYTE DeviceWake
Definition: fxpkgpnp.hpp:412
static int state
Definition: maze.c:121
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
ULONG m_PnpCapsUINumber
Definition: fxpkgpnp.hpp:4091
FxPowerCaps m_PowerCaps
Definition: fxpkgpnp.hpp:4093
unsigned int ULONG
Definition: retypes.h:1
static DEVICE_POWER_STATE _GetPowerCapState(__in ULONG Index, __in ULONG State)
Definition: fxpkgpnp.cpp:5657
Definition: arc.h:81
ULONG D2Latency
Definition: fxpkgpnp.hpp:424

Referenced by _QueryCapsWorkItem(), and PnpQueryCapabilities().

◆ HandleQueryInterfaceForReenumerate()

_Must_inspect_result_ NTSTATUS FxPkgPdo::HandleQueryInterfaceForReenumerate ( __in FxIrp Irp,
__out PBOOLEAN  CompleteRequest 
)

Definition at line 1687 of file fxpkgpdo.cpp.

1706 {
1708  NTSTATUS status;
1709 
1710  *CompleteRequest = TRUE;
1711 
1712  if (m_Static) {
1713  //
1714  // Return the embedded status in the irp since this is a statically
1715  // enumerated child. Only dynamically enuemrated child support self
1716  // reenumeration.
1717  //
1718  return Irp->GetStatus();
1719  }
1720 
1721  if (Irp->GetParameterQueryInterfaceVersion() == 1 &&
1722  Irp->GetParameterQueryInterfaceSize() >= sizeof(*pInterface)) {
1723 
1725  Irp->GetParameterQueryInterfaceInterface();
1726 
1727  //
1728  // Expose the interface to the requesting driver.
1729  //
1730  pInterface->Version = 1;
1731  pInterface->Size = sizeof(*pInterface);
1732  pInterface->Context = this;
1735  pInterface->SurpriseRemoveAndReenumerateSelf = &FxPkgPdo::_RemoveAndReenumerateSelf;
1736 
1738 
1739  //
1740  // Caller assumes a reference has been taken.
1741  //
1743  }
1744  else {
1746  }
1747 
1748  return status;
1749 }
PINTERFACE_REFERENCE InterfaceReference
Definition: miniport.h:124
#define TRUE
Definition: types.h:120
USHORT Size
Definition: miniport.h:121
LONG NTSTATUS
Definition: precomp.h:26
struct _REENUMERATE_SELF_INTERFACE_STANDARD * PREENUMERATE_SELF_INTERFACE_STANDARD
PINTERFACE pInterface
_In_ PIRP Irp
Definition: csq.h:116
static VOID STDCALL _InterfaceReferenceNoOp(__in_opt PVOID Context)
Definition: fxdevice.hpp:1767
static VOID STDCALL _RemoveAndReenumerateSelf(__in PVOID Context)
Definition: fxpkgpdo.cpp:1665
#define STATUS_INVALID_BUFFER_SIZE
Definition: ntstatus.h:650
NTSTATUS NTAPI CompleteRequest(IN PIRP Irp, IN NTSTATUS Status, IN ULONG_PTR Information)
Definition: dispatch.c:19
BOOLEAN m_Static
Definition: fxpkgpdo.hpp:61
PINTERFACE_DEREFERENCE InterfaceDereference
Definition: miniport.h:125
static VOID STDCALL _InterfaceDereferenceNoOp(__in_opt PVOID Context)
Definition: fxdevice.hpp:1778
#define STATUS_SUCCESS
Definition: shellext.h:65
PVOID Context
Definition: miniport.h:123
USHORT Version
Definition: miniport.h:122
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

◆ Initialize()

_Must_inspect_result_ NTSTATUS FxPkgPdo::Initialize ( __in PWDFDEVICE_INIT  DeviceInit)
virtual

Reimplemented from FxPkgPnp.

Definition at line 184 of file fxpkgpdo.cpp.

202 {
204  size_t cbLength, cbStrLength;
205  PWSTR pCur;
206  PdoInit* pPdo;
207 
209  if (!NT_SUCCESS(status)) {
210  return status;
211  }
212 
213  cbLength = 0;
214 
215  //
216  // Compute the total number of bytes required for all strings and then
217  // make one allocation and remember pointers w/in the string so we can
218  // retrieve them individually later.
219  //
220  pPdo = &DeviceInit->Pdo;
221  cbLength += FxCalculateTotalStringSize(&pPdo->HardwareIDs);
222  cbLength += FxCalculateTotalStringSize(&pPdo->CompatibleIDs);
223 
224  if (pPdo->DeviceID != NULL) {
225  cbLength += pPdo->DeviceID->ByteLength(TRUE);
226  }
227  if (pPdo->InstanceID != NULL) {
228  cbLength += pPdo->InstanceID->ByteLength(TRUE);
229  }
230  if (pPdo->ContainerID != NULL) {
231  cbLength += pPdo->ContainerID->ByteLength(TRUE);
232  }
233 
234  m_IDsAllocation = (PWSTR) FxPoolAllocate(GetDriverGlobals(),
235  PagedPool,
236  cbLength);
237 
238  if (m_IDsAllocation == NULL) {
240 
243  "DeviceInit %p could not allocate string for device IDs "
244  "(length %I64d), %!STATUS!", DeviceInit, cbLength, status);
245 
246  return status;
247  }
248 
250 
252  pCur = FxCopyMultiSz(m_HardwareIDs, &pPdo->HardwareIDs);
253 
255  pCur = FxCopyMultiSz(m_CompatibleIDs, &pPdo->CompatibleIDs);
256 
257  if (pPdo->DeviceID != NULL) {
258  m_DeviceID = pCur;
259 
260  //
261  // Copy the bytes and then null terminate the buffer
262  //
263  cbStrLength = pPdo->DeviceID->ByteLength(FALSE);
264 
266  pPdo->DeviceID->Buffer(),
267  cbStrLength);
268 
269  m_DeviceID[cbStrLength / sizeof(WCHAR)] = UNICODE_NULL;
270 
272  cbStrLength + sizeof(UNICODE_NULL));
273  }
274 
275  if (pPdo->InstanceID != NULL) {
276  m_InstanceID = pCur;
277 
278  //
279  // Copy the bytes and then null terminate the buffer
280  //
281  cbStrLength = pPdo->InstanceID->ByteLength(FALSE);
282 
284  pPdo->InstanceID->Buffer(),
285  cbStrLength);
286 
287  m_InstanceID[cbStrLength / sizeof(WCHAR)] = UNICODE_NULL;
288 
290  cbStrLength + sizeof(UNICODE_NULL));
291  }
292 
293  if (pPdo->ContainerID != NULL) {
295 
296  //
297  // Copy the bytes and then null terminate the buffer
298  //
299  cbStrLength = pPdo->ContainerID->ByteLength(FALSE);
300 
302  pPdo->ContainerID->Buffer(),
303  cbStrLength);
304 
305  m_ContainerID[cbStrLength / sizeof(WCHAR)] = UNICODE_NULL;
306  }
307 
308  m_Static = pPdo->Static;
309 
310  if (m_Static) {
311  //
312  // Statically enumerated children do not support reenumeration requests
313  // from the stack on top of them.
314  //
315 
316  //
317  // The only way we can have static children is if an FDO enumerates them.
318  //
319 
320 
321 
322 
323 
326 
327  m_OwningChildList->ADDREF(this);
328  }
329  else {
330  m_Description = pPdo->DescriptionEntry;
331 
333  m_OwningChildList->ADDREF(this);
334  }
335 
336  return STATUS_SUCCESS;
337 }
CfxDevice * m_Device
Definition: fxobject.hpp:329
CfxDevice * m_ParentDevice
Definition: fxdevice.hpp:569
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
#define WDF_PTR_ADD_OFFSET(_ptr, _offset)
Definition: wdfcore.h:144
#define TRUE
Definition: types.h:120
uint16_t * PWSTR
Definition: typedefs.h:56
LONG NTSTATUS
Definition: precomp.h:26
PWSTR m_DeviceID
Definition: fxpkgpdo.hpp:77
FxDevice * pPdo
static __inline VOID MxAssert(__in BOOLEAN Condition)
Definition: mxgeneralkm.h:165
PWSTR m_CompatibleIDs
Definition: fxpkgpdo.hpp:98
virtual _Must_inspect_result_ NTSTATUS Initialize(__in PWDFDEVICE_INIT DeviceInit)
Definition: fxpkgpnp.cpp:349
PWSTR m_InstanceID
Definition: fxpkgpdo.hpp:84
#define FALSE
Definition: types.h:117
#define UNICODE_NULL
__inline BOOLEAN IsFdo(VOID)
Definition: fxdevice.hpp:1227
PWSTR m_HardwareIDs
Definition: fxpkgpdo.hpp:91
FxChildList * GetParentList(VOID)
size_t FxCalculateTotalStringSize(__in FxCollectionInternal *StringCollection, __in BOOLEAN Verify=FALSE, __out_opt PBOOLEAN ContainsOnlyStrings=NULL)
Definition: stringutil.cpp:32
PWSTR FxCopyMultiSz(__out LPWSTR Buffer, __in FxCollectionInternal *StringCollection)
Definition: stringutil.cpp:129
FxChildList * m_OwningChildList
Definition: fxpkgpdo.hpp:42
PWSTR m_ContainerID
Definition: fxpkgpdo.hpp:105
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
__inline FxPkgFdo * GetFdoPkg(VOID)
Definition: fxdevice.hpp:1236
BOOLEAN m_Static
Definition: fxpkgpdo.hpp:61
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
#define TRACINGPNP
Definition: dbgtrace.h:67
FxDeviceDescriptionEntry * m_Description
Definition: fxpkgpdo.hpp:40
FxChildList * m_StaticDeviceList
Definition: fxpkgfdo.hpp:42
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxobject.hpp:734
SINGLE_LIST_ENTRY * pCur
PWSTR m_IDsAllocation
Definition: fxpkgpdo.hpp:111
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
#define NULL
Definition: types.h:112
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
_In_ PWDFDEVICE_INIT DeviceInit
Definition: wdfcontrol.h:113
#define STATUS_SUCCESS
Definition: shellext.h:65
static SERVICE_STATUS status
Definition: service.c:31
Definition: ps.c:97

◆ IsForwardRequestToParentEnabled()

__inline BOOLEAN FxPkgPdo::IsForwardRequestToParentEnabled ( VOID  )
inline

Definition at line 206 of file fxpkgpdo.hpp.

209  {
211  }
BOOLEAN m_AllowForwardRequestToParent
Definition: fxpkgpdo.hpp:69

◆ PnpEventCheckForDevicePresenceOverload()

WDF_DEVICE_PNP_STATE FxPkgPdo::PnpEventCheckForDevicePresenceOverload ( VOID  )
privatevirtual

Implements FxPkgPnp.

Definition at line 1155 of file fxpkgpdo.cpp.

1177 {
1178  if (m_Description != NULL) {
1179  if (m_Description->IsDeviceRemoved()) {
1180  //
1181  // The description freed itself now that the device has been reported
1182  // missing.
1183  //
1184  return WdfDevStatePnpPdoRemoved;
1185  }
1186  else {
1187  //
1188  // Device was not reported as missing, keep it alive
1189  //
1191  }
1192  }
1193  else {
1194  //
1195  // Only static children can get this far without having an m_Description
1196  //
1197  ASSERT(m_Static);
1198 
1199  //
1200  // The description freed itself now that the device has been reported
1201  // missing.
1202  //
1203  return WdfDevStatePnpPdoRemoved;
1204  }
1205 }
#define ASSERT(a)
Definition: mode.c:44
BOOLEAN IsDeviceRemoved(VOID)
BOOLEAN m_Static
Definition: fxpkgpdo.hpp:61
FxDeviceDescriptionEntry * m_Description
Definition: fxpkgpdo.hpp:40
#define NULL
Definition: types.h:112

◆ PnpEventEjectHardwareOverload()

WDF_DEVICE_PNP_STATE FxPkgPdo::PnpEventEjectHardwareOverload ( VOID  )
privatevirtual

Implements FxPkgPnp.

Definition at line 1045 of file fxpkgpdo.cpp.

1067 {
1068  NTSTATUS status;
1070 
1072 
1073  if (NT_SUCCESS(status)) {
1074 
1075  //
1076  // Upon a successful eject, mark the child as missing so that when we
1077  // get another QDR, it is not re-reported.
1078  //
1079  FxChildList* pList;
1080  MxEvent* event;
1081 
1083 
1085  if (NT_SUCCESS(status)) {
1088  "PDO WDFDEVICE %p !devobj %p marked missing as a result of eject",
1090  }
1091  else {
1094  "Failed to mark PDO WDFDEVICE %p !devobj %p missing after eject %!STATUS!",
1096  status);
1097  }
1098 
1099  //
1100  // We must wait for any pending scans to finish so that the previous
1101  // update as missing is enacted into the list and reported to the
1102  // OS. Otherwise, if we don't wait we could be in the middle of a
1103  // scan, complete the eject, report the child again and it will be
1104  // reenumerated.
1105  //
1106  event = pList->GetScanEvent();
1107 
1109  "waiting on event %p for device to finish scanning",
1110  &event);
1111 
1112  //
1113  // No need to wait in a crtical region because we are in the context of a
1114  // pnp request which is in the system context.
1115  //
1116  event->WaitFor(Executive, KernelMode, FALSE, NULL);
1117