ReactOS 0.4.15-dev-8100-g1887773
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)
 
virtual _Must_inspect_result_ NTSTATUS Initialize (__in PWDFDEVICE_INIT DeviceInit)
 
_Must_inspect_result_ NTSTATUS PostCreateDeviceInitialize (VOID)
 
virtual VOID FinishInitialize (__inout PWDFDEVICE_INIT DeviceInit)
 
VOID SetSpecialFileSupport (__in WDF_SPECIAL_FILE_TYPE FileType, __in BOOLEAN Supported)
 
_Must_inspect_result_ NTSTATUS RegisterCallbacks (__in PWDF_PNPPOWER_EVENT_CALLBACKS DispatchTable)
 
VOID RegisterPowerPolicyCallbacks (__in PWDF_POWER_POLICY_EVENT_CALLBACKS Callbacks)
 
NTSTATUS RegisterPowerPolicyWmiInstance (__in const GUID *Guid, __in FxWmiInstanceInternalCallbacks *Callbacks, __out FxWmiInstanceInternal **Instance)
 
NTSTATUS PowerPolicySetS0IdleSettings (__in PWDF_DEVICE_POWER_POLICY_IDLE_SETTINGS Settings)
 
NTSTATUS AssignPowerFrameworkSettings (__in PWDF_POWER_FRAMEWORK_SETTINGS PowerFrameworkSettings)
 
NTSTATUS PowerPolicySetSxWakeSettings (__in PWDF_DEVICE_POWER_POLICY_WAKE_SETTINGS Settings, __in BOOLEAN ArmForWakeIfChildrenAreArmedForWake, __in BOOLEAN IndicateChildWakeOnParentWake)
 
BOOLEAN PowerIndicateWaitWakeStatus (__in NTSTATUS WaitWakeStatus)
 
BOOLEAN PowerPolicyIsWakeEnabled (VOID)
 
ULONG PowerPolicyGetCurrentWakeReason (VOID)
 
BOOLEAN __inline PowerPolicyShouldPropagateWakeStatusToChildren (VOID)
 
VOID ChildRemoved (VOID)
 
VOID PowerPolicySetS0IdleState (__in BOOLEAN State)
 
VOID PowerPolicySetSxWakeState (__in BOOLEAN State)
 
VOID SetPowerCaps (__in PWDF_DEVICE_POWER_CAPABILITIES PowerCapabilities)
 
VOID SetPnpCaps (__in PWDF_DEVICE_PNP_CAPABILITIES PnpCapabilities)
 
VOID GetPnpState (__out PWDF_DEVICE_STATE State)
 
VOID SetPnpState (__in PWDF_DEVICE_STATE State)
 
VOID SetDeviceFailed (__in WDF_DEVICE_FAILED_ACTION FailedAction)
 
VOID SetChildBusInformation (__in PPNP_BUS_INFORMATION BusInformation)
 
_Must_inspect_result_ NTSTATUS HandleQueryBusInformation (__inout FxIrp *Irp)
 
_Must_inspect_result_ NTSTATUS __inline PowerReference (__in BOOLEAN WaitForD0, __in_opt PVOID Tag=NULL, __in_opt LONG Line=0, __in_opt PSTR File=NULL)
 
VOID __inline PowerDereference (__in_opt PVOID Tag=NULL, __in_opt LONG Line=0, __in_opt PSTR File=NULL)
 
BOOLEAN HasPowerThread (VOID)
 
VOID QueueToPowerThread (__in PWORK_QUEUE_ITEM WorkItem)
 
_Must_inspect_result_ NTSTATUS AddUsageDevice (__in MdDeviceObject DependentDevice)
 
VOID RemoveUsageDevice (__in MdDeviceObject DependentDevice)
 
_Must_inspect_result_ NTSTATUS AddRemovalDevice (__in MdDeviceObject DependentDevice)
 
VOID RemoveRemovalDevice (__in MdDeviceObject DependentDevice)
 
VOID ClearRemovalDevicesList (VOID)
 
_Must_inspect_result_ NTSTATUS AllocateEnumInfo (VOID)
 
VOID AddChildList (__in FxChildList *List)
 
VOID RemoveChildList (__in FxChildList *List)
 
VOID ChildListNotifyRemove (__inout PLONG PendingCount)
 
_Must_inspect_result_ NTSTATUS AllocateDmaEnablerList (VOID)
 
VOID AddDmaEnabler (__in FxDmaEnabler *Enabler)
 
VOID RemoveDmaEnabler (__in FxDmaEnabler *Enabler)
 
VOID RevokeDmaEnablerResources (__in FxDmaEnabler *Enabler)
 
VOID AddQueryInterface (__in FxQueryInterface *QI, __in BOOLEAN Lock)
 
VOID QueryForD3ColdInterface (VOID)
 
VOID DropD3ColdInterface (VOID)
 
BOOLEAN IsPowerPolicyOwner (VOID)
 
BOOLEAN SupportsWakeInterrupt (VOID)
 
BOOLEAN IsS0IdleWakeFromS0Enabled (VOID)
 
BOOLEAN IsS0IdleSystemManaged (VOID)
 
BOOLEAN IsS0IdleUsbSSEnabled (VOID)
 
BOOLEAN IsSxWakeEnabled (VOID)
 
_Must_inspect_result_ NTSTATUS PowerPolicyCanChildPowerUp (__out PBOOLEAN PowerUp)
 
VOID PowerPolicyChildPoweredDown (VOID)
 
POWER_ACTION GetSystemPowerAction (VOID)
 
VOID ProcessDelayedDeletion (VOID)
 
VOID SignalDeviceRemovedEvent (VOID)
 
virtual NTSTATUS FireAndForgetIrp (FxIrp *Irp)=0
 
FxCmResListGetTranslatedResourceList (VOID)
 
FxCmResListGetRawResourceList (VOID)
 
ULONG GetInterruptObjectCount (VOID)
 
VOID AckPendingWakeInterruptOperation (__in BOOLEAN ProcessPowerEventOnDifferentThread)
 
VOID SendEventToAllWakeInterrupts (__in enum FxWakeInterruptEvents WakeInterruptEvent)
 
_Must_inspect_result_ NTSTATUS ValidateCmResource (__inout PCM_PARTIAL_RESOURCE_DESCRIPTOR *CmResourceRaw, __inout PCM_PARTIAL_RESOURCE_DESCRIPTOR *CmResource)
 
_Must_inspect_result_ NTSTATUS ValidateInterruptResourceCm (__in PCM_PARTIAL_RESOURCE_DESCRIPTOR CmIntResourceRaw, __in PCM_PARTIAL_RESOURCE_DESCRIPTOR CmIntResource, __in PWDF_INTERRUPT_CONFIG Configuration)
 
BOOLEAN IsDefaultReleaseHardwareOrder (VOID)
 
BOOLEAN HasMultipleInterrupts (VOID)
 
VOID WakeInterruptCreated (VOID)
 
- Public Member Functions inherited from FxPackage
 FxPackage (__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in CfxDevice *Device, __in WDFTYPE Type)
 
virtual NTSTATUS Dispatch (__in MdIrp Irp)=0
 
__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)
 
virtual BOOLEAN Dispose (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)
 
virtual const PFN_PNP_POWER_CALLBACKGetDispatchPnp (VOID)=0
 
virtual const PFN_PNP_POWER_CALLBACKGetDispatchPower (VOID)=0
 
VOID DeleteDevice (VOID)
 
VOID SetInternalFailure (VOID)
 
NTSTATUS CompletePowerRequest (__inout FxIrp *Irp, __in NTSTATUS Status)
 
NTSTATUS CompletePnpRequest (__inout FxIrp *Irp, __in NTSTATUS Status)
 
PNP_DEVICE_STATE HandleQueryPnpDeviceState (__in PNP_DEVICE_STATE PnpDeviceState)
 
_Must_inspect_result_ NTSTATUS HandleQueryBusRelations (__inout FxIrp *Irp)
 
_Must_inspect_result_ NTSTATUS HandleQueryDeviceRelations (__inout FxIrp *Irp, __inout FxRelatedDeviceList *List)
 
_Must_inspect_result_ NTSTATUS HandleQueryInterface (__inout FxIrp *Irp, __out PBOOLEAN CompleteRequest)
 
_Must_inspect_result_ NTSTATUS QueryForCapabilities (VOID)
 
VOID PnpAssignInterruptsSyncIrql (VOID)
 
_Must_inspect_result_ NTSTATUS PnpMatchResources (VOID)
 
 __drv_when (!NT_SUCCESS(return), __drv_arg(ResourcesMatched, _Must_inspect_result_)) NTSTATUS PnpPrepareHardware(__out PBOOLEAN ResourcesMatched)
 
_Must_inspect_result_ NTSTATUS PnpPrepareHardwareInternal (VOID)
 
_Must_inspect_result_ NTSTATUS PnpReleaseHardware (VOID)
 
_Must_inspect_result_ NTSTATUS PnpEnableInterfacesAndRegisterWmi (VOID)
 
_Must_inspect_result_ NTSTATUS PnpSurpriseRemoval (__inout FxIrp *Irp)
 
NTSTATUS FilterResourceRequirements (__in IO_RESOURCE_REQUIREMENTS_LIST **IoList)
 
virtual VOID PowerReleasePendingDeviceIrp (BOOLEAN IrpMustBePresent=TRUE)=0
 
VOID AddInterruptObject (__in FxInterrupt *Interrupt)
 
VOID RemoveInterruptObject (__in FxInterrupt *Interrupt)
 
