25 DPRINT(
"FDO %s IRP:0x%p %s %s\n",
35 DPRINT(
"PDO %s IRP:0x%p %s %s\n",
63 powerType =
stack->Parameters.Power.Type;
64 powerState =
stack->Parameters.Power.State;
68 DPRINT(
"\tRequest to set %s state to %s\n",
97 oldPowerState =
Data->Common.SystemPowerState;
101 DPRINT1(
"Failed to enter sleep state %d (Status 0x%X)\n",
102 AcpiState, AcpiStatus);
103 Data->Common.SystemPowerState = oldPowerState;
128 powerType =
stack->Parameters.Power.Type;
129 powerState =
stack->Parameters.Power.State;
131 switch (
stack->MinorFunction) {
134 DPRINT(
"\tSetting %s power state to %s\n",
221#if !defined(NDEBUG) || defined(_MSC_VER)
231 return "IRP_MN_SET_POWER";
233 return "IRP_MN_QUERY_POWER";
235 return "IRP_MN_POWER_SEQUENCE";
237 return "IRP_MN_WAIT_WAKE";
240 return "unknown_power_irp";
252 return "PowerSystemUnspecified";
254 return "PowerSystemWorking";
256 return "PowerSystemSleeping1";
258 return "PowerSystemSleeping2";
260 return "PowerSystemSleeping3";
262 return "PowerSystemHibernate";
264 return "PowerSystemShutdown";
266 return "PowerSystemMaximum";
268 return "UnKnown System Power State";
280 return "PowerDeviceUnspecified";
282 return "PowerDeviceD0";
284 return "PowerDeviceD1";
286 return "PowerDeviceD2";
288 return "PowerDeviceD3";
290 return "PowerDeviceMaximum";
292 return "UnKnown Device Power State";
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
struct _COMMON_DEVICE_DATA * PCOMMON_DEVICE_DATA
PCHAR DbgSystemPowerString(SYSTEM_POWER_STATE Type)
PCHAR DbgDevicePowerString(DEVICE_POWER_STATE Type)
#define ACPI_STATE_UNKNOWN
#define STATUS_NOT_SUPPORTED
BOOLEAN acpi_bus_power_manageable(ACPI_HANDLE handle)
int acpi_bus_set_power(ACPI_HANDLE handle, int state)
ACPI_STATUS acpi_suspend(UINT32 state)
NTSTATUS Bus_PDO_Power(PPDO_DEVICE_DATA PdoData, PIRP Irp)
NTSTATUS Bus_FDO_Power(PFDO_DEVICE_DATA Data, PIRP Irp)
NTSTATUS NTAPI Bus_Power(PDEVICE_OBJECT DeviceObject, PIRP Irp)
PCHAR NTAPI PowerMinorFunctionString(IN UCHAR MinorFunction)
#define IoSkipCurrentIrpStackLocation(Irp)
#define IoCompleteRequest
POWER_STATE NTAPI PoSetPowerState(IN PDEVICE_OBJECT DeviceObject, IN POWER_STATE_TYPE Type, IN POWER_STATE State)
VOID NTAPI PoStartNextPowerIrp(IN PIRP Irp)
enum _POWER_STATE_TYPE POWER_STATE_TYPE
enum _DEVICE_POWER_STATE DEVICE_POWER_STATE
enum _SYSTEM_POWER_STATE SYSTEM_POWER_STATE
SYSTEM_POWER_STATE SystemPowerState
DEVICE_POWER_STATE DevicePowerState
COMMON_DEVICE_DATA Common
#define STATUS_UNSUCCESSFUL
DEVICE_POWER_STATE DeviceState
SYSTEM_POWER_STATE SystemState
_In_ PDEVICE_OBJECT DeviceObject
_In_ UCHAR _In_ UCHAR MinorFunction
#define IRP_MN_POWER_SEQUENCE
_In_ SYSTEM_POWER_STATE SystemPowerState
#define IRP_MN_QUERY_POWER