69 :4152)
71
74DeviceInitializeZPODD(
76 )
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91{
96 ULONG ZPODDEnabledInRegistry = 0;
100
102
103 if (DeviceExtension->ZeroPowerODDInfo !=
NULL)
104 {
105
106
107
108
110 }
111
112 ZPODDEnabledInRegistry = DeviceGetZPODDEnabledFromRegistry();
113
114 if (ZPODDEnabledInRegistry == 0)
115 {
116
117
118
119
121
123 "DeviceInitializeZPODD: ZPODD not enabled due to registry settings.\n"
124 ));
125
127 }
128
132
133 if (zpoddInfo ==
NULL)
134 {
136
138 }
139
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158 if ((DeviceExtension->PowerDescriptor ==
NULL) ||
159 (DeviceExtension->PowerDescriptor->DeviceAttentionSupported ==
FALSE) ||
160 (DeviceExtension->PowerDescriptor->AsynchronousNotificationSupported ==
FALSE))
161 {
163
165 "DeviceInitializeZPODD: ZPODD not enabled due to SATA features not present.\n"
166 ));
167
169 }
170
171
172
173
174
176 DeviceFindFeaturePage(DeviceExtension->DeviceAdditionalData.Mmc.CapabilitiesBuffer,
177 DeviceExtension->DeviceAdditionalData.Mmc.CapabilitiesBufferSize,
179
180 if ((removableMediumHeader ==
NULL) ||
182 (removableMediumHeader->
DBML !=
FALSE)) &&
184 (DeviceExtension->MediaChangeDetectionInfo->Gesn.Supported !=
FALSE))))
185 {
187
189 "DeviceInitializeZPODD: ZPODD not enabled due to ODD features not present.\n"
190 ));
191
193 }
194
196 zpoddInfo->
Load = removableMediumHeader->
Load;
197
198
199
200
201
203
205 {
207 "DeviceInitializeZPODD: Query D3Cold support interface failed.\n"
208 ));
209
211 }
212
213
214
215
216
217
218
219
221
224 &deepestWakeableDstate);
225
227 {
229 }
230
231
232
233
234
236 (DeviceExtension->PowerDescriptor->D3ColdSupported ==
FALSE))
237 {
239
241 "DeviceInitializeZPODD: ZPODD not enabled due to ACPI support not present.\n"
242 ));
243
245 }
246
247
248
249
250
251
252
253
254
255
256
258
260 {
262 "DeviceInitializeZPODD: ZPODD not enabled due to runtime power framework.\n"
263 ));
264
266 }
267
269 "DeviceInitializeZPODD: ZPODD is enabled.\n"
270 ));
271
272 DeviceExtension->ZeroPowerODDInfo = zpoddInfo;
273
274
275
276
277
278
279 inHomePosition = DeviceZPODDIsInHomePosition(DeviceExtension);
280
281 if (inHomePosition ==
FALSE)
282 {
284 "DeviceInitializeZPODD: not ready to power off, device marked as active\n"));
285
286 DeviceMarkActive(DeviceExtension,
TRUE,
FALSE);
287 }
288 else
289 {
290
291
292
293
294
296 {
297 tempStatus = DeviceGetConfigurationWithAlloc(DeviceExtension->Device,
302
304 }
305 }
306
308
310 {
311
312
313
314
316
318 {
319
320
321
322
323
324 DeviceMarkActive(DeviceExtension,
TRUE,
FALSE);
325 }
326
328 }
329
330
331
332
333
335}
#define CDROM_TAG_ZERO_POWER_ODD
#define DELAY_TIME_TO_ENTER_ZERO_POWER_IN_MS
#define STATUS_NOT_SUPPORTED
#define NT_SUCCESS(StatCode)
static const WCHAR Cleanup[]
#define _IRQL_requires_max_(irql)
#define ExAllocatePoolWithTag(hernya, size, tag)
#define UNREFERENCED_PARAMETER(P)
#define SCSI_GET_CONFIGURATION_REQUEST_TYPE_ALL
struct _FEATURE_DATA_REMOVABLE_MEDIUM * PFEATURE_DATA_REMOVABLE_MEDIUM
#define LOADING_MECHANISM_CADDY
#define LOADING_MECHANISM_TRAY
#define TRACE_LEVEL_INFORMATION
PGET_IDLE_WAKE_INFO GetIdleWakeInfo
ULONG GetConfigurationBufferSize
D3COLD_SUPPORT_INTERFACE D3ColdInterface
#define RtlZeroMemory(Destination, Length)
#define STATUS_INSUFFICIENT_RESOURCES
enum _DEVICE_WAKE_DEPTH DEVICE_WAKE_DEPTH
@ DeviceWakeDepthNotWakeable