VOID PnpProcessEventInner (__inout FxPostProcessInfo *Info)
 
VOID PowerProcessEventInner (__inout FxPostProcessInfo *Info)
 
VOID PowerPolicyProcessEventInner (__inout FxPostProcessInfo *Info)
 
VOID PnpEnterNewState (__in WDF_DEVICE_PNP_STATE State)
 
VOID PowerEnterNewState (__in WDF_DEVICE_POWER_STATE State)
 
VOID PowerPolicyEnterNewState (__in WDF_DEVICE_POWER_POLICY_STATE State)
 
VOID NotPowerPolicyOwnerEnterNewState (__in WDF_DEVICE_POWER_POLICY_STATE NewState)
 
_Must_inspect_result_ NTSTATUS DispatchWaitWake (__inout FxIrp *Irp)
 
VOID SaveState (__in BOOLEAN UseCanSaveState)
 
_Must_inspect_result_ NTSTATUS PnpDeviceUsageNotification (__inout FxIrp *Irp)
 
LONG GetPnpStateInternal (VOID)
 
LONG GetPnpCapsInternal (VOID)
 
virtual BOOLEAN PnpSendStartDeviceDownTheStackOverload (VOID)=0
 
virtual WDF_DEVICE_PNP_STATE PnpEventCheckForDevicePresenceOverload (VOID)=0
 
virtual WDF_DEVICE_PNP_STATE PnpEventEjectHardwareOverload (VOID)=0
 
virtual WDF_DEVICE_PNP_STATE PnpGetPostRemoveState (VOID)=0
 
virtual WDF_DEVICE_PNP_STATE PnpEventPdoRemovedOverload (VOID)=0
 
virtual WDF_DEVICE_PNP_STATE PnpEventFdoRemovedOverload (VOID)=0
 
virtual VOID PnpEventSurpriseRemovePendingOverload (VOID)
 
VOID PnpEventRemovedCommonCode (VOID)
 
VOID PnpPowerPolicyStart (VOID)
 
VOID PnpPowerPolicyStop (VOID)
 
VOID PnpPowerPolicySurpriseRemove (VOID)
 
VOID PnpPowerPolicyRemove (VOID)
 
VOID PnpFinishProcessingIrp (__in BOOLEAN IrpMustBePresent=TRUE)
 
VOID PnpDisableInterfaces (VOID)
 
virtual NTSTATUS SendIrpSynchronously (FxIrp *Irp)=0
 
virtual WDF_DEVICE_POWER_STATE PowerCheckDeviceTypeOverload (VOID)=0
 
virtual WDF_DEVICE_POWER_STATE PowerCheckDeviceTypeNPOverload (VOID)=0
 
virtual NTSTATUS PowerCheckParentOverload (BOOLEAN *ParentOn)=0
 
virtual NTSTATUS PowerEnableWakeAtBusOverload (VOID)
 
virtual VOID PowerDisableWakeAtBusOverload (VOID)
 
virtual VOID PowerParentPowerDereference (VOID)=0
 
VOID PowerGotoDx (VOID)
 
BOOLEAN PowerGotoDxIoStopped (VOID)
 
BOOLEAN PowerGotoDxIoStoppedNP (VOID)
 
BOOLEAN PowerDmaEnableAndScan (__in BOOLEAN ImplicitPowerUp)
 
VOID PowerCompletePendedWakeIrp (VOID)
 
VOID PowerCompleteWakeRequestFromWithinMachine (__in NTSTATUS Status)
 
BOOLEAN PowerMakeWakeRequestNonCancelable (__in NTSTATUS Status)
 
BOOLEAN PowerIsWakeRequestPresent (VOID)
 
VOID PowerSendIdlePowerEvent (__in FxPowerIdleEvents Event)
 
VOID PowerSendPowerDownEvents (__in FxPowerDownType Type)
 
VOID PowerSendPowerUpEvents (VOID)
 
VOID PowerSendPowerDownFailureEvent (__in FxPowerDownType Type)
 
VOID PowerSendPowerUpFailureEvent (VOID)
 
VOID PowerSetDevicePowerState (__in WDF_POWER_DEVICE_STATE State)
 
_Must_inspect_result_ BOOLEAN PowerDmaPowerUp (VOID)
 
BOOLEAN PowerDmaPowerDown (VOID)
 
VOID PowerConnectInterruptFailed (VOID)
 
VOID PowerPolicyUpdateSystemWakeSource (__in FxIrp *Irp)
 
_Must_inspect_result_ NTSTATUS PowerPolicySendDevicePowerRequest (__in DEVICE_POWER_STATE DeviceState, __in SendDeviceRequestAction Action)
 
_Must_inspect_result_ NTSTATUS PowerPolicySendWaitWakeRequest (__in SYSTEM_POWER_STATE SystemState)
 
VOID PowerPolicyCompleteSystemPowerIrp (VOID)
 
BOOLEAN PowerPolicyCancelWaitWake (VOID)
 
VOID PowerPolicySubmitUsbIdleNotification (VOID)
 
BOOLEAN PowerPolicyCancelUsbSSIfCapable (VOID)
 
VOID PowerPolicyCancelUsbSS (VOID)
 
SYSTEM_POWER_STATE PowerPolicyGetPendingSystemState (VOID)
 
_Must_inspect_result_ NTSTATUS PowerPolicyHandleSystemQueryPower (__in SYSTEM_POWER_STATE QueryState)
 
BOOLEAN PowerPolicyCanWakeFromSystemState (__in SYSTEM_POWER_STATE SystemState)
 
SYSTEM_POWER_STATE PowerPolicyGetDeviceDeepestSystemWakeState (VOID)
 
DEVICE_POWER_STATE PowerPolicyGetDeviceDeepestDeviceWakeState (__in SYSTEM_POWER_STATE SystemState)
 
BOOLEAN IsPresentPendingPnpIrp (VOID)
 
VOID SetPendingPnpIrp (__inout FxIrp *Irp, __in BOOLEAN MarkIrpPending=TRUE)
 
VOID SetPendingPnpIrpStatus (__in NTSTATUS Status)
 
MdIrp ClearPendingPnpIrp (VOID)
 
MdIrp GetPendingPnpIrp (VOID)
 
VOID SetPendingDevicePowerIrp (__inout FxIrp *Irp)
 
MdIrp ClearPendingDevicePowerIrp (VOID)
 
VOID SetPendingSystemPowerIrp (__inout FxIrp *Irp)
 
MdIrp ClearPendingSystemPowerIrp (VOID)
 
MdIrp GetPendingSystemPowerIrp (VOID)
 
BOOLEAN IsDevicePowerUpIrpPending (VOID)
 
BOOLEAN IsUsageSupported (__in DEVICE_USAGE_NOTIFICATION_TYPE Usage)
 
VOID SetUsageSupport (__in DEVICE_USAGE_NOTIFICATION_TYPE Usage, __in BOOLEAN Supported)
 
LONG AdjustUsageCount (__in DEVICE_USAGE_NOTIFICATION_TYPE Usage, __in BOOLEAN Add)
 
LONG GetUsageCount (__in __range(1, 4) ULONG Usage)
 
BOOLEAN IsInSpecialUse (VOID)
 
ULONG SetUsageNotificationFlags (__in DEVICE_USAGE_NOTIFICATION_TYPE Type, __in BOOLEAN InPath)
 
VOID RevertUsageNotificationFlags (__in DEVICE_USAGE_NOTIFICATION_TYPE Type, __in BOOLEAN InPath, __in ULONG OldFlags)
 
VOID CommitUsageNotification (__in DEVICE_USAGE_NOTIFICATION_TYPE Type, __in ULONG OldFlags)
 
_Must_inspect_result_ NTSTATUS CreatePowerThread (VOID)
 
- Protected Member Functions inherited from FxObject
 FxObject (__in WDFTYPE Type, __in USHORT Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxObjectType ObjectType)
 
FxObjectDebugExtensionGetDebugExtension (VOID)
 
BOOLEAN IsDebug (VOID)
 
VOID AllocateTagTracker (__in WDFTYPE Type)
 
virtual VOID SelfDestruct (VOID)
 
PVOID __inline GetObjectHandleUnchecked (VOID)
 
VOID __inline DestroyChildren (VOID)
 
VOID DeleteEarlyDisposedObject (VOID)
 
- Static Protected Member Functions 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
88Routine Description:
89
90 This is the constructor for the FxPkgPdo. Don't do any initialization
91 that might fail here.
92
93Arguments:
94
95 none
96
97Returns:
98
99 none
100
101--*/
102
103{
105
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}
SINGLE_LIST_ENTRY m_DeviceTextHead
Definition: fxpkgpdo.hpp:37
BOOLEAN m_AddedToStaticList
Definition: fxpkgpdo.hpp:63
PWSTR m_DeviceID
Definition: fxpkgpdo.hpp:77
PWSTR m_CompatibleIDs
Definition: fxpkgpdo.hpp:98
FxRelatedDeviceList * m_EjectionDeviceList
Definition: fxpkgpdo.hpp:113
PWSTR m_ContainerID
Definition: fxpkgpdo.hpp:105
PWSTR m_InstanceID
Definition: fxpkgpdo.hpp:84
BOOLEAN m_Static
Definition: fxpkgpdo.hpp:61
FxChildList * m_OwningChildList
Definition: fxpkgpdo.hpp:42
FxDeviceDescriptionEntry * m_Description
Definition: fxpkgpdo.hpp:40
BOOLEAN m_EnableWakeAtBusInvoked
Definition: fxpkgpdo.hpp:141
PWSTR m_HardwareIDs
Definition: fxpkgpdo.hpp:91
BOOLEAN m_RawOK
Definition: fxpkgpdo.hpp:59
PWSTR m_IDsAllocation
Definition: fxpkgpdo.hpp:111
MxEvent * m_DeviceEjectProcessed
Definition: fxpkgpdo.hpp:121
BOOLEAN m_CanBeDeleted
Definition: fxpkgpdo.hpp:123
SharedPowerData m_SharedPower
Definition: fxpkgpnp.hpp:4161
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
@ FX_TYPE_PACKAGE_PDO
Definition: fxtypes.h:94
BOOLEAN m_WaitWakeOwner
Definition: fxpkgpnp.hpp:186
struct _SINGLE_LIST_ENTRY * Next
Definition: ntbasedef.h:629
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474

