ReactOS 0.4.16-dev-257-g6aa11ac
fxdevicepdoapi.cpp File Reference
#include "fxcorepch.hpp"
Include dependency graph for fxdevicepdoapi.cpp:

Go to the source code of this file.

Functions

NTSTATUS GetPdoPackageFromDeviceHandle (__in IN PFX_DRIVER_GLOBALS CallersGlobals, __in WDFDEVICE Device, __in PCHAR FunctionName, __out FxPkgPdo **Package, __out PFX_DRIVER_GLOBALS *ObjectGlobals, __out_opt FxDevice **OutDevice=NULL)
 
_Must_inspect_result_ __drv_maxIRQL (DISPATCH_LEVEL) NTSTATUS STDCALL WDFEXPORT(WdfPdoMarkMissing)(__in PWDF_DRIVER_GLOBALS DriverGlobals
 
 if (NT_SUCCESS(status))
 
 FxVerifierDbgBreakPoint (pFxDriverGlobals)
 
 FxPointerNotNull (pFxDriverGlobals, IdentificationDescription)
 
 FxPointerNotNull (pFxDriverGlobals, AddressDescription)
 
 FxPointerNotNull (pFxDriverGlobals, PhysicalDevice)
 
 if (!NT_SUCCESS(status))
 
pPkgPdo RemoveEjectionDevice (PhysicalDevice)
 
pPkgPdo ClearEjectionDevicesList ()
 

Variables

_Must_inspect_result_ __in WDFDEVICE Device
 
NTSTATUS status
 
FxPkgPdopPkgPdo
 
FxDevicepDevice
 
PFX_DRIVER_GLOBALS pFxDriverGlobals
 
 else
 
return NULL
 
_Must_inspect_result_ __in WDFDEVICE __inout PWDF_CHILD_IDENTIFICATION_DESCRIPTION_HEADER IdentificationDescription
 
_Must_inspect_result_ __in WDFDEVICE __inout PWDF_CHILD_ADDRESS_DESCRIPTION_HEADER AddressDescription
 
_Must_inspect_result_ __in WDFDEVICE __in PDEVICE_OBJECT PhysicalDevice
 

Function Documentation

◆ __drv_maxIRQL()

◆ ClearEjectionDevicesList()

pPkgPdo ClearEjectionDevicesList ( )

◆ FxPointerNotNull() [1/3]

FxPointerNotNull ( pFxDriverGlobals  ,
AddressDescription   
)

◆ FxPointerNotNull() [2/3]

FxPointerNotNull ( pFxDriverGlobals  ,
IdentificationDescription   
)

◆ FxPointerNotNull() [3/3]

FxPointerNotNull ( pFxDriverGlobals  ,
PhysicalDevice   
)

◆ FxVerifierDbgBreakPoint()

FxVerifierDbgBreakPoint ( pFxDriverGlobals  )

Referenced by __drv_maxIRQL(), __drv_when(), FxFileObject::_CreateFileObject(), FxFileObject::_DestroyFileObject(), FxObject::_GetEffectiveLock(), FxFileObject::_GetFileObjectFromWdm(), _Requires_lock_held_(), _Requires_lock_not_held_(), FxDevice::_ValidateOpenKeyParams(), FxPkgGeneral::AcquireRemoveLockForClose(), FxResourceCollection::AddAt(), FxCommonBuffer::AllocateCommonBuffer(), FxDmaEnabler::AllocateCommonBuffer(), WDFDEVICE_INIT::AssignIoType(), FxInterrupt::AssignResources(), FxCallbackLock::CheckOwnership(), IdleTimeoutManagement::CommitPowerFrameworkSettings(), FxRequest::CompleteInternal(), FxPkgGeneral::ConfigureConstraints(), FxPkgGeneral::ConfigureFileObjectClass(), FxPkgGeneral::ConfigureForwarding(), FxPkgIo::ConfigureForwarding(), FxDmaEnabler::ConfigureSystemAdapter(), FxRequest::CopyCompletionParams(), IFxMemory::CopyFromPtr(), FxChildList::CreateDevice(), FxPkgIo::DispatchStep1(), FxDmaTransactionBase::DmaCompleted(), FxVerifierLock::DumpDetails(), FxWorkItem::Enqueue(), FxPkgIo::EnqueueRequest(), FxSystemWorkItem::EnqueueWorker(), FxDevice::FdoInitialize(), FxPkgIo::FlushAllQueuesByFileObject(), FxTimer::FlushAndRundown(), FxWorkItem::FlushAndWait(), FxRequestBase::FreeMdls(), IdleTimeoutManagement::FreezeIdleTimeoutManagementStatus(), FX_VF_METHOD(), FxMdlDump(), FxMdlFreeDebug(), FxPoolAllocator(), FxPoolDump(), FxValiateCx(), FxDevice::FxValidateInterfacePropertyData(), FxVerifyLogHeader(), FxUsbInterface::GetConfiguredSettingIndex(), FxRequest::GetMdl(), FxRequest::GetMemoryObject(), FxVerifierLock::GetThreadTableEntry(), FxIoTarget::GotoPurgeState(), FxUsbPipe::GotoPurgeState(), FxUsbPipe::GotoRemoveState(), FxIoTarget::GotoStartState(), FxUsbPipe::GotoStopState(), if(), FxRequest::Impersonate(), FxDmaEnabler::Initialize(), FxDmaScatterGatherTransaction::InitializeResources(), FxPowerIdleMachine::IoDecrement(), FxIoQueue::PeekRequest(), FxPkgPdo::PnpEventEjectHardwareOverload(), FxPkgPnp::PnpEventQueryRemoveAskDriver(), FxPkgPnp::PnpEventQueryStopAskDriver(), FxPkgPnp::PnpReleaseHardware(), FxPkgPnp::PowerPolicySetS0IdleSettings(), FxRequest::ProbeAndLockForRead(), FxRequest::ProbeAndLockForWrite(), FxIoQueue::ReadyNotify(), FxRequest::ReleaseIrpReference(), FxVerifierLock::ReleaseOrReplaceThreadTableEntry(), FxResourceCollection::RemoveAndDelete(), FxRequest::RemoveFromIrpQueue(), FxInterrupt::ReportActive(), FxInterrupt::ReportInactive(), FxIoQueue::Requeue(), FxRequest::Reuse(), FxIoTargetSelf::Send(), FxRequest::SetCompletionState(), FxPkgIo::SetFilter(), FxDmaTransactionBase::SetImmediateExecution(), FxInterrupt::SetPolicy(), FxIoQueue::SetState(), FxTimer::Start(), FxDmaPacketTransaction::StartTransfer(), FxTimer::Stop(), switch(), FxDmaPacketTransaction::TransferCompleted(), FxVerifierLock::Unlock(), FxTagTracker::UpdateTagHistory(), IdleTimeoutManagement::UseSystemManagedIdleTimeout(), FxPkgPnp::ValidateCmResource(), FxPkgPnp::ValidateInterruptResourceCm(), VerifyWdfDeviceWdmDispatchIrp(), VerifyWdfDeviceWdmDispatchIrpToIoQueue(), FxDpc::~FxDpc(), FxInterrupt::~FxInterrupt(), FxSystemWorkItem::~FxSystemWorkItem(), FxTimer::~FxTimer(), FxVerifierLock::~FxVerifierLock(), and FxWorkItem::~FxWorkItem().

◆ GetPdoPackageFromDeviceHandle()

NTSTATUS GetPdoPackageFromDeviceHandle ( __in IN PFX_DRIVER_GLOBALS  CallersGlobals,
__in WDFDEVICE  Device,
__in PCHAR  FunctionName,
__out FxPkgPdo **  Package,
__out PFX_DRIVER_GLOBALS ObjectGlobals,
__out_opt FxDevice **  OutDevice = NULL 
)

Definition at line 32 of file fxdevicepdoapi.cpp.

46{
49
50 FxObjectHandleGetPtrAndGlobals(CallersGlobals,
51 Device,
53 (PVOID*) &pDevice,
54 ObjectGlobals);
55
56 //
57 // If the optional "OutDevice" argument is present, return the pointer
58 // to the device.
59 //
60 if (OutDevice != NULL) {
61 *OutDevice = pDevice;
62 }
63
64 //
65 // Check to see if a PDO package is installed on the device.
66 //
67 if (pDevice->IsPdo()) {
68 *Package = (FxPkgPdo *) pDevice->GetPdoPkg();
70 }
71 else {
73 "%s: Incorrect device handle supplied (0x%p). "
74 "Device is not a PDO.", FunctionName, Device);
75
77 }
78
79 return status;
80}
ACPI_BUFFER *RetBuffer ACPI_BUFFER *RetBuffer char ACPI_WALK_RESOURCE_CALLBACK void *Context ACPI_BUFFER *RetBuffer UINT16 ACPI_RESOURCE **ResourcePtr ACPI_GENERIC_ADDRESS *Reg UINT32 *ReturnValue UINT8 UINT8 *Slp_TypB ACPI_PHYSICAL_ADDRESS PhysicalAddress64 UINT32 UINT32 *TimeElapsed UINT32 ACPI_STATUS const char UINT32 ACPI_STATUS const char UINT32 const char * FunctionName
Definition: acpixf.h:1279
LONG NTSTATUS
Definition: precomp.h:26
__inline BOOLEAN IsPdo(VOID)
Definition: fxdevice.hpp:1245
__inline FxPkgPdo * GetPdoPkg(VOID)
Definition: fxdevice.hpp:1254
#define TRACINGDEVICE
Definition: dbgtrace.h:58
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
FxObjectHandleGetPtrAndGlobals(GetFxDriverGlobals(DriverGlobals), Device, FX_TYPE_DEVICE,(PVOID *)&pDevice, &pFxDriverGlobals)
NTSTATUS status
return NULL
FxDevice * pDevice
@ FX_TYPE_DEVICE
Definition: fxtypes.h:47
#define STATUS_SUCCESS
Definition: shellext.h:65
#define TRACE_LEVEL_ERROR
Definition: storswtr.h:27
Definition: ps.c:97
#define STATUS_INVALID_PARAMETER
Definition: udferr_usr.h:135
_Must_inspect_result_ _In_ WDFDEVICE Device
Definition: wdfchildlist.h:474

