24#include "../pnppriv.hpp"
27#if defined(EVENT_TRACING)
28#include "supportKM.tmh"
39 stack =
Irp->GetCurrentIrpStackLocation();
43 PowerThreadInterface->Interface.Size);
69 DeviceInStack->SetObject(DeviceInStack->GetAttachedDeviceReference());
70 if (DeviceInStack->GetObject() ==
NULL) {
103 "Failed to get DEVICE_CAPABILITIES from !devobj %p, %!STATUS!",
104 DeviceInStack->GetObject(),
status);
130 (D3ColdInterface->GetIdleWakeInfo !=
NULL) &&
149 status = D3ColdInterface->GetIdleWakeInfo(
150 D3ColdInterface->Context,
152 &deepestWakeableDstate
156 Capabilities->DeepestWakeableDstate[
i] = deepestWakeableDstate;
164 if (DeviceInStack->GetObject() !=
NULL) {
165 DeviceInStack->DereferenceObject();
182 if (D3ColdInterface->SetD3ColdSupport !=
NULL) {
183 D3ColdInterface->SetD3ColdSupport(D3ColdInterface->Context, UseD3Cold);
233 if (Workitem->GetWorkItem() !=
NULL) {
236 param.RelatedDevice = RelatedDevice;
237 param.RelatedIrp = RelatedIrp;
239 param.Revert = Revert;
249 param.Event.EnterCRAndWaitAndLeave();
274 relatedTopOfStack.
SetObject(RelatedDevice->GetAttachedDeviceReference());
284 RelatedIrp->SetParameterUsageNotificationInPath(
285 !RelatedIrp->GetNextStackParameterUsageNotificationInPath());
290 status = RelatedIrp->SendIrpSynchronously(relatedTopOfStack.
GetObject());
__inline MdDriverObject GetDriverObject(VOID)
CHECK_RETURN_IF_USER_MODE NTSTATUS SendIrpSynchronously(__in MdDeviceObject DeviceObject)
VOID SetMinorFunction(__in UCHAR MinorFunction)
static _Must_inspect_result_ MdIrp AllocateIrp(_In_ CCHAR StackSize, _In_opt_ FxDevice *Device=NULL)
VOID ClearNextStack(VOID)
VOID SetMajorFunction(__in UCHAR MajorFunction)
VOID SetStatus(__in NTSTATUS Status)
VOID SetParameterDeviceCapabilities(__in PDEVICE_CAPABILITIES DeviceCapabilities)
static BOOLEAN _SystemManagedIdleTimeoutAvailable(VOID)
__inline VOID SetObject(__in_opt MdDeviceObject DeviceObject)
__inline MdDeviceObject GetObject(VOID)
_In_ PTRANSFER_PACKET _In_ ULONG _In_ PIRP OriginalIrp
#define STATUS_NOT_SUPPORTED
#define NT_SUCCESS(StatCode)
DoTraceLevelMessage(pFxDriverGlobals, TRACE_LEVEL_VERBOSE, TRACINGPNP, "Enter, WDFDEVICE %p", Device)
PFX_DRIVER_GLOBALS fxDriverGlobals
__inline PFX_DRIVER_GLOBALS GetFxDriverGlobals(__in PWDF_DRIVER_GLOBALS DriverGlobals)
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
_Must_inspect_result_ typedef _Out_ PHIDP_CAPS Capabilities
#define _Must_inspect_result_
#define UNREFERENCED_PARAMETER(P)
#define ARGUMENT_PRESENT(ArgumentPointer)
enum _SYSTEM_POWER_STATE SYSTEM_POWER_STATE
IO_WORKITEM_ROUTINE _DeviceUsageNotificationWorkItem
FxLibraryGlobalsType FxLibraryGlobals
#define TRACE_LEVEL_ERROR
PFN_POX_REGISTER_DEVICE PoxRegisterDevice
NTSTATUS SendDeviceUsageNotificationWorker(__in MxDeviceObject *RelatedDevice, __inout FxIrp *RelatedIrp, __in FxIrp *OriginalIrp, __in BOOLEAN Revert)
_Must_inspect_result_ NTSTATUS GetStackCapabilities(__in PFX_DRIVER_GLOBALS DriverGlobals, __in MxDeviceObject *DeviceInStack, __in_opt PD3COLD_SUPPORT_INTERFACE D3ColdInterface, __out PSTACK_DEVICE_CAPABILITIES Capabilities)
VOID CopyQueryInterfaceToIrpStack(__in PPOWER_THREAD_INTERFACE PowerThreadInterface, __in FxIrp *Irp)
VOID SetD3ColdSupport(__in PFX_DRIVER_GLOBALS DriverGlobals, __in MxDeviceObject *DeviceInStack, __in PD3COLD_SUPPORT_INTERFACE D3ColdInterface, __in BOOLEAN UseD3Cold)
_Must_inspect_result_ NTSTATUS SendDeviceUsageNotification(__in MxDeviceObject *RelatedDevice, __inout FxIrp *RelatedIrp, __in MxWorkItem *Workitem, __in FxIrp *OriginalIrp, __in BOOLEAN Revert)
PVOID GetIoMgrObjectForWorkItemAllocation(VOID)
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define STATUS_INSUFFICIENT_RESOURCES
_In_ PDEVICE_OBJECT DeviceObject
PWDF_DRIVER_GLOBALS WdfDriverGlobals
enum _DEVICE_WAKE_DEPTH DEVICE_WAKE_DEPTH
#define IRP_MN_QUERY_CAPABILITIES