◆ ~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) {
179 }
180}
void FxPoolFree(__in_xcount(ptr is at an offset from AllocationStart) PVOID ptr)
Definition: wdfpool.cpp:361
static void _CleanupList(__inout PSINGLE_LIST_ENTRY Head)

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}
_In_ PIRP Irp
Definition: csq.h:116
#define STATUS_NOT_SUPPORTED
Definition: ntstatus.h:423

◆ _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}
LONG NTSTATUS
Definition: precomp.h:26
_Must_inspect_result_ NTSTATUS PowerPolicyHandleSystemQueryPower(__in SYSTEM_POWER_STATE QueryState)
Definition: fxpkgpnp.cpp:3582
NTSTATUS CompletePowerRequest(__inout FxIrp *Irp, __in NTSTATUS Status)
Definition: fxpkgpnp.cpp:5404
#define STATUS_SUCCESS
Definition: shellext.h:65
Definition: ps.c:97
_In_ SYSTEM_POWER_STATE SystemPowerState
Definition: iotypes.h:7519

◆ _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) {
86 return ((FxPkgPdo*) This)->DispatchSystemSetPower(Irp);
87 }
88 else {
89 return ((FxPkgPdo*) This)->DispatchDeviceSetPower(Irp);
90 }
91}

◆ _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}

◆ _PnpEject()

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

Definition at line 968 of file fxpkgpdo.cpp.

991{
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 {
1016 pdoPkg->m_DeviceEjectProcessed = event.GetSelfPointer();
1017
1018 //
1019 // let state machine process eject
1020 //
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}
WDFDEVICE __inline GetHandle(VOID)
Definition: fxdevice.hpp:237
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxobject.hpp:734
CfxDevice * m_Device
Definition: fxobject.hpp:329
MdIrp ClearPendingPnpIrp(VOID)
Definition: fxpkgpnp.hpp:3029
VOID PnpProcessEvent(__in FxPnpEvent Event, __in BOOLEAN ProcessEventOnDifferentThread=FALSE)
VOID SetPendingPnpIrp(__inout FxIrp *Irp, __in BOOLEAN MarkIrpPending=TRUE)
Definition: fxpkgpnp.cpp:4883
NTSTATUS CompletePnpRequest(__inout FxIrp *Irp, __in NTSTATUS Status)
Definition: fxpkgpnp.cpp:5752
MxEvent * GetSelfPointer(VOID)
Definition: mxevent.h:110
#define TRACINGPNP
Definition: dbgtrace.h:67
#define NT_SUCCESS(StatCode)
Definition: apphelp.c:32
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
@ PnpEventEject
struct _cl_event * event
Definition: glext.h:7739
#define ASSERT(a)
Definition: mode.c:44
#define KernelMode
Definition: asm.h:34
@ SynchronizationEvent
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
@ Executive
Definition: ketypes.h:415

◆ _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
386}

◆ _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;
1550
1551 pThis = (FxPkgPdo*) This;
1552
1555
1556 return pThis->CompletePnpRequest(Irp, status);
1557}
CfxDevice * m_ParentDevice
Definition: fxdevice.hpp:569
FxPkgPnp * m_PkgPnp
Definition: fxdevice.hpp:670
_Must_inspect_result_ NTSTATUS HandleQueryBusInformation(__inout FxIrp *Irp)
Definition: fxpkgpnp.cpp:947

◆ _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}

◆ _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}

◆ _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) {
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}
LCID m_DefaultLocale
Definition: fxpkgpdo.hpp:38
static __inline PVOID MxAllocatePoolWithTag(__in POOL_TYPE PoolType, __in SIZE_T NumberOfBytes, __in ULONG Tag)
Definition: mxmemorykm.h:30
#define PagedPool
Definition: env_spec_w32.h:308
PFX_DRIVER_GLOBALS pFxDriverGlobals
FxDeviceText * FindObjectForGivenLocale(__in PSINGLE_LIST_ENTRY Head, __in LCID LocaleId)
Definition: fxpkgpdo.cpp:820
GLuint GLsizei GLsizei * length
Definition: glext.h:6040
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
PVOID pBuffer
DWORD LCID
Definition: nls.h:13
PWCHAR m_LocationInformation
PWCHAR m_Description
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
uint32_t ULONG_PTR
Definition: typedefs.h:65
uint16_t * PWCHAR
Definition: typedefs.h:56
#define STATUS_INSUFFICIENT_RESOURCES
Definition: udferr_usr.h:158
@ DeviceTextLocationInformation
Definition: iotypes.h:2946
@ DeviceTextDescription
Definition: iotypes.h:2945
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ _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;
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:
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
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
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}
#define UNICODE_NULL
size_t FxCalculateTotalMultiSzStringSize(__in __nullnullterminated PCWSTR MultiSz)
Definition: stringutil.cpp:84
const uint16_t * PCWSTR
Definition: typedefs.h:57
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
enum _BUS_QUERY_ID_TYPE BUS_QUERY_ID_TYPE
@ BusQueryCompatibleIDs
Definition: iotypes.h:2938
@ BusQueryContainerID
Definition: iotypes.h:2941
@ BusQueryInstanceID
Definition: iotypes.h:2939
@ BusQueryDeviceID
Definition: iotypes.h:2936
@ BusQueryHardwareIDs
Definition: iotypes.h:2937

◆ _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
547}
unsigned char BOOLEAN

◆ _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}
#define TRACE_LEVEL_VERBOSE
Definition: storswtr.h:30
#define TRACE_LEVEL_INFORMATION
Definition: storswtr.h:29
ULONG PNP_DEVICE_STATE
Definition: iotypes.h:997

◆ _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}

◆ _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}

◆ _PnpSetLock()

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

Definition at line 1323 of file fxpkgpdo.cpp.

1341{
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}
rwlock_t lock
Definition: tcpcore.h:0

◆ _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}
_Must_inspect_result_ NTSTATUS PnpSurpriseRemoval(__inout FxIrp *Irp)
Definition: fxpkgpnp.cpp:2366
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;
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}
MdDeviceObject __inline GetDeviceObject(VOID)
Definition: fxdevice.hpp:174
static FxDevice * GetFxDevice(__in MdDeviceObject DeviceObject)
Definition: fxdeviceum.cpp:60
__inline FxPkgPdo * GetPdoPkg(VOID)
Definition: fxdevice.hpp:1254
Definition: fxirp.hpp:28
PDEVICE_CAPABILITIES GetParameterDeviceCapabilities()
Definition: fxirpum.cpp:1132
PVOID GetContext(__in ULONG Index)
Definition: fxirpum.cpp:361
MdIrp SetIrp(MdIrp irp)
Definition: fxirpkm.hpp:71
VOID HandleQueryCapabilities(__inout PDEVICE_CAPABILITIES ReportedCaps, __in PDEVICE_CAPABILITIES ParentCaps)
Definition: fxpkgpdo.cpp:666
__inline VOID SetObject(__in_opt MdDeviceObject DeviceObject)
static __inline VOID _Free(__in MdWorkItem Item)
Definition: mxworkitemkm.h:81
FxPkgPdo * pPkgPdo
FxIrp * irp
IWudfIrp * MdIrp
Definition: mxum.h:103
PIO_WORKITEM MdWorkItem
Definition: mxworkitemkm.h:27
DEVICE_CAPABILITIES DeviceCaps
Definition: device_common.h:30
_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
_In_ PDEVICE_OBJECT DeviceObject
Definition: wdfdevice.h:2055

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;
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}
VOID DeleteFromFailedCreate(VOID)
Definition: fxobject.cpp:391
_Must_inspect_result_ NTSTATUS Add(__in PFX_DRIVER_GLOBALS Globals, __inout FxRelatedDevice *Entry)
KIRQL irql
Definition: wave.h:1
UCHAR KIRQL
Definition: env_spec_w32.h:591
#define DO_NOTHING()
Definition: mxgeneral.h:32
@ Unlock
Definition: ntsecapi.h:294
_Must_inspect_result_ _In_ WDFDEVICE _In_ PDEVICE_OBJECT DependentDevice
Definition: wdfdevice.h:2263
_Must_inspect_result_ _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_ WDFWAITLOCK * Lock
Definition: wdfsync.h:127

◆ 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}
VOID ReenumerateEntry(__inout FxDeviceDescriptionEntry *Entry)
#define STATUS_NOT_FOUND
Definition: shellext.h:72
FxChildList * GetParentList(VOID)

◆ ClearEjectionDevicesList()

VOID FxPkgPdo::ClearEjectionDevicesList ( VOID  )

Definition at line 1906 of file fxpkgpdo.cpp.