◆ if() [1/2]

if ( NT_SUCCESSstatus)

Definition at line 402 of file fxdevicepdoapi.cpp.

402 {
403 return status;
404 }

◆ if() [2/2]

if ( NT_SUCCESS(status )

Definition at line 110 of file fxdevicepdoapi.cpp.

110 {
111 //
112 // Check to see if the device is enumerated off of a child list. If so,
113 // have the child list object perform any necessary actions.
114 //
116 }
_Must_inspect_result_ NTSTATUS UpdateDeviceAsMissing(__in CfxDevice *Device)
FxChildList * m_OwningChildList
Definition: fxpkgpdo.hpp:42
FxPkgPdo * pPkgPdo

◆ RemoveEjectionDevice()

pPkgPdo RemoveEjectionDevice ( PhysicalDevice  )

Variable Documentation

◆ AddressDescription

◆ Device

__in WDFDEVICE Device
Initial value:

Definition at line 95 of file fxdevicepdoapi.cpp.

◆ else

else
Initial value:

Definition at line 159 of file fxdevicepdoapi.cpp.

◆ IdentificationDescription

◆ NULL

return NULL

Definition at line 195 of file fxdevicepdoapi.cpp.

Referenced by GetPdoPackageFromDeviceHandle().

◆ pDevice

FxDevice* pDevice

Definition at line 101 of file fxdevicepdoapi.cpp.

Referenced by GetPdoPackageFromDeviceHandle(), and if().

◆ pFxDriverGlobals

PFX_DRIVER_GLOBALS pFxDriverGlobals

Definition at line 135 of file fxdevicepdoapi.cpp.

◆ PhysicalDevice

Initial value:

Definition at line 370 of file fxdevicepdoapi.cpp.

◆ pPkgPdo

◆ status

Initial value:
#define __FUNCTION__
Definition: types.h:116
NTSTATUS GetPdoPackageFromDeviceHandle(__in IN PFX_DRIVER_GLOBALS CallersGlobals, __in WDFDEVICE Device, __in PCHAR FunctionName, __out FxPkgPdo **Package, __out PFX_DRIVER_GLOBALS *ObjectGlobals, __out_opt FxDevice **OutDevice=NULL)
DriverGlobals
__inline PFX_DRIVER_GLOBALS GetFxDriverGlobals(__in PWDF_DRIVER_GLOBALS DriverGlobals)
Definition: fxglobals.h:597
char * PCHAR
Definition: typedefs.h:51

Definition at line 99 of file fxdevicepdoapi.cpp.

Referenced by GetPdoPackageFromDeviceHandle(), and if().