37#define CLASS_TAG_POWER 'WLcS'
40#define DEFAULT_POWER_IRP_TIMEOUT_VALUE 10*60
41#define TIME_LEFT_FOR_LOWER_DRIVERS 30
42#define TIME_LEFT_FOR_UPPER_DRIVERS 5
43#define DEFAULT_IO_TIMEOUT_VALUE 10
44#define MINIMUM_STOP_UNIT_TIMEOUT_VALUE 2
52#define MINIMAL_START_UNIT_TIMEOUT_VALUE 60
53#define MINIMUM_START_UNIT_TIMEOUT_VALUE 30
57#if (NTDDI_VERSION < NTDDI_WIN7)
58#define PoQueryWatchdogTime(A, B) FALSE
83 #pragma alloc_text(PAGE, ClasspPowerSettingCallback)
206 if (PowerContext ==
NULL) {
273 Irp,
Irp->IoStatus.Status));
275 Irp, srbHeader->SrbStatus));
320 ULONG secondsRemaining = 0;
321 ULONG timeoutValue = 0;
322 ULONG startUnitTimeout;
324 if (PoQueryWatchdogTime(fdoExtension->
LowerPdo, &secondsRemaining)) {
342 fdoExtension->PrivateFdoData->MaxPowerOperationRetryCount =
352 if (--fdoExtension->PrivateFdoData->MaxPowerOperationRetryCount)
354 timeoutValue = startUnitTimeout;
363 fdoExtension->PrivateFdoData->MaxPowerOperationRetryCount = 0;
369 fdoExtension->PrivateFdoData->MaxPowerOperationRetryCount =
381 PowerContext->
RetryCount = fdoExtension->PrivateFdoData->MaxPowerOperationRetryCount;
451 TracePrint((
TRACE_LEVEL_INFORMATION, TRACE_FLAG_POWER,
"(%p)\tIoCallDriver returned %lx\n", fdoExtension->PrivateFdoData->PowerProcessIrp,
status));
460 goto ClasspPowerUpCompletionFailure;
476 ULONG secondsRemaining = 0;
479 TracePrint((
TRACE_LEVEL_ERROR, TRACE_FLAG_POWER,
"%p\tError occured when issuing START_UNIT "
480 "command to device. Srb %p, Status %x\n",
483 srbHeader->SrbStatus));
496 fdoExtension->PrivateFdoData->MaxPowerOperationRetryCount - PowerContext->
RetryCount,
504 delta100nsUnits += (10*1000*1000) - 1;
505 delta100nsUnits /= (10*1000*1000);
524 if (PoQueryWatchdogTime(fdoExtension->
LowerPdo, &secondsRemaining)) {
548 fdoExtension->PrivateFdoData->MaxPowerOperationRetryCount =
MAXIMUM_RETRIES;
552ClasspPowerUpCompletionFailure:
606 fdoExtension->PrivateFdoData->PowerProcessIrp,
status));
659 FailurePredictionEnabled =
TRUE;
668 (fdoExtension->FunctionSupportInfo !=
NULL) &&
669 (fdoExtension->FunctionSupportInfo->AsynchronousNotificationSupported ==
FALSE)) ||
670 (FailurePredictionEnabled)) {
708 if ((fdoExtension->PrivateFdoData) && (
Irp == fdoExtension->PrivateFdoData->PowerProcessIrp)) {
792 "Irp %p, Context %p\n",
832 Irp->IoStatus.Status));
835 srbHeader->SrbStatus));
889 fdoExtension->PrivateFdoData->MaxPowerOperationRetryCount = 0;
942 TracePrint((
TRACE_LEVEL_INFORMATION, TRACE_FLAG_POWER,
"(%p)\tIoCallDriver returned %lx\n", fdoExtension->PrivateFdoData->PowerProcessIrp,
status));
960 if (!
TEST_FLAG(fdoExtension->PrivateFdoData->HackFlags,
967 fdoExtension->PrivateFdoData->MaxPowerOperationRetryCount =
MAXIMUM_RETRIES;
1033 TracePrint((
TRACE_LEVEL_INFORMATION, TRACE_FLAG_POWER,
"(%p)\tIoCallDriver returned %lx\n", fdoExtension->PrivateFdoData->PowerProcessIrp,
status));
1038 TracePrint((
TRACE_LEVEL_WARNING, TRACE_FLAG_POWER,
"(%p)\tPower Down: not sending SYNCH_CACHE\n",
1064 TracePrint((
TRACE_LEVEL_ERROR, TRACE_FLAG_POWER,
"(%p)\tError occured when issuing "
1065 "SYNCHRONIZE_CACHE command to device. "
1066 "Srb %p, Status %lx\n",
1069 srbHeader->SrbStatus));
1082 fdoExtension->PrivateFdoData->MaxPowerOperationRetryCount - PowerContext->
RetryCount,
1090 delta100nsUnits += (10*1000*1000) - 1;
1091 delta100nsUnits /= (10*1000*1000);
1113 fdoExtension->PrivateFdoData->MaxPowerOperationRetryCount =
MAXIMUM_RETRIES;
1127 TracePrint((
TRACE_LEVEL_INFORMATION, TRACE_FLAG_POWER,
"(%p)\tPower Down: not sending SPIN DOWN due to hibernation path\n",
1140 ULONG secondsRemaining;
1145 if (PoQueryWatchdogTime(fdoExtension->
LowerPdo, &secondsRemaining)) {
1149 fdoExtension->PrivateFdoData->MaxPowerOperationRetryCount =
1158 if (--fdoExtension->PrivateFdoData->MaxPowerOperationRetryCount)
1167 if (fdoExtension->PrivateFdoData->MaxPowerOperationRetryCount >
MAXIMUM_RETRIES) {
1168 fdoExtension->PrivateFdoData->MaxPowerOperationRetryCount =
MAXIMUM_RETRIES;
1172 fdoExtension->PrivateFdoData->MaxPowerOperationRetryCount = 0;
1185 fdoExtension->PrivateFdoData->MaxPowerOperationRetryCount =
MAXIMUM_RETRIES;
1193 PowerContext->
RetryCount = fdoExtension->PrivateFdoData->MaxPowerOperationRetryCount;
1261 TracePrint((
TRACE_LEVEL_INFORMATION, TRACE_FLAG_POWER,
"(%p)\tIoCallDriver returned %lx\n", fdoExtension->PrivateFdoData->PowerProcessIrp,
status));
1279 TracePrint((
TRACE_LEVEL_ERROR, TRACE_FLAG_POWER,
"(%p)\tError occured when issueing STOP_UNIT "
1280 "command to device. Srb %p, Status %lx\n",
1283 srbHeader->SrbStatus));
1296 fdoExtension->PrivateFdoData->MaxPowerOperationRetryCount - PowerContext->
RetryCount,
1304 delta100nsUnits += (10*1000*1000) - 1;
1305 delta100nsUnits /= (10*1000*1000);
1330 fdoExtension->PrivateFdoData->MaxPowerOperationRetryCount =
MAXIMUM_RETRIES;
1348 (senseBuffer !=
NULL)) {
1355 validSense = ScsiGetSenseKeyAndCodes(senseBuffer,
1367 ignoreError =
FALSE;
1463 fdoExtension->PrivateFdoData->PowerProcessIrp,
1517 if (
Irp == fdoExtension->PrivateFdoData->PowerProcessIrp) {
1576 if (!commonExtension->
IsFdo) {
1583 TracePrint((
TRACE_LEVEL_ERROR, TRACE_FLAG_POWER,
"ClasspPowerHandler: Called for PDO %p???\n",
1585 NT_ASSERT(!
"PDO using ClasspPowerHandler");
1604 "System" :
"Device"),
1615 if ((fdoExtension->FunctionSupportInfo) &&
1616 (fdoExtension->FunctionSupportInfo->IdlePower.NoVerifyDuringIdlePower)) {
1658 goto ClasspPowerHandlerCleanup;
1671 goto ClasspPowerHandlerCleanup;
1688 goto ClasspPowerHandlerCleanup;
1695 if ((!
Options.HandleSpinUp) &&
1702 goto ClasspPowerHandlerCleanup;
1710 if ((!
Options.HandleSpinDown) &&
1717 goto ClasspPowerHandlerCleanup;
1770 fdoExtension->PrivateFdoData->MaxPowerOperationRetryCount =
MAXIMUM_RETRIES;
1804 if ((fdoExtension->PrivateFdoData->TickTimerEnabled)) {
1845 IoCallDriver(lowerDevice, fdoExtension->PrivateFdoData->PowerProcessIrp);
1860ClasspPowerHandlerCleanup:
1875 return PoCallDriver(lowerDevice,
Irp);
1934 if (!commonExtension->
IsFdo)
1937 Irp->IoStatus.Information = 0;
1943 if (commonExtension->
IsFdo)
2016 "\t%shandling spin down\n"
2017 "\t%shandling spin up\n"
2018 "\t%slocking queue\n",
2020 (
options.HandleSpinDown ?
"" :
"not "),
2021 (
options.HandleSpinUp ?
"" :
"not "),
2022 (
options.LockQueue ?
"" :
"not ")
2055 TracePrint((
TRACE_LEVEL_ERROR, TRACE_FLAG_POWER,
"ClassStopUnitPowerHandler - Devobj %p using outdated call\n"
2056 "Drivers should set the following flags in ScanForSpecialFlags "
2057 " in the FDO extension:\n"
2058 "\tCLASS_SPECIAL_DISABLE_SPIN_UP\n"
2059 "\tCLASS_SPECIAL_NO_QUEUE_LOCK\n"
2060 "This will provide equivalent functionality if the power "
2061 "routine is then set to ClassSpinDownPowerHandler\n\n",
2122 srbFunction = srb->Function;
2128 srbFunction = srb->Function;
2136 if (
Context->RetryInterval == 0) {
2217 if (
Irp->PendingReturned) {
2221 if (PowerContext !=
NULL)
2272 FailurePredictionEnabled =
TRUE;
2281 (fdoExtension->FunctionSupportInfo !=
NULL) &&
2282 (fdoExtension->FunctionSupportInfo->AsynchronousNotificationSupported ==
FALSE)) ||
2283 (FailurePredictionEnabled)) {
2321 if (
Irp->PendingReturned) {
2362 idlePower.
WakeCapableHint = fdoExtension->FunctionSupportInfo->IdlePower.DeviceWakeable;
2363 idlePower.
D3ColdSupported = fdoExtension->FunctionSupportInfo->IdlePower.D3ColdSupported;
2364 idlePower.
D3IdleTimeout = fdoExtension->FunctionSupportInfo->IdlePower.D3IdleTimeout;
2368 commonExtension->LowerDeviceObject,
2380 "ClasspSendEnableIdlePowerIoctl: Port driver returned status (%x) for FDO (%p)\n"
2381 "\tWakeCapableHint: %u\n"
2382 "\tD3ColdSupported: %u\n"
2383 "\tD3IdleTimeout: %u (ms)",
2430#pragma warning(suppress:4054)
2465 if (!fdoExtension->FunctionSupportInfo->IdlePower.D3IdleTimeoutOverridden) {
2510 (fdoExtension->FunctionSupportInfo->AsynchronousNotificationSupported ==
FALSE)) {
2527#if (NTDDI_VERSION >= NTDDI_WINBLUE)
2577 ULONG idleTimeoutOverrideInSeconds = 0;
2582 NT_ASSERT(fdoExtension->FunctionSupportInfo->IdlePower.IdlePowerEnabled ==
FALSE);
2584 ClassGetDeviceParameter(fdoExtension,
2587 &d3ColdDisabledByUser);
2593 if (d3ColdDisabledByUser || fdoExtension->PrivateFdoData->HotplugInfo.DeviceHotplug) {
2594 fdoExtension->FunctionSupportInfo->IdlePower.D3ColdSupported = 0;
2597 ClassGetDeviceParameter(fdoExtension,
2600 &idleTimeoutOverrideInSeconds);
2607 if (idleTimeoutOverrideInSeconds != 0) {
2608 fdoExtension->FunctionSupportInfo->IdlePower.D3IdleTimeout = (idleTimeoutOverrideInSeconds * 1000);
2609 fdoExtension->FunctionSupportInfo->IdlePower.D3IdleTimeoutOverridden =
TRUE;
2617 fdoExtension->FunctionSupportInfo->IdlePower.DeviceWakeable =
FALSE;
2634 fdoExtension->FunctionSupportInfo->IdlePower.IdlePowerEnabled =
TRUE;
2650 &GUID_DISK_IDLE_TIMEOUT,
2656 fdoExtension->FunctionSupportInfo->IdlePower.IdlePowerEnabled =
FALSE;
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
#define InterlockedIncrement
while(CdLookupNextInitialFileDirent(IrpContext, Fcb, FileContext))
#define START_UNIT_TIMEOUT
#define TEST_FLAG(Flags, Bit)
#define SET_FLAG(Flags, Bit)
#define CLASSP_REG_SUBKEY_NAME
#define SCSI_ADSENSE_LUN_NOT_READY
#define SCSIOP_START_STOP_UNIT
#define SCSI_SENSE_NOT_READY
#define SCSI_SENSEQ_FORMAT_IN_PROGRESS
#define SCSIOP_SYNCHRONIZE_CACHE
NTSTATUS InitializeStorageRequestBlock(_Inout_bytecount_(ByteSize) PSTORAGE_REQUEST_BLOCK Srb, _In_ USHORT AddressType, _In_ ULONG ByteSize, _In_ ULONG NumSrbExData,...)
_In_ PTRANSFER_PACKET _In_ ULONG _In_ PIRP OriginalIrp
#define FDO_HACK_NO_SYNC_CACHE
#define CLASSP_REG_IDLE_TIMEOUT_IN_SECONDS
#define CLASSP_REG_DISABLE_D3COLD
struct _IDLE_POWER_FDO_LIST_ENTRY * PIDLE_POWER_FDO_LIST_ENTRY
POWER_SETTING_CALLBACK ClasspPowerSettingCallback
BOOLEAN ClasspUpdateTimerNoWakeTolerance(_In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension)
VOID ClasspEnableTimer(_In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension)
VOID ClasspDisableTimer(_In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension)
BOOLEAN ClasspFailurePredictionPeriodMissed(_In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension)
VOID NTAPI ClassCheckMediaState(_In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension)
FORCEINLINE UCHAR GET_FDO_EXTENSON_SENSE_DATA_LENGTH(_In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension)
#define CLASS_SRBEX_NO_SRBEX_DATA_BUFFER_SIZE
struct _CLASS_POWER_CONTEXT * PCLASS_POWER_CONTEXT
#define ClassAcquireRemoveLock(devobj, tag)
SCSIPORT_API NTSTATUS NTAPI ClassSpinDownPowerHandler(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp)
#define CLASS_SPECIAL_DISABLE_SPIN_DOWN
struct _FUNCTIONAL_DEVICE_EXTENSION * PFUNCTIONAL_DEVICE_EXTENSION
@ PowerDownDeviceUnlocked3
@ PowerDownDeviceFlushed3
@ PowerDownDeviceInitial3
@ PowerDownDeviceStopped3
@ PowerDownDeviceQuiesced3
#define CLASS_SPECIAL_NO_QUEUE_LOCK
#define CLASS_SRBEX_SCSI_CDB16_BUFFER_SIZE
#define CLASS_SPECIAL_DISABLE_SPIN_UP
#define STATUS_NOT_SUPPORTED
#define NT_SUCCESS(StatCode)
PVPB NTAPI ClassGetVpb(_In_ PDEVICE_OBJECT DeviceObject)
KGUARDED_MUTEX IdlePowerFDOListMutex
VOID ClassRetryRequest(IN PDEVICE_OBJECT SelfDeviceObject, IN PIRP Irp, _In_ _In_range_(0, MAXIMUM_RETRY_FOR_SINGLE_IO_IN_100NS_UNITS) IN LONGLONG TimeDelta100ns)
ULONG DiskIdleTimeoutInMS
VOID NTAPI ClassSendDeviceIoControlSynchronous(_In_ ULONG IoControlCode, _In_ PDEVICE_OBJECT TargetDeviceObject, _Inout_updates_opt_(_Inexpressible_(max(InputBufferLength, OutputBufferLength))) PVOID Buffer, _In_ ULONG InputBufferLength, _In_ ULONG OutputBufferLength, _In_ BOOLEAN InternalDeviceIoControl, _Out_ PIO_STATUS_BLOCK IoStatus)
PVOID PowerSettingNotificationHandle
BOOLEAN InterpretSenseInfoWithoutHistory(_In_ PDEVICE_OBJECT Fdo, _In_opt_ PIRP OriginalRequest, _In_ PSCSI_REQUEST_BLOCK Srb, UCHAR MajorFunctionCode, ULONG IoDeviceCode, ULONG PreviousRetryCount, _Out_ NTSTATUS *Status, _Out_opt_ _Deref_out_range_(0, MAXIMUM_RETRY_FOR_SINGLE_IO_IN_100NS_UNITS) LONGLONG *RetryIn100nsUnits)
LIST_ENTRY IdlePowerFDOList
VOID NTAPI ClassCompleteRequest(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp, _In_ CCHAR PriorityBoost)
VOID NTAPI ClassReleaseRemoveLock(_In_ PDEVICE_OBJECT DeviceObject, _In_opt_ PIRP Tag)
VOID RetryPowerRequest(PDEVICE_OBJECT DeviceObject, PIRP Irp, PCLASS_POWER_CONTEXT Context)
#define MINIMUM_START_UNIT_TIMEOUT_VALUE
#define DEFAULT_POWER_IRP_TIMEOUT_VALUE
NTSTATUS NTAPI ClassMinimalPowerHandler(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
IO_COMPLETION_ROUTINE ClasspPowerUpCompletion
IO_COMPLETION_ROUTINE ClasspDeviceLockFailurePowerIrpCompletion
#define TIME_LEFT_FOR_UPPER_DRIVERS
IO_COMPLETION_ROUTINE ClasspPowerDownCompletion
#define DEFAULT_IO_TIMEOUT_VALUE
IO_COMPLETION_ROUTINE ClasspStartNextPowerIrpCompletion
_IRQL_requires_same_ NTSTATUS ClasspSendEnableIdlePowerIoctl(_In_ PDEVICE_OBJECT DeviceObject)
#define TIME_LEFT_FOR_LOWER_DRIVERS
NTSTATUS ClasspPowerHandler(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp, IN CLASS_POWER_OPTIONS Options)
_IRQL_requires_same_ NTSTATUS ClasspEnableIdlePower(_In_ PDEVICE_OBJECT DeviceObject)
NTSTATUS NTAPI ClassDispatchPower(IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp)
#define MINIMUM_STOP_UNIT_TIMEOUT_VALUE
NTSTATUS NTAPI ClassStopUnitPowerHandler(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp)
#define MINIMAL_START_UNIT_TIMEOUT_VALUE
struct _SCSI_REQUEST_BLOCK SCSI_REQUEST_BLOCK
#define SRB_FLAGS_FREE_SENSE_BUFFER
#define SRB_FUNCTION_EXECUTE_SCSI
#define SRB_FLAGS_NO_DATA_TRANSFER
#define SRB_FUNCTION_LOCK_QUEUE
#define SRB_FLAGS_PORT_DRIVER_ALLOCSENSE
#define SRB_STATUS_AUTOSENSE_VALID
#define SRB_FLAGS_DISABLE_AUTOSENSE
struct _SCSI_REQUEST_BLOCK * PSCSI_REQUEST_BLOCK
#define SRB_FUNCTION_UNLOCK_QUEUE
#define SRB_FLAGS_BYPASS_LOCKED_QUEUE
#define SRB_FLAGS_DISABLE_SYNCH_TRANSFER
#define SRB_STATUS(Status)
#define SRB_STATUS_QUEUE_FROZEN
#define SRB_FLAGS_NO_QUEUE_FREEZE
#define SRB_STATUS_SUCCESS
#define _IRQL_requires_same_
#define InsertHeadList(ListHead, Entry)
#define ExAllocatePoolWithTag(hernya, size, tag)
VOID FASTCALL KeReleaseGuardedMutex(IN OUT PKGUARDED_MUTEX GuardedMutex)
VOID FASTCALL KeAcquireGuardedMutex(IN PKGUARDED_MUTEX GuardedMutex)
#define IoSetCompletionRoutine(_Irp, _CompletionRoutine, _Context, _InvokeOnSuccess, _InvokeOnError, _InvokeOnCancel)
#define _Function_class_(x)
#define _In_reads_bytes_(size)
#define __control_entrypoint(category)
#define _Analysis_assume_(expr)
#define FILE_REMOVABLE_MEDIA
#define UNREFERENCED_PARAMETER(P)
#define IOCTL_STORAGE_ENABLE_IDLE_POWER
struct _STORAGE_IDLE_POWER STORAGE_IDLE_POWER
#define IoSkipCurrentIrpStackLocation(Irp)
#define IoCopyCurrentIrpStackLocationToNext(Irp)
VOID NTAPI IoReuseIrp(IN OUT PIRP Irp, IN NTSTATUS Status)
POWER_STATE NTAPI PoSetPowerState(IN PDEVICE_OBJECT DeviceObject, IN POWER_STATE_TYPE Type, IN POWER_STATE State)
VOID NTAPI PoStartNextPowerIrp(IN PIRP Irp)
#define STATUS_DELETE_PENDING
#define STATUS_DEVICE_DOES_NOT_EXIST
NTKRNLVISTAAPI NTSTATUS NTAPI PoRegisterPowerSettingCallback(_In_opt_ PDEVICE_OBJECT DeviceObject, _In_ LPCGUID SettingGuid, _In_ PPOWER_SETTING_CALLBACK Callback, _In_opt_ PVOID Context, _Outptr_opt_ PVOID *Handle)
#define IsEqualGUID(rguid1, rguid2)
UCHAR additionalSenseCode
UCHAR additionalSenseCodeQualifier
#define SCSI_SENSE_OPTIONS_FIXED_FORMAT_IF_UNKNOWN_FORMAT_INDICATED
#define SRB_FLAGS_D3_PROCESSING
#define SRB_TYPE_STORAGE_REQUEST_BLOCK
#define STORAGE_ADDRESS_TYPE_BTL8
struct SRB_ALIGN _STORAGE_REQUEST_BLOCK_HEADER * PSTORAGE_REQUEST_BLOCK_HEADER
#define SRB_FUNCTION_QUIESCE_DEVICE
#define STATUS_MORE_PROCESSING_REQUIRED
FORCEINLINE VOID SrbSetSrbFlags(_In_ PVOID Srb, _In_ ULONG Flags)
FORCEINLINE VOID SrbAssignSrbFlags(_In_ PVOID Srb, _In_ ULONG Flags)
FORCEINLINE VOID SrbSetDataTransferLength(_In_ PVOID Srb, _In_ ULONG DataTransferLength)
FORCEINLINE VOID SrbSetOriginalRequest(_In_ PVOID Srb, _In_opt_ PVOID OriginalRequest)
FORCEINLINE VOID SrbSetScsiStatus(_In_ PVOID Srb, _In_ UCHAR ScsiStatus)
FORCEINLINE VOID SrbSetSenseInfoBufferLength(_In_ PVOID Srb, _In_ UCHAR SenseInfoBufferLength)
FORCEINLINE ULONG SrbGetSrbFlags(_In_ PVOID Srb)
FORCEINLINE VOID SrbSetSenseInfoBuffer(_In_ PVOID Srb, _In_opt_ PVOID SenseInfoBuffer)
FORCEINLINE VOID SrbSetCdbLength(_In_ PVOID Srb, _In_ UCHAR CdbLength)
FORCEINLINE VOID SrbSetTimeOutValue(_In_ PVOID Srb, _In_ ULONG TimeOutValue)
FORCEINLINE PVOID SrbGetSenseInfoBuffer(_In_ PVOID Srb)
FORCEINLINE UCHAR SrbGetSenseInfoBufferLength(_In_ PVOID Srb)
#define TRACE_LEVEL_WARNING
#define TRACE_LEVEL_ERROR
#define TRACE_LEVEL_INFORMATION
PCLASS_POWER_DEVICE ClassPowerDevice
union _CLASS_POWER_CONTEXT::@1916 PowerChangeState
CLASS_POWER_DOWN_STATE3 PowerDown3
PDEVICE_OBJECT DeviceObject
CLASS_POWER_UP_STATE PowerUp
CLASS_POWER_OPTIONS Options
STORAGE_HOTPLUG_INFO HotplugInfo
PDEVICE_OBJECT DeviceObject
PCLASS_DRIVER_EXTENSION DriverExtension
PDEVICE_OBJECT LowerDeviceObject
ULONG HibernationPathCount
struct _FUNCTIONAL_DEVICE_EXTENSION * PartitionZeroExtension
PDEVICE_OBJECT DeviceObject
ULONG ScanForSpecialFlags
BOOLEAN PowerDownInProgress
struct _FAILURE_PREDICTION_INFO * FailurePredictionInfo
CLASS_POWER_CONTEXT PowerContext
COMMON_DEVICE_EXTENSION CommonExtension
PSTORAGE_ADAPTER_DESCRIPTOR AdapterDescriptor
DEVICE_POWER_STATE DevicePowerState
PMEDIA_CHANGE_DETECTION_INFO MediaChangeDetectionInfo
struct _IO_STACK_LOCATION::@3974::@3996 Scsi
struct _IO_STACK_LOCATION::@3974::@4010 Power
union _IO_STACK_LOCATION::@1575 Parameters
struct _LIST_ENTRY * Flink
#define RtlZeroMemory(Destination, Length)
#define STATUS_INVALID_PARAMETER
#define STATUS_UNSUCCESSFUL
#define STATUS_DEVICE_BUSY
struct _CDB::_START_STOP START_STOP
struct _CDB::_SYNCHRONIZE_CACHE10 SYNCHRONIZE_CACHE10
_In_ PDEVICE_OBJECT DeviceObject
_In_ PWDFDEVICE_INIT _In_ PWDF_REMOVE_LOCK_OPTIONS Options
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_ ULONG ValueLength
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
_Must_inspect_result_ _In_ ULONG Flags
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetNextIrpStackLocation(_In_ PIRP Irp)
FORCEINLINE VOID IoSetNextIrpStackLocation(_Inout_ PIRP Irp)
_In_ SYSTEM_POWER_STATE SystemPowerState
#define IRP_MN_QUERY_POWER