1909{
1911
1912 if (m_EjectionDeviceList != 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 UnlockFromEnum(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
VOID Remove(__in PFX_DRIVER_GLOBALS Globals, __in MdDeviceObject Device)
VOID LockForEnum(__in PFX_DRIVER_GLOBALS FxDriverGlobals)
_Must_inspect_result_ FxRelatedDevice * GetNextEntry(__in_opt FxRelatedDevice *Entry)
PLIST_ENTRY pEntry
Definition: fxioqueue.cpp:4484

◆ 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 }
1655 //
1656 // Surprise removed and we have reported the PDO as missing
1657 //
1658
1660 }
1661}
VOID DeleteSymbolicLink(VOID)
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(),
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}
VOID SetPendingDevicePowerIrp(__inout FxIrp *Irp)
Definition: fxpkgpnp.hpp:3050
VOID PowerProcessEvent(__in FxPowerEvent Event, __in BOOLEAN ProcessEventOnDifferentThread=FALSE)
FxPowerPolicyMachine m_PowerPolicyMachine
Definition: fxpkgpnp.hpp:4153
#define ASSERTMSG(msg, exp)
Definition: nt_native.h:431
@ PowerDeviceD0
Definition: ntpoapi.h:49
#define STATUS_PENDING
Definition: ntstatus.h:82
FxPowerPolicyOwnerSettings * m_Owner
_In_ PWDFDEVICE_INIT _In_ BOOLEAN IsPowerPolicyOwner
Definition: wdfdevice.h:2966

◆ 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}
BYTE m_SystemPowerState
Definition: fxpkgpnp.hpp:4102
VOID SetPendingSystemPowerIrp(__inout FxIrp *Irp)
Definition: fxpkgpnp.hpp:3082
VOID PowerPolicyProcessEvent(__in FxPowerPolicyEvent Event, __in BOOLEAN ProcessEventOnDifferentThread=FALSE)
POWER_STATE SetPowerState(__in POWER_STATE_TYPE Type, __in POWER_STATE State)
#define DISPATCH_LEVEL
Definition: env_spec_w32.h:696
MxDeviceObject deviceObject
@ PowerSystemWorking
Definition: ntpoapi.h:36
unsigned char BYTE
Definition: xxhash.c:193

◆ 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
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}
virtual VOID FinishInitialize(__inout PWDFDEVICE_INIT DeviceInit)
Definition: fxpkgpnp.cpp:1240
SINGLE_LIST_ENTRY DeviceText
_In_ PWDFDEVICE_INIT DeviceInit
Definition: wdfcontrol.h:113

◆ 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 {
409 }
410}
#define IRP_MJ_POWER

◆ GetDispatchPnp()

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

Implements FxPkgPnp.

Definition at line 560 of file fxpkgpdo.hpp.

563 {
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 //
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}
static int state
Definition: maze.c:121
ULONG m_PnpCapsUINumber
Definition: fxpkgpnp.hpp:4091
LONG GetPnpCapsInternal(VOID)
Definition: fxpkgpnp.cpp:5466
FxPowerCaps m_PowerCaps
Definition: fxpkgpnp.hpp:4093
ULONG m_PnpCapsAddress
Definition: fxpkgpnp.hpp:4090
static DEVICE_POWER_STATE _GetPowerCapState(__in ULONG Index, __in ULONG State)
Definition: fxpkgpnp.cpp:5657
@ FxPnpCapSilentInstallUseDefault
Definition: fxpkgpnp.hpp:309
@ FxPnpCapSilentInstallMask
Definition: fxpkgpnp.hpp:310
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
@ PowerSystemMaximum
Definition: ntpoapi.h:42
@ PowerDeviceMaximum
Definition: ntpoapi.h:53
enum _DEVICE_POWER_STATE DEVICE_POWER_STATE
enum _SYSTEM_POWER_STATE SYSTEM_POWER_STATE
long LONG
Definition: pedump.c:60
#define SET_POWER_CAP(caps, pCaps, FieldName)
Definition: pnppriv.hpp:289
#define SET_PNP_CAP(caps, pCaps, FieldName)
Definition: pnppriv.hpp:279
@ Removable
Definition: arc.h:81
ULONG D3Latency
Definition: fxpkgpnp.hpp:425
BYTE SystemWake
Definition: fxpkgpnp.hpp:413
ULONG D2Latency
Definition: fxpkgpnp.hpp:424
ULONG D1Latency
Definition: fxpkgpnp.hpp:423
USHORT Caps
Definition: fxpkgpnp.hpp:406
BYTE DeviceWake
Definition: fxpkgpnp.hpp:412
ULONG States
Definition: fxpkgpnp.hpp:418
uint32_t ULONG
Definition: typedefs.h:59

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{
1709
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}
static VOID STDCALL _InterfaceDereferenceNoOp(__in_opt PVOID Context)
Definition: fxdevice.hpp:1778
static VOID STDCALL _InterfaceReferenceNoOp(__in_opt PVOID Context)
Definition: fxdevice.hpp:1767
static VOID STDCALL _RemoveAndReenumerateSelf(__in PVOID Context)
Definition: fxpkgpdo.cpp:1665
NTSTATUS NTAPI CompleteRequest(IN PIRP Irp, IN NTSTATUS Status, IN ULONG_PTR Information)
Definition: dispatch.c:19
PINTERFACE pInterface
#define STATUS_INVALID_BUFFER_SIZE
Definition: ntstatus.h:650
PVOID Context
Definition: miniport.h:123
USHORT Version
Definition: miniport.h:122
USHORT Size
Definition: miniport.h:121
PINTERFACE_REFERENCE InterfaceReference
Definition: miniport.h:124
PINTERFACE_DEREFERENCE InterfaceDereference
Definition: miniport.h:125
struct _REENUMERATE_SELF_INTERFACE_STANDARD * PREENUMERATE_SELF_INTERFACE_STANDARD

◆ 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) {
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) {
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}
__inline FxPkgFdo * GetFdoPkg(VOID)
Definition: fxdevice.hpp:1236
__inline BOOLEAN IsFdo(VOID)
Definition: fxdevice.hpp:1227
FxChildList * m_StaticDeviceList
Definition: fxpkgfdo.hpp:42
virtual _Must_inspect_result_ NTSTATUS Initialize(__in PWDFDEVICE_INIT DeviceInit)
Definition: fxpkgpnp.cpp:349
static __inline VOID MxAssert(__in BOOLEAN Condition)
Definition: mxgeneralkm.h:165
FxDevice * pPdo
SINGLE_LIST_ENTRY * pCur
PWSTR FxCopyMultiSz(__out LPWSTR Buffer, __in FxCollectionInternal *StringCollection)
Definition: stringutil.cpp:129
size_t FxCalculateTotalStringSize(__in FxCollectionInternal *StringCollection, __in BOOLEAN Verify=FALSE, __out_opt PBOOLEAN ContainsOnlyStrings=NULL)
Definition: stringutil.cpp:32
uint16_t * PWSTR
Definition: typedefs.h:56
#define WDF_PTR_ADD_OFFSET(_ptr, _offset)
Definition: wdfcore.h:144

◆ 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) {
1180 //
1181 // The description freed itself now that the device has been reported
1182 // missing.
1183 //
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 //
1198
1199 //
1200 // The description freed itself now that the device has been reported
1201 // missing.
1202 //
1204 }
1205}
BOOLEAN IsDeviceRemoved(VOID)
@ WdfDevStatePnpPdoRemoved
Definition: wdfdevice.h:84
@ WdfDevStatePnpRemovedPdoWait
Definition: wdfdevice.h:85

◆ PnpEventEjectHardwareOverload()

WDF_DEVICE_PNP_STATE FxPkgPdo::PnpEventEjectHardwareOverload ( VOID  )
privatevirtual

Implements FxPkgPnp.

Definition at line 1045 of file fxpkgpdo.cpp.

1067{
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 //
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
1118 //
1119 // Change the state.
1120 //
1122 }
1123 else {
1127 "Eject failed since driver's EvtDeviceEject returned %!STATUS!", status);
1128
1132 "EvtDeviceEject returned an invalid status STATUS_NOT_SUPPORTED");
1133
1134 if (GetDriverGlobals()->IsVerificationEnabled(1, 11, OkForDownLevel)) {
1136 }
1137 }
1138 }
1139
1140 //
1141 // set irp status
1142 //
1144
1145 //
1146 // Pnp dispatch routine is waiting on this event, and it will complete
1147 // the Eject irp
1148 //
1150
1151 return state;
1152}
MxEvent * GetScanEvent(VOID)
_Must_inspect_result_ NTSTATUS UpdateAsMissing(__in PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER Description)
FxPnpDeviceEject m_DeviceEject
Definition: fxpkgpdo.hpp:50
VOID SetPendingPnpIrpStatus(__in NTSTATUS Status)
Definition: fxpkgpnp.hpp:3018
_Must_inspect_result_ NTSTATUS Invoke(__in WDFDEVICE Device)
__inline VOID Set()
Definition: mxeventkm.h:91
#define TRACINGDEVICE
Definition: dbgtrace.h:58
FxChildList * pList
FxVerifierDbgBreakPoint(pFxDriverGlobals)
@ OkForDownLevel
Definition: fxglobals.h:80
PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER GetId(VOID)
@ WdfDevStatePnpEjectedWaitingForRemove
Definition: wdfdevice.h:68
@ WdfDevStatePnpEjectFailed
Definition: wdfdevice.h:66
enum _WDF_DEVICE_PNP_STATE WDF_DEVICE_PNP_STATE

◆ PnpEventFdoRemovedOverload()

WDF_DEVICE_PNP_STATE FxPkgPdo::PnpEventFdoRemovedOverload ( VOID  )
privatevirtual

