#include "precomp.h"
#include <debug.h>
Go to the source code of this file.
◆ NDEBUG
◆ Bus_FDO_Power()
Definition at line 49 of file power.c.
53{
61
63 powerType =
stack->Parameters.Power.Type;
64 powerState =
stack->Parameters.Power.State;
65
66
68 DPRINT(
"\tRequest to set %s state to %s\n",
73
75 {
79 break;
82 break;
85 break;
88 break;
91 break;
92 default:
95 break;
96 }
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;
105 }
106 }
107 }
112}
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
PCHAR DbgSystemPowerString(SYSTEM_POWER_STATE Type)
PCHAR DbgDevicePowerString(DEVICE_POWER_STATE Type)
#define ACPI_STATE_UNKNOWN
ACPI_STATUS acpi_suspend(UINT32 state)
#define IoSkipCurrentIrpStackLocation(Irp)
VOID NTAPI PoStartNextPowerIrp(IN PIRP Irp)
enum _POWER_STATE_TYPE POWER_STATE_TYPE
enum _SYSTEM_POWER_STATE SYSTEM_POWER_STATE
#define STATUS_UNSUCCESSFUL
DEVICE_POWER_STATE DeviceState
SYSTEM_POWER_STATE SystemState
_In_ SYSTEM_POWER_STATE SystemPowerState
Referenced by Bus_Power().
◆ Bus_PDO_Power()
Definition at line 116 of file power.c.
120{
126
128 powerType =
stack->Parameters.Power.Type;
129 powerState =
stack->Parameters.Power.State;
130
131 switch (
stack->MinorFunction) {
133
134 DPRINT(
"\tSetting %s power state to %s\n",
139
140 switch (powerType) {
143 {
147 break;
148 }
149
151 {
154 break;
155
158 break;
159
162 break;
163
166 break;
167
168 default:
170 break;
171 }
172
174 {
178 }
179 else
181 break;
182
186 break;
187
188 default:
190 break;
191 }
192 break;
193
196 break;
197
199
200
201
202
204 default:
206 break;
207 }
208
210
212 }
213
217
219}
#define STATUS_NOT_SUPPORTED
BOOLEAN acpi_bus_power_manageable(ACPI_HANDLE handle)
int acpi_bus_set_power(ACPI_HANDLE handle, int state)
#define IoCompleteRequest
POWER_STATE NTAPI PoSetPowerState(IN PDEVICE_OBJECT DeviceObject, IN POWER_STATE_TYPE Type, IN POWER_STATE State)
SYSTEM_POWER_STATE SystemPowerState
DEVICE_POWER_STATE DevicePowerState
COMMON_DEVICE_DATA Common
#define IRP_MN_POWER_SEQUENCE
#define IRP_MN_QUERY_POWER
Referenced by Bus_Power().
◆ Bus_Power()
Definition at line 8 of file power.c.
12{
16
20
22
24
25 DPRINT(
"FDO %s IRP:0x%p %s %s\n",
29
30
33 } else {
34
35 DPRINT(
"PDO %s IRP:0x%p %s %s\n",
39
42 }
43
45}
struct _COMMON_DEVICE_DATA * PCOMMON_DEVICE_DATA
NTSTATUS Bus_PDO_Power(PPDO_DEVICE_DATA PdoData, PIRP Irp)
NTSTATUS Bus_FDO_Power(PFDO_DEVICE_DATA Data, PIRP Irp)
PCHAR NTAPI PowerMinorFunctionString(IN UCHAR MinorFunction)
_In_ PDEVICE_OBJECT DeviceObject
Referenced by DriverEntry().