Implements FxPkgPnp.

Definition at line 1269 of file fxpkgpdo.cpp.

1272{
1273 ASSERT(!"This should only be implemented for FDOs.");
1274
1275 //
1276 // Do something safe. Act like the device is not present.
1277 //
1278 return WdfDevStatePnpFinal;
1279}
@ WdfDevStatePnpFinal
Definition: wdfdevice.h:117

◆ PnpEventPdoRemovedOverload()

WDF_DEVICE_PNP_STATE FxPkgPdo::PnpEventPdoRemovedOverload ( VOID  )
privatevirtual

Implements FxPkgPnp.

Definition at line 1208 of file fxpkgpdo.cpp.

1227{
1229
1230 //
1231 // Unconditionally delete the symbolic link now (vs calling
1232 // DeleteSymbolicLinkOverload()) because we know that the device has been
1233 // reported as missing.
1234 //
1236
1237 //
1238 // Do that which all device stacks need to do upon removal.
1239 //
1241
1242 //
1243 // m_Device is Release()'ed in FxPkgPnp::PnpEventFinal
1244 //
1245 if (m_Description != NULL) {
1247 "Removing entry reference %p on FxPkgPnp %p",
1248 m_Description, this);
1249
1252 }
1253
1254 return WdfDevStatePnpFinal;
1255}
VOID PnpEventRemovedCommonCode(VOID)

◆ PnpEventSurpriseRemovePendingOverload()

VOID FxPkgPdo::PnpEventSurpriseRemovePendingOverload ( VOID  )
privatevirtual

Reimplemented from FxPkgPnp.

Definition at line 1282 of file fxpkgpdo.cpp.

1285{
1286 if (m_Description != NULL) {
1288 }
1289
1291}
virtual VOID PnpEventSurpriseRemovePendingOverload(VOID)

◆ PnpGetPostRemoveState()

WDF_DEVICE_PNP_STATE FxPkgPdo::PnpGetPostRemoveState ( VOID  )
privatevirtual

Implements FxPkgPnp.

Definition at line 1258 of file fxpkgpdo.cpp.

1261{
1262 //
1263 // Transition to the check for device presence state.
1264 //
1266}
@ WdfDevStatePnpCheckForDevicePresence
Definition: wdfdevice.h:65

◆ PnpQueryCapabilities()

_Must_inspect_result_ NTSTATUS FxPkgPdo::PnpQueryCapabilities ( __inout FxIrp Irp)
private

Definition at line 561 of file fxpkgpdo.cpp.

581{
582 PDEVICE_CAPABILITIES pDeviceCapabilities;
583 STACK_DEVICE_CAPABILITIES parentStackCapabilities = {0};
585
587
588 pDeviceCapabilities = Irp->GetParameterDeviceCapabilities();
589
590 //
591 // Confirm this is a valid DeviceCapabilities structure.
592 //
593 ASSERT(pDeviceCapabilities->Size >= sizeof(DEVICE_CAPABILITIES));
594 ASSERT(pDeviceCapabilities->Version == 1);
595
596 if ((pDeviceCapabilities->Version == 1) &&
597 (pDeviceCapabilities->Size >= sizeof(DEVICE_CAPABILITIES))) {
598
599 //
600 // Since query caps must be sent to the parent stack until it reaches
601 // the root, we can quickly run out of stack space. If that happens,
602 // then move to a work item to get a fresh stack with plenty of stack
603 // space.
604 //
606 MxWorkItem workItem;
607
609
610 if (NT_SUCCESS(status)) {
611 //
612 // Store off the work item so we can free it in the worker routine
613 //
614 Irp->SetContext(0, (PVOID)workItem.GetWorkItem());
615
616 //
617 // Mark the irp as pending because it will be completed in
618 // another thread
619 //
620 Irp->MarkIrpPending();
621
622 //
623 // Kick off to another thread
624 //
625 workItem.Enqueue(_QueryCapsWorkItem, Irp->GetIrp());
626
627 return STATUS_PENDING;
628 }
629 else {
630 //
631 // Not enough for a work item, return error
632 //
634 }
635 }
636 else {
637 MxDeviceObject parentDeviceObject;
638
639 parentDeviceObject.SetObject(
643 &parentDeviceObject,
644 NULL, // D3ColdInterface
645 &parentStackCapabilities);
646
647 if (NT_SUCCESS(status)) {
648#pragma prefast(suppress:__WARNING_POTENTIAL_BUFFER_OVERFLOW_HIGH_PRIORITY, "prefast is confused")
649 HandleQueryCapabilities(pDeviceCapabilities,
650 &parentStackCapabilities.DeviceCaps);
651
652 //
653 // The check above does not guarantee STATUS_SUCCESS explicitly
654 // (ie the verifier can change the value to something other then
655 // STATUS_SUCCESS) so set it here
656 //
658 }
659 }
660 }
661
663}
static VOID STDCALL _QueryCapsWorkItem(__in MdDeviceObject DeviceObject, __in PVOID Context)
Definition: fxpkgpdo.cpp:779
__inline MdWorkItem GetWorkItem()
Definition: mxworkitemkm.h:73
__inline VOID Enqueue(__in PMX_WORKITEM_ROUTINE Callback, __in PVOID Context)
Definition: mxworkitemkm.h:58
_Must_inspect_result_ __inline NTSTATUS Allocate(__in MdDeviceObject DeviceObject, __in_opt PVOID ThreadPoolEnv=NULL)
Definition: mxworkitemkm.h:41
static __inline BOOLEAN MxHasEnoughRemainingThreadStack(VOID)
Definition: mxgeneralkm.h:298
#define STATUS_UNSUCCESSFUL
Definition: udferr_usr.h:132
DEVICE_CAPABILITIES
Definition: iotypes.h:965
* PDEVICE_CAPABILITIES
Definition: iotypes.h:965

◆ PnpQueryDeviceRelations()

_Must_inspect_result_ NTSTATUS FxPkgPdo::PnpQueryDeviceRelations ( __inout FxIrp Irp)
private

Definition at line 434 of file fxpkgpdo.cpp.

453{
454 PDEVICE_RELATIONS pDeviceRelations;
458
459 status = Irp->GetStatus();
461
462 type = Irp->GetParameterQDRType();
463 switch (type) {
464 case BusRelations:
466 break;
467
469 case RemovalRelations:
471 Irp,
474
475 //
476 // STATUS_NOT_SUPPORTED is a special value. It means that
477 // HandleQueryDeviceRelations did not modify the irp at all and it
478 // should be sent off as is.
479 //
481 //
482 // Complete the request with the status it was received with
483 //
484 status = Irp->GetStatus();
485 }
486 break;
487
491
492 if (pDeviceRelations != NULL) {
494
495 pDeviceObject = reinterpret_cast<PDEVICE_OBJECT> (m_Device->GetDeviceObject());
496
498
499 pDeviceRelations->Count = 1;
500 pDeviceRelations->Objects[0] = pDeviceObject;
501
502 Irp->SetInformation((ULONG_PTR) pDeviceRelations);
504 }
505 else {
506 Irp->SetInformation(NULL);
508
511 "WDFDEVICE %p failing TargetDeviceRelations, %!STATUS!",
513 }
514 break;
515 }
516
518}
_Must_inspect_result_ NTSTATUS HandleQueryDeviceRelations(__inout FxIrp *Irp, __inout FxRelatedDeviceList *List)
Definition: fxpkgpnp.cpp:996
_Must_inspect_result_ NTSTATUS HandleQueryBusRelations(__inout FxIrp *Irp)
Definition: fxpkgpnp.cpp:758
FxRelatedDeviceList * m_RemovalDeviceList
Definition: fxpkgpnp.hpp:4115
static __inline VOID MxReferenceObject(__in PVOID Object)
Definition: mxgeneralkm.h:238
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
_In_ PNDIS_STRING _In_ PNDIS_STRING _Out_ PDEVICE_OBJECT * pDeviceObject
Definition: ndis.h:4679
PDEVICE_OBJECT Objects[1]
Definition: iotypes.h:2163
@ EjectionRelations
Definition: iotypes.h:2153
@ RemovalRelations
Definition: iotypes.h:2155
@ BusRelations
Definition: iotypes.h:2152
@ TargetDeviceRelation
Definition: iotypes.h:2156
struct _DEVICE_RELATIONS * PDEVICE_RELATIONS
enum _DEVICE_RELATION_TYPE DEVICE_RELATION_TYPE

◆ PnpQueryResourceRequirements()

_Must_inspect_result_ NTSTATUS FxPkgPdo::PnpQueryResourceRequirements ( __inout FxIrp Irp)
private

Definition at line 141 of file fxpkgpdokm.cpp.

163{
164 PIO_RESOURCE_REQUIREMENTS_LIST pWdmRequirementsList;
168
170
172
173
174
175
176 // We know for sure that the PDO is known to pnp now because it has received
177 // this query resource requirements request.
179
180 //
181 // Now that it is a known PDO, we can register interfaces on it whose
182 // registration was delayed because the PDO was unknown at the time of the
183 // call to WdfDeviceCreateDeviceInterface. If it is not the first time
184 // then we re-register (see comments below for reason).
185 //
186 for (ple = m_DeviceInterfaceHead.Next; ple != NULL; ple = ple->Next) {
188
190
191 //
192 // At this time the interface may be in registered or unregistered state.
193 // The reason being that pnp may unregister the interface from underneath
194 // during the life of PDO (note that drivers never unregister explicitly
195 // as there is no unregistration API, and the scenarios in which it can
196 // happen are given below). Therefore WDF needs to re-register the interface,
197 // otherwise driver may end up with an unregistered interface and fail to
198 // enable interface.
199 //
200 // Pnp can unregister the interface in following cases:
201 // 1. The driver is uninstalled, and re-installed
202 // In this case, the stack is torn down but the PDO is not
203 // deleted. Pnp deletes the interface registration, however WDF
204 // doesn't delete the interface structure because it is deleted as
205 // part of PDO deletion in destructor. When the driver is re-installed
206 // Pnp sends another query resource requirements irp and WDF needs to
207 // re-register at this time.
208 //
209 // 2. Pnp couldn't find a driver and loaded a NULL driver while
210 // waiting for reinstall to happen from WU. This is similar to case above
211 // except that the pnp activities are transparent to user.
212 // In this case, PDO was never started. However it did get
213 // the query resource requirements irp and therefore its interface
214 // was registered by WDF. Pnp deleted the interface registration
215 // when installing NULL driver. When pnp finally finds a driver from
216 // WU, it sends another query resource requirement irp. At this time,
217 // WDF needs to re-register.
218 //
219 // In both the above cases, WDF has to re-register (and free previous
220 // sym link) when query resource requirements irp arrives again. Note
221 // that Pnp doesn't delete the interface registration during disable,
222 // s/w surprise-removal, or resource rebalance. In case of resource
223 // rebalance, query resource requirement irp is sent after stop, and
224 // WDF will end up registering again even though pnp did not unregister
225 // the interface. This is fine because kernel API for registration
226 // allows multiple calls to register, and in case registration already
227 // exists it returns informational status (not error status)
228 // STATUS_OBJECT_NAME_EXISTS and also returns the same symbolic link.
229 //
230 //
231 // Free the symbolic link if already present
232 //
237 }
238
239 //
240 // Register. Note that if the interface was already registered, the
241 // call to IoRegisterDeviceInterface will return informational status
242 // (not error status) STATUS_OBJECT_NAME_EXISTS and also return the
243 // symbolic link.
244 //
247 );
248
249 if (!NT_SUCCESS(status)) {
252 "could not register device interface on PDO WDFDEVICE %p, "
253 "!devobj %p, failing IRP_MN_QUERY_RESOURCE_REQUIREMENTS %!STATUS!",
256 break;
257 }
258 }
259
261
262 if (!NT_SUCCESS(status)) {
264 }
265
266 //
267 // Driver writer is not interested in this callback, forgoe the allocation
268 // of the FxCollection and complete the request here.
269 //
272 }
273
274 pWdmRequirementsList = NULL;
275
276 //
277 // Create a collection which will be populated by the
278 // bus driver.
279 //
284 if (!NT_SUCCESS(status)) {
285 goto exit;
286 }
287
288 WDFIORESREQLIST reqlist;
289
290 //
291 // Get a handle to the collection that can be passed to the driver.
292 //
293 status = pIoResReqList->Commit(NULL, (PWDFOBJECT) &reqlist);
294
295 //
296 // We control the object's state, this should never fail
297 //
300
301 //
302 // Call the driver. The driver will populate the resource collection
303 // with a set of child collections which will contain each of the
304 // possible resource assignments.
305 //
307 m_Device->GetHandle(), reqlist);
308
309 if (NT_SUCCESS(status)) {
310 if (pIoResReqList->Count()) {
311 //
312 // Create a IO_RESOURCE_REQUIREMENTS_LIST based on the
313 // contents of our collection.
314 //
315 pWdmRequirementsList = pIoResReqList->CreateWdmList();
316
317 if (pWdmRequirementsList != NULL) {
318 Irp->SetInformation((ULONG_PTR) pWdmRequirementsList);
319 }
320 else {
322 }
323 }
324 else {
325 //
326 // The driver didn't add any resources, so we'll just
327 // ignore this request.
328 //
329 // Return the status that was passed in.
330 //
331 status = Irp->GetStatus();
332 }
333 }
334
336
337 exit:
339}
MdDeviceObject __inline GetPhysicalDevice(VOID)
Definition: fxdevice.hpp:228
UNICODE_STRING m_SymbolicLinkName
static FxDeviceInterface * _FromEntry(__in PSINGLE_LIST_ENTRY Entry)
_Must_inspect_result_ NTSTATUS Register(__in MdDeviceObject Pdo)
BOOLEAN m_PdoKnown
Definition: fxdevice.hpp:599
_Must_inspect_result_ PIO_RESOURCE_REQUIREMENTS_LIST CreateWdmList(VOID)
static _Must_inspect_result_ NTSTATUS _CreateAndInit(__in FxIoResReqList **ResourceReqList, __in PFX_DRIVER_GLOBALS FxDriverGlobals, __in_opt PWDF_OBJECT_ATTRIBUTES ListAttributes, __in UCHAR AccessFlags)
Definition: fxresource.hpp:646
virtual VOID DeleteObject(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)
Definition: fxobject.cpp:904
FxPnpDeviceResourceRequirementsQuery m_DeviceResourceRequirementsQuery
Definition: fxpkgpdo.hpp:49
SINGLE_LIST_ENTRY m_DeviceInterfaceHead
Definition: fxpkgpnp.hpp:4126
FxWaitLockInternal m_DeviceInterfaceLock
Definition: fxpkgpnp.hpp:4124
PFN_WDF_DEVICE_RESOURCE_REQUIREMENTS_QUERY m_Method
_Must_inspect_result_ NTSTATUS Invoke(__in WDFDEVICE Device, __in WDFIORESREQLIST Collection)
FxDeviceInterface * pDeviceInterface
PSINGLE_LIST_ENTRY ple
@ FxResourceAllAccessAllowed
Definition: fxresource.hpp:277
FxIoResReqList * pIoResReqList
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:317
#define exit(n)
Definition: config.h:202
Definition: ntbasedef.h:628
#define WDF_NO_OBJECT_ATTRIBUTES
Definition: wdftypes.h:105

◆ PnpQueryResources()

_Must_inspect_result_ NTSTATUS FxPkgPdo::PnpQueryResources ( __inout FxIrp Irp)
private

Definition at line 49 of file fxpkgpdokm.cpp.

70{
72 PCM_RESOURCE_LIST pWdmResourceList;
73 WDFCMRESLIST list;
75
76 //
77 // It is only necessary to create a collection if the caller is interested
78 // in this callback.
79 //
81 return CompletePnpRequest(Irp, Irp->GetStatus());
82 }
83
84 pWdmResourceList = NULL;
85
91 if (!NT_SUCCESS(status)) {
92 goto exit;
93 }
94
96
97 if (NT_SUCCESS(status)) {
100
101 if (NT_SUCCESS(status)) {
102 //
103 // Walk the resource collection and create the appropriate
104 // CM_RESOURCE_LIST.
105 //
106 if (pResList->Count()) {
107 pWdmResourceList = pResList->CreateWdmList();
108 }
109 else {
110 //
111 // The driver didn't add any resources, so we'll just
112 // ignore this Irp.
113 //
114 // Return that status that was passed in.
115 //
116 status = Irp->GetStatus();
117 pWdmResourceList = (PCM_RESOURCE_LIST) Irp->GetInformation();
118 }
119 }
120 }
121
123
124 exit:
125 Irp->SetInformation((ULONG_PTR) pWdmResourceList);
127}
static _Must_inspect_result_ NTSTATUS _CreateAndInit(__in FxCmResList **ResourceList, __in PFX_DRIVER_GLOBALS FxDriverGlobals, __in CfxDevice *Device, __in_opt PWDF_OBJECT_ATTRIBUTES ListAttributes, __in UCHAR AccessFlags)
Definition: fxresource.hpp:400
FxPnpDeviceResourcesQuery m_DeviceResourcesQuery
Definition: fxpkgpdo.hpp:48
PFN_WDF_DEVICE_RESOURCES_QUERY m_Method
_Must_inspect_result_ NTSTATUS Invoke(__in WDFDEVICE Device, __in WDFCMRESLIST Collection)
Definition: list.h:37
FxIoResList * pResList
struct _CM_RESOURCE_LIST * PCM_RESOURCE_LIST
#define list
Definition: rosglue.h:35

◆ PnpSendStartDeviceDownTheStackOverload()

BOOLEAN FxPkgPdo::PnpSendStartDeviceDownTheStackOverload ( VOID  )
privatevirtual

Implements FxPkgPnp.

Definition at line 1294 of file fxpkgpdo.cpp.

1312{
1313 //
1314 // We are successful so far, indicate this in the irp.
1315 //
1317
1318 return TRUE;
1319}

◆ PowerCheckDeviceTypeNPOverload()

WDF_DEVICE_POWER_STATE FxPkgPdo::PowerCheckDeviceTypeNPOverload ( VOID  )
privatevirtual

Implements FxPkgPnp.

Definition at line 310 of file pdopower.cpp.

326{
328}
@ WdfDevStatePowerCheckParentStateNP
Definition: wdfdevice.h:134

◆ PowerCheckDeviceTypeOverload()

WDF_DEVICE_POWER_STATE FxPkgPdo::PowerCheckDeviceTypeOverload ( VOID  )
privatevirtual

Implements FxPkgPnp.

Definition at line 289 of file pdopower.cpp.

305{
307}
@ WdfDevStatePowerCheckParentState
Definition: wdfdevice.h:133

◆ PowerCheckParentOverload()

_Must_inspect_result_ NTSTATUS FxPkgPdo::PowerCheckParentOverload ( __in BOOLEAN ParentOn)
privatevirtual

Definition at line 261 of file pdopower.cpp.

279{
280
281
282
283
284 return (m_Device->m_ParentDevice->m_PkgPnp)->
286}
_Must_inspect_result_ NTSTATUS PowerPolicyCanChildPowerUp(__out PBOOLEAN PowerUp)
Definition: fxpkgpnp.hpp:3686

◆ PowerDisableWakeAtBusOverload()

VOID FxPkgPdo::PowerDisableWakeAtBusOverload ( VOID  )
privatevirtual

Reimplemented from FxPkgPnp.

Definition at line 374 of file pdopower.cpp.

393{
397
399 }
400}
VOID PowerNotifyParentChildWakeDisarmed(VOID)
Definition: pdopower.cpp:459
FxPowerDeviceDisableWakeAtBus m_DeviceDisableWakeAtBus
Definition: fxpkgpdo.hpp:54
VOID Invoke(__in WDFDEVICE Device)

◆ PowerEnableWakeAtBusOverload()

_Must_inspect_result_ NTSTATUS FxPkgPdo::PowerEnableWakeAtBusOverload ( VOID  )
privatevirtual

Reimplemented from FxPkgPnp.

Definition at line 332 of file pdopower.cpp.

351{
353
354 //
355 // The EnableWakeAtBus callback should not be called twice in a row without
356 // an intermediate call to the DisableWakeAtBus callback.
357 //
359
363 );
364
365 if (NT_SUCCESS(status)) {
368 }
369
370 return status;
371}
FxPowerDeviceEnableWakeAtBus m_DeviceEnableWakeAtBus
Definition: fxpkgpdo.hpp:53
VOID PowerNotifyParentChildWakeArmed(VOID)
Definition: pdopower.cpp:426
_Must_inspect_result_ NTSTATUS Invoke(__in WDFDEVICE Device, __in SYSTEM_POWER_STATE PowerState)

◆ PowerNotifyParentChildWakeArmed()

VOID FxPkgPdo::PowerNotifyParentChildWakeArmed ( VOID  )
private

Definition at line 426 of file pdopower.cpp.

442{
444
446
447
448
449
450
453 if (settings != NULL) {
454 settings->IncrementChildrenArmedForWakeCount();
455 }
456}
struct mke2fs_defaults settings[]

Referenced by PowerEnableWakeAtBusOverload().

◆ PowerNotifyParentChildWakeDisarmed()

VOID FxPkgPdo::PowerNotifyParentChildWakeDisarmed ( VOID  )
private

Definition at line 459 of file pdopower.cpp.

475{
477
479
480
481
482
483
486 if (settings != NULL) {
487 settings->DecrementChildrenArmedForWakeCount();
488 }
489}

Referenced by PowerDisableWakeAtBusOverload().

◆ PowerParentPowerDereference()

VOID FxPkgPdo::PowerParentPowerDereference ( VOID  )
privatevirtual

Implements FxPkgPnp.

Definition at line 403 of file pdopower.cpp.

420{
421
423}
VOID PowerPolicyChildPoweredDown(VOID)
Definition: fxpkgpnp.hpp:3746

◆ PowerReleasePendingDeviceIrp()

VOID FxPkgPdo::PowerReleasePendingDeviceIrp ( __in BOOLEAN  IrpMustBePresent = TRUE)
privatevirtual

Definition at line 241 of file pdopower.cpp.

244{
245 MdIrp pIrp;
246
248
249 UNREFERENCED_PARAMETER(IrpMustBePresent);
250 ASSERT(IrpMustBePresent == FALSE || pIrp != NULL);
251
252 if (pIrp != NULL) {
253 FxIrp irp(pIrp);
254
256 }
257}
MdIrp ClearPendingDevicePowerIrp(VOID)
Definition: fxpkgpnp.hpp:3069
FxIrp * pIrp

◆ ProcessRemoveDeviceOverload()

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

Definition at line 1753 of file fxpkgpdo.cpp.

1756{
1757 if (m_CanBeDeleted) {
1758 //
1759 // After this is called, any irp dispatched to FxDevice::DispatchWithLock
1760 // will fail with STATUS_INVALID_DEVICE_REQUEST.
1761 //
1762
1763
1764
1765
1766
1767
1768
1771 Irp->GetIrp()
1772 );
1773
1774 //
1775 // Cleanup the state machines and release the power thread.
1776 //
1778
1779 //
1780 // Detach and delete the device object.
1781 //
1782 DeleteDevice();
1783
1784 //
1785 // Can't call CompletePnpRequest because we just released the tag in
1786 // IoReleaseRemoveLockAndWait above.
1787 //
1788 Irp->CompleteRequest(IO_NO_INCREMENT);
1789
1790 return STATUS_SUCCESS;
1791 }
1792 else {
1793 //
1794 // This was a PDO which was not reported missing, so do not free the
1795 // memory and clear out our stack local address.
1796 //
1798 return CompletePnpRequest(Irp, Irp->GetStatus());
1799 }
1800}
MdRemoveLock GetRemoveLock(VOID)
Definition: fxdevicekm.hpp:47
MxEvent * m_DeviceRemoveProcessed
Definition: fxpkgpnp.hpp:4172
VOID CleanupStateMachines(__in BOOLEAN ClenaupPnp)
Definition: fxpkgpnp.cpp:2066
VOID DeleteDevice(VOID)
Definition: fxpkgpnp.cpp:2249
static __inline VOID MxReleaseRemoveLockAndWait(__in MdRemoveLock RemoveLock, __in PVOID Tag)
Definition: mxgeneralkm.h:288
#define IO_NO_INCREMENT
Definition: iotypes.h:598

◆ QueryForPowerThread()

_Must_inspect_result_ NTSTATUS FxPkgPdo::QueryForPowerThread ( VOID  )
privatevirtual

Implements FxPkgPnp.

Definition at line 1804 of file fxpkgpdo.cpp.

1820{
1821 return CreatePowerThread();
1822}
_Must_inspect_result_ NTSTATUS CreatePowerThread(VOID)
Definition: fxpkgpnp.cpp:5125

◆ QueryForReenumerationInterface()

virtual VOID FxPkgPdo::QueryForReenumerationInterface ( VOID  )
inlineprivatevirtual

Implements FxPkgPnp.

Definition at line 522 of file fxpkgpdo.hpp.

525 {
526 //
527 // As the PDO, we already have the interface built in
528 //
529 DO_NOTHING();
530 }

◆ RegisterCallbacks()

VOID FxPkgPdo::RegisterCallbacks ( __in PWDF_PDO_EVENT_CALLBACKS  DispatchTable)

Definition at line 1576 of file fxpkgpdo.cpp.

1579{
1580 m_DeviceResourcesQuery.m_Method = DispatchTable->EvtDeviceResourcesQuery;
1581 m_DeviceResourceRequirementsQuery.m_Method = DispatchTable->EvtDeviceResourceRequirementsQuery;
1582 m_DeviceEject.m_Method = DispatchTable->EvtDeviceEject;
1583 m_DeviceSetLock.m_Method = DispatchTable->EvtDeviceSetLock;
1584
1585 m_DeviceEnableWakeAtBus.m_Method = DispatchTable->EvtDeviceEnableWakeAtBus;
1586 m_DeviceDisableWakeAtBus.m_Method = DispatchTable->EvtDeviceDisableWakeAtBus;
1587
1588 //
1589 // this callback was added in V1.11
1590 //
1591 if (DispatchTable->Size > sizeof(WDF_PDO_EVENT_CALLBACKS_V1_9)) {
1592 m_DeviceReportedMissing.m_Method = DispatchTable->EvtDeviceReportedMissing;
1593 }
1594}
FxPnpDeviceSetLock m_DeviceSetLock
Definition: fxpkgpdo.hpp:51
FxPnpDeviceReportedMissing m_DeviceReportedMissing
Definition: fxpkgpdo.hpp:57
PFN_WDF_DEVICE_EJECT m_Method
PFN_WDF_DEVICE_REPORTED_MISSING m_Method
PFN_WDF_DEVICE_SET_LOCK m_Method
PFN_WDF_DEVICE_DISABLE_WAKE_AT_BUS m_Method
PFN_WDF_DEVICE_ENABLE_WAKE_AT_BUS m_Method
_In_ PWDFDEVICE_INIT _In_ PWDF_PDO_EVENT_CALLBACKS DispatchTable
Definition: wdfpdo.h:248

Referenced by FxDevice::PdoInitialize().

◆ ReleaseReenumerationInterface()

virtual VOID FxPkgPdo::ReleaseReenumerationInterface ( VOID  )
inlineprivatevirtual

Implements FxPkgPnp.

Definition at line 534 of file fxpkgpdo.hpp.

537 {
538 //
539 // As the PDO, we already have the interface built in
540 //
541 DO_NOTHING();
542 }

◆ RemoveEjectionDevice()

VOID FxPkgPdo::RemoveEjectionDevice ( __in MdDeviceObject  DependentDevice)

Definition at line 1890 of file fxpkgpdo.cpp.

1893{
1894 if (m_EjectionDeviceList != NULL) {
1896 }
1897
1898 //
1899 // EjectRelations are queried automatically by PnP when the device is
1900 // going to be ejected. No need to tell pnp that the list changed
1901 // until it needs to query for it.
1902 //
1903}

◆ SendIrpSynchronously()

_Must_inspect_result_ NTSTATUS FxPkgPdo::SendIrpSynchronously ( __in FxIrp Irp)
privatevirtual

Definition at line 361 of file fxpkgpdo.cpp.

378{
379 return Irp->GetStatus();
380}

Member Data Documentation

◆ m_AddedToStaticList

BOOLEAN FxPkgPdo::m_AddedToStaticList

Definition at line 63 of file fxpkgpdo.hpp.

Referenced by FxChildList::Add(), FxDevice::DeleteObject(), and FxPkgPdo().

◆ m_AllowForwardRequestToParent

BOOLEAN FxPkgPdo::m_AllowForwardRequestToParent

Definition at line 69 of file fxpkgpdo.hpp.

Referenced by IsForwardRequestToParentEnabled(), and FxDevice::PdoInitialize().

◆ m_CanBeDeleted

BOOLEAN FxPkgPdo::m_CanBeDeleted
protected

Definition at line 123 of file fxpkgpdo.hpp.

Referenced by FxPkgPdo(), PnpEventPdoRemovedOverload(), and ProcessRemoveDeviceOverload().

◆ m_CompatibleIDs

PWSTR FxPkgPdo::m_CompatibleIDs
protected

Definition at line 98 of file fxpkgpdo.hpp.

Referenced by _PnpQueryId(), FxPkgPdo(), and Initialize().

◆ m_ContainerID

PWSTR FxPkgPdo::m_ContainerID
protected

Definition at line 105 of file fxpkgpdo.hpp.

Referenced by _PnpQueryId(), FxPkgPdo(), and Initialize().

◆ m_DefaultLocale

LCID FxPkgPdo::m_DefaultLocale

Definition at line 38 of file fxpkgpdo.hpp.

Referenced by _PnpQueryDeviceText(), and FinishInitialize().

◆ m_Description

◆ m_DeviceDisableWakeAtBus

FxPowerDeviceDisableWakeAtBus FxPkgPdo::m_DeviceDisableWakeAtBus

Definition at line 54 of file fxpkgpdo.hpp.

Referenced by PowerDisableWakeAtBusOverload(), and RegisterCallbacks().

◆ m_DeviceEject

FxPnpDeviceEject FxPkgPdo::m_DeviceEject

Definition at line 50 of file fxpkgpdo.hpp.

Referenced by PnpEventEjectHardwareOverload(), and RegisterCallbacks().

◆ m_DeviceEjectProcessed

MxEvent* FxPkgPdo::m_DeviceEjectProcessed
protected

Definition at line 121 of file fxpkgpdo.hpp.

Referenced by _PnpEject(), FxPkgPdo(), and PnpEventEjectHardwareOverload().

◆ m_DeviceEnableWakeAtBus

FxPowerDeviceEnableWakeAtBus FxPkgPdo::m_DeviceEnableWakeAtBus

Definition at line 53 of file fxpkgpdo.hpp.

Referenced by PowerEnableWakeAtBusOverload(), and RegisterCallbacks().

◆ m_DeviceID

PWSTR FxPkgPdo::m_DeviceID
protected

Definition at line 77 of file fxpkgpdo.hpp.

Referenced by _PnpQueryId(), FxPkgPdo(), and Initialize().

◆ m_DeviceReportedMissing

FxPnpDeviceReportedMissing FxPkgPdo::m_DeviceReportedMissing

Definition at line 57 of file fxpkgpdo.hpp.

Referenced by RegisterCallbacks().

◆ m_DeviceResourceRequirementsQuery

FxPnpDeviceResourceRequirementsQuery FxPkgPdo::m_DeviceResourceRequirementsQuery

Definition at line 49 of file fxpkgpdo.hpp.

Referenced by PnpQueryResourceRequirements(), and RegisterCallbacks().

◆ m_DeviceResourcesQuery

FxPnpDeviceResourcesQuery FxPkgPdo::m_DeviceResourcesQuery

Definition at line 48 of file fxpkgpdo.hpp.

Referenced by PnpQueryResources(), and RegisterCallbacks().

◆ m_DeviceSetLock

FxPnpDeviceSetLock FxPkgPdo::m_DeviceSetLock

Definition at line 51 of file fxpkgpdo.hpp.

Referenced by RegisterCallbacks().

◆ m_DeviceTextHead

SINGLE_LIST_ENTRY FxPkgPdo::m_DeviceTextHead

Definition at line 37 of file fxpkgpdo.hpp.

Referenced by _PnpQueryDeviceText(), FinishInitialize(), FxPkgPdo(), and ~FxPkgPdo().

◆ m_EjectionDeviceList

FxRelatedDeviceList* FxPkgPdo::m_EjectionDeviceList
protected

◆ m_EnableWakeAtBusInvoked

BOOLEAN FxPkgPdo::m_EnableWakeAtBusInvoked
protected

◆ m_HardwareIDs

PWSTR FxPkgPdo::m_HardwareIDs
protected

Definition at line 91 of file fxpkgpdo.hpp.

Referenced by _PnpQueryId(), FxPkgPdo(), and Initialize().

◆ m_IDsAllocation

PWSTR FxPkgPdo::m_IDsAllocation
protected

Definition at line 111 of file fxpkgpdo.hpp.

Referenced by FxPkgPdo(), Initialize(), and ~FxPkgPdo().

◆ m_InstanceID

PWSTR FxPkgPdo::m_InstanceID
protected

Definition at line 84 of file fxpkgpdo.hpp.

Referenced by _PnpQueryId(), FxPkgPdo(), and Initialize().

◆ m_OwningChildList

FxChildList* FxPkgPdo::m_OwningChildList

Definition at line 42 of file fxpkgpdo.hpp.

Referenced by FxPkgPdo(), if(), Initialize(), and ~FxPkgPdo().

◆ m_PdoPnpFunctionTable

const PFN_PNP_POWER_CALLBACK FxPkgPdo::m_PdoPnpFunctionTable
staticprivate
Initial value:
=
{
}
static _Must_inspect_result_ NTSTATUS _PnpFilterResourceRequirements(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgpdokm.cpp:343
static _Must_inspect_result_ NTSTATUS _PnpQueryResourceRequirements(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgpdokm.cpp:131
static _Must_inspect_result_ NTSTATUS _PnpSurpriseRemoval(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgpdo.cpp:1561
static _Must_inspect_result_ NTSTATUS _PnpQueryResources(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgpdokm.cpp:39
static _Must_inspect_result_ NTSTATUS _PnpQueryDeviceText(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgpdo.cpp:858
static _Must_inspect_result_ NTSTATUS _PnpEject(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgpdo.cpp:968
static _Must_inspect_result_ NTSTATUS _PnpQueryPnpDeviceState(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgpdo.cpp:1483
static _Must_inspect_result_ NTSTATUS _PnpQueryInterface(IN FxPkgPnp *This, IN FxIrp *Irp)
Definition: fxpkgpdo.cpp:522
static _Must_inspect_result_ NTSTATUS _PnpSetLock(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgpdo.cpp:1323
static _Must_inspect_result_ NTSTATUS _PnpQueryBusInformation(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgpdo.cpp:1529
static _Must_inspect_result_ NTSTATUS _PnpQueryDeviceRelations(__in FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgpdo.cpp:424
static _Must_inspect_result_ NTSTATUS _PnpQueryCapabilities(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgpdo.cpp:551
static _Must_inspect_result_ NTSTATUS _PnpCompleteIrp(__in FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgpdo.cpp:414
static _Must_inspect_result_ NTSTATUS _PnpQueryId(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgpdo.cpp:1359
static _Must_inspect_result_ NTSTATUS _PnpCancelRemoveDevice(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgpnp.cpp:2026
static _Must_inspect_result_ NTSTATUS _PnpRemoveDevice(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgpnp.cpp:2275
static _Must_inspect_result_ NTSTATUS _PnpQueryRemoveDevice(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgpnp.cpp:1981
static _Must_inspect_result_ NTSTATUS _PnpCancelStopDevice(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgpnp.cpp:1901
static _Must_inspect_result_ NTSTATUS _PnpStopDevice(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgpnp.cpp:1945
static _Must_inspect_result_ NTSTATUS _PnpQueryStopDevice(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgpnp.cpp:1850
static _Must_inspect_result_ NTSTATUS _PnpStartDevice(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgpnp.cpp:1823
static _Must_inspect_result_ NTSTATUS _PnpDeviceUsageNotification(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgpnp.cpp:3857

Definition at line 147 of file fxpkgpdo.hpp.

Referenced by GetDispatchPnp().

◆ m_PdoPowerFunctionTable

const PFN_PNP_POWER_CALLBACK FxPkgPdo::m_PdoPowerFunctionTable
staticprivate
Initial value:
=
{
}
static _Must_inspect_result_ NTSTATUS _DispatchSetPower(__inout FxPkgPnp *This, __in FxIrp *Irp)
Definition: pdopower.cpp:63
static _Must_inspect_result_ NTSTATUS _DispatchQueryPower(__inout FxPkgPnp *This, __in FxIrp *Irp)
Definition: pdopower.cpp:201
static _Must_inspect_result_ NTSTATUS _DispatchPowerSequence(__inout FxPkgPnp *This, __in FxIrp *Irp)
Definition: pdopower.cpp:39
static _Must_inspect_result_ NTSTATUS _DispatchWaitWake(__inout FxPkgPnp *This, __inout FxIrp *Irp)
Definition: fxpkgpnp.cpp:2400

Definition at line 152 of file fxpkgpdo.hpp.

Referenced by GetDispatchPower().

◆ m_RawOK

BOOLEAN FxPkgPdo::m_RawOK

Definition at line 59 of file fxpkgpdo.hpp.

Referenced by FxPkgPdo(), HandleQueryCapabilities(), and FxDevice::PdoInitialize().

◆ m_Static


The documentation for this class was generated from the following files: