32 #pragma alloc_text(PAGE, InitializeTransferPackets)
33 #pragma alloc_text(PAGE, DestroyAllTransferPackets)
34 #pragma alloc_text(PAGE, SetupEjectionTransferPacket)
35 #pragma alloc_text(PAGE, SetupModeSenseTransferPacket)
36 #pragma alloc_text(PAGE, CleanupTransferPacketToWorkingSetSizeWorker)
37 #pragma alloc_text(PAGE, ClasspSetupPopulateTokenTransferPacket)
57 ULONG maxOutstandingIOPerLUN;
58 ULONG minWorkingSetTransferPackets;
59 ULONG maxWorkingSetTransferPackets;
68 NT_ASSERT(adapterDesc->MaximumTransferLength);
70 hwMaxPages = adapterDesc->MaximumPhysicalPages ? adapterDesc->MaximumPhysicalPages-1 : 0;
113 (
PVOID *)&devIoCapabilityDesc);
116 maxOutstandingIOPerLUN = devIoCapabilityDesc->LunMaxIoCount;
120 fdoData->MaxOutstandingIOPerLUN = maxOutstandingIOPerLUN;
127 fdoData->MaxOutstandingIOPerLUN = 0;
153 2 * maxOutstandingIOPerLUN);
164 minWorkingSetTransferPackets =
167 maxOutstandingIOPerLUN));
170 2 * maxOutstandingIOPerLUN);
184 if (workingSet->XferPacketsWorkingSetMinimum != 0)
194 if (workingSet->XferPacketsWorkingSetMaximum != 0)
231 #if (NTDDI_VERSION >= NTDDI_WINBLUE)
232 if ((fdoExt->MiniportDescriptor !=
NULL) &&
234 (fdoExt->MiniportDescriptor->ExtraIoInfoSupported ==
TRUE)) {
324#pragma warning(suppress:28195)
338 TracePrint((
TRACE_LEVEL_ERROR, TRACE_FLAG_RW,
"Integer overflow in calculating transfer packet size."));
348 if (newPkt ==
NULL) {
355#if (NTDDI_VERSION >= NTDDI_WINBLUE)
356 if ((fdoExt->MiniportDescriptor !=
NULL) &&
358 (fdoExt->MiniportDescriptor->ExtraIoInfoSupported ==
TRUE)) {
387#pragma prefast(suppress:6014, "The allocated memory that Pkt->Srb points to will be freed in DestroyTransferPacket().")
410 TracePrint((
TRACE_LEVEL_WARNING, TRACE_FLAG_RW,
"Failed to allocate IRP for transfer packet."));
429 TracePrint((
TRACE_LEVEL_WARNING, TRACE_FLAG_RW,
"Failed to allocate MDL for transfer packet."));
445 ULONG historyByteCount = 0;
457 TracePrint((
TRACE_LEVEL_WARNING, TRACE_FLAG_RW,
"Failed to allocate MDL for transfer packet."));
483 if (newPkt !=
NULL) {
574 if (workItem && !isRemoved) {
578 "EnqueueFreeTransferPacket: Device (%p), queuing work item to clean up free transfer packets.\n",
599 "EnqueueFreeTransferPacket: Device (%p), Failed to allocate memory for the work item.\n",
622 TracePrint((
TRACE_LEVEL_INFORMATION, TRACE_FLAG_RW,
"Exiting stress, lazily freeing one of %d/%d packets from node %d.",
638 "Extremely unlikely condition (non-fatal): %d packets dequeued at once for Fdo %p. NumTotalTransferPackets=%d (2). Node=%d",
674 slistEntry->Next =
NULL;
689 pkt = NewTransferPacket(
Fdo);
696 TracePrint((
TRACE_LEVEL_WARNING, TRACE_FLAG_RW,
"DequeueFreeTransferPacket: packet allocation failed"));
730 ULONG numTransferBlocks;
760 if (logicalBlockAddr.
QuadPart > 0xFFFFFFFF) {
790 pCdb->
CDB10.TransferBlocksMsb = ((
PFOUR_BYTE)&numTransferBlocks)->Byte1;
791 pCdb->
CDB10.TransferBlocksLsb = ((
PFOUR_BYTE)&numTransferBlocks)->Byte0;
831#if !defined(__REACTOS__) && NTDDI_VERSION >= NTDDI_WINBLUE
939 ULONG transferLength;
1014 (
LONG)transferLength);
1104 LONG numPacketsRemaining;
1107 UCHAR uniqueAddr = 0;
1124 TracePrint((
TRACE_LEVEL_INFORMATION, TRACE_FLAG_RW,
"Freeing port-allocated sense buffer for pkt %ph.", pkt));
1165 if (numPacketsRemaining > 0){
1200 if (pkt->
Irp->PendingReturned){
1255 TracePrint((
TRACE_LEVEL_INFORMATION, TRACE_FLAG_RW,
"SRB_FLAGS_DONT_START_NEXT_PACKET should never be set here (?)"));
1367 PVOID ModeSenseBuffer,
1368 UCHAR ModeSenseBufferLen,
1427 PVOID ModeSelectBuffer,
1428 UCHAR ModeSelectBufferLen,
1482 ULONG ReadCapacityBufferLen,
1515 if (Use16ByteCdb ==
TRUE) {
1532#if !defined(__REACTOS__) && NTDDI_VERSION >= NTDDI_WINBLUE
1644 if (LimitNumPktToDelete) {
1648 TracePrint((
TRACE_LEVEL_INFORMATION, TRACE_FLAG_RW,
"CleanupTransferPacketToWorkingSetSize (%p): Exiting stress, block freeing %d packets.",
Fdo, requiredNumPktToDelete));
1663 (requiredNumPktToDelete--)){
1672 "Extremely unlikely condition (non-fatal): %d packets dequeued at once for Fdo %p. NumTotalTransferPackets=%d (1). Node=%d",
1683 while (slistEntry) {
1697ClasspSetupPopulateTokenTransferPacket(
1738 "ClasspSetupPopulateTokenTransferPacket (%p): Entering function. Irp %p\n",
1743 fdoData = fdoExt->PrivateFdoData;
1785 "ClasspSetupPopulateTokenTransferPacket (%p): Exiting function with Irp %p\n",
1797ClasspSetupReceivePopulateTokenInformationTransferPacket(
1835 "ClasspSetupReceivePopulateTokenInformationTransferPacket (%p): Entering function. Irp %p\n",
1840 fdoData = fdoExt->PrivateFdoData;
1882 "ClasspSetupReceivePopulateTokenInformationTransferPacket (%p): Exiting function with Irp %p\n",
1894ClasspSetupWriteUsingTokenTransferPacket(
1936 "ClasspSetupWriteUsingTokenTransferPacket (%p): Entering function. Irp %p\n",
1941 fdoData = fdoExt->PrivateFdoData;
1983 "ClasspSetupWriteUsingTokenTransferPacket (%p): Exiting function with Irp %p\n",
1995ClasspSetupReceiveWriteUsingTokenInformationTransferPacket(
2034 "ClasspSetupReceiveWriteUsingTokenInformationTransferPacket (%p): Entering function. Irp %p\n",
2039 fdoData = fdoExt->PrivateFdoData;
2081 "ClasspSetupReceiveWriteUsingTokenInformationTransferPacket (%p): Exiting function with Irp %p\n",
static PIO_STACK_LOCATION IoGetCurrentIrpStackLocation(PIRP Irp)
#define InterlockedIncrement
#define InterlockedDecrement
_In_ size_t _In_ UCHAR PageMode
#define FREE_POOL(_PoolPtr)
#define START_UNIT_TIMEOUT
_In_ PREAD_CAPACITY_DATA ReadCapacityBuffer
#define SRB_CLASS_FLAGS_PAGING
#define TEST_FLAG(Flags, Bit)
#define SET_FLAG(Flags, Bit)
_In_ ULONG _In_ UCHAR _In_ UCHAR PageControl
struct _SRB_HISTORY * PSRB_HISTORY
struct _SRB_HISTORY_ITEM SRB_HISTORY_ITEM
#define SCSIOP_MEDIUM_REMOVAL
#define SCSIOP_READ_CAPACITY
#define SCSIOP_MODE_SENSE
#define SCSIOP_START_STOP_UNIT
#define SCSIOP_MODE_SELECT
#define NUM_WRITE_USING_TOKEN_RETRIES
BOOLEAN StepLowMemRetry(PTRANSFER_PACKET Pkt)
_In_ PTRANSFER_PACKET _In_ ULONG _In_ PIRP OriginalIrp
#define HISTORYLOGRETURNEDPACKET(_packet)
FORCEINLINE VOID SimpleInitSlistHdr(SINGLE_LIST_ENTRY *SListHdr)
PIRP DequeueDeferredClientIrp(PDEVICE_OBJECT Fdo)
NTSTATUS CreateStorageRequestBlock(_Inout_ PSTORAGE_REQUEST_BLOCK *Srb, _In_ USHORT AddressType, _In_opt_ PSRB_ALLOCATE_ROUTINE AllocateRoutine, _Inout_opt_ ULONG *ByteSize, _In_ ULONG NumSrbExData,...)
_In_ PTRANSFER_PACKET _In_ ULONG _In_ PIRP _In_ ULONG ListIdentifier
#define MAX_CLEANUP_TRANSFER_PACKETS_AT_ONCE
FORCEINLINE LARGE_INTEGER ClasspGetCurrentTime(VOID)
_In_ PTRANSFER_PACKET Pkt
FORCEINLINE SINGLE_LIST_ENTRY * SimplePopSlist(SINGLE_LIST_ENTRY *SListHdr)
#define MAX_OUTSTANDING_IO_PER_LUN_DEFAULT
VOID ClasspPerfIncrementSuccessfulIo(IN PFUNCTIONAL_DEVICE_EXTENSION FdoExtension)
VOID(* PCONTINUATION_ROUTINE)(_In_ PVOID Context)
IO_COMPLETION_ROUTINE TransferPktComplete
IO_WORKITEM_ROUTINE_EX CleanupTransferPacketToWorkingSetSizeWorker
BOOLEAN RetryTransferPacket(PTRANSFER_PACKET Pkt)
#define NUM_DRIVECAPACITY_RETRIES
FORCEINLINE BOOLEAN ClasspIsIdleRequest(PIRP Irp)
FORCEINLINE VOID SimplePushSlist(SINGLE_LIST_ENTRY *SListHdr, SINGLE_LIST_ENTRY *SListEntry)
#define NUM_LOCKMEDIAREMOVAL_RETRIES
#define MAX_WORKINGSET_TRANSFER_PACKETS_Client
#define MIN_WORKINGSET_TRANSFER_PACKETS_Server_LowerBound
#define HISTORYINITIALIZERETRYLOGS(_packet)
struct _TRANSFER_PACKET * PTRANSFER_PACKET
VOID ClasspCompleteIdleRequest(PFUNCTIONAL_DEVICE_EXTENSION FdoExtension)
#define HISTORYLOGSENDPACKET(_packet)
FORCEINLINE BOOLEAN PORT_ALLOCATED_SENSE_EX(_In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, _In_ PSTORAGE_REQUEST_BLOCK_HEADER Srb)
#define MIN_WORKINGSET_TRANSFER_PACKETS_Server_UpperBound
#define MIN_INITIAL_TRANSFER_PACKETS
FORCEINLINE VOID ClasspSrbSetOriginalIrp(_In_ PSTORAGE_REQUEST_BLOCK_HEADER Srb, _In_ PIRP Irp)
#define CLASS_TAG_PRIVATE_DATA
#define NUM_MODESENSE_RETRIES
#define NUM_MODESELECT_RETRIES
BOOLEAN InterpretTransferPacketError(PTRANSFER_PACKET Pkt)
#define NUM_POPULATE_TOKEN_RETRIES
FORCEINLINE VOID FREE_PORT_ALLOCATED_SENSE_BUFFER_EX(_In_ PFUNCTIONAL_DEVICE_EXTENSION FdoExtension, _In_ PSTORAGE_REQUEST_BLOCK_HEADER Srb)
#define MAX_WORKINGSET_TRANSFER_PACKETS_Server
VOID HistoryInitializeRetryLogs(_Out_ PSRB_HISTORY History, ULONG HistoryCount)
PVOID DefaultStorageRequestBlockAllocateRoutine(_In_ CLONG ByteSize)
#define MIN_WORKINGSET_TRANSFER_PACKETS_Client
#define ClassAcquireRemoveLock(devobj, tag)
#define DEV_USE_16BYTE_CDB
#define STATUS_NOT_SUPPORTED
#define NT_SUCCESS(StatCode)
NTSTATUS NTAPI RtlGetVersion(IN OUT PRTL_OSVERSIONINFOW lpVersionInformation)
VOID ClasspReceiveWriteUsingTokenInformationTransferPacketDone(_In_ POFFLOAD_WRITE_CONTEXT OffloadWriteContext)
ULONG ClassMaxInterleavePerCriticalIo
VOID ClasspWriteUsingTokenTransferPacketDone(_In_ PVOID Context)
NTSTATUS ServiceTransferRequest(PDEVICE_OBJECT Fdo, PIRP Irp, BOOLEAN PostToDpc)
VOID ClasspReceivePopulateTokenInformationTransferPacketDone(_In_ PVOID Context)
VOID NTAPI ClassReleaseQueue(_In_ PDEVICE_OBJECT Fdo)
VOID ClasspPopulateTokenTransferPacketDone(_In_ PVOID Context)
#define DBGLOGFLUSHINFO(_fdoData, _isIO, _isFUA, _isFlush)
#define DBGLOGSENDPACKET(_pkt)
#define DBGCHECKRETURNEDPKT(_pkt)
#define DBGLOGRETURNPACKET(_pkt)
VOID NTAPI ClassCompleteRequest(_In_ PDEVICE_OBJECT DeviceObject, _In_ PIRP Irp, _In_ CCHAR PriorityBoost)
VOID NTAPI ClassReleaseRemoveLock(_In_ PDEVICE_OBJECT DeviceObject, _In_opt_ PIRP Tag)
struct _SCSI_REQUEST_BLOCK SCSI_REQUEST_BLOCK
#define SRB_FUNCTION_EXECUTE_SCSI
#define SRB_FLAGS_DONT_START_NEXT_PACKET
#define SRB_FLAGS_DATA_OUT
#define SRB_FLAGS_NO_DATA_TRANSFER
#define SRB_SIMPLE_TAG_REQUEST
#define SRB_FLAGS_DISABLE_AUTOSENSE
struct _SCSI_REQUEST_BLOCK * PSCSI_REQUEST_BLOCK
#define SRB_FLAGS_DATA_IN
#define SRB_FLAGS_ADAPTER_CACHE_ENABLE
#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 __drv_freesMem(kind)
#define _IRQL_requires_min_(irql)
#define _IRQL_requires_max_(irql)
#define __drv_allocatesMem(kind)
#define RemoveEntryList(Entry)
#define InsertTailList(ListHead, Entry)
#define ExAllocatePoolWithTag(hernya, size, tag)
#define IsListEmpty(ListHead)
#define KeRaiseIrql(irql, oldIrql)
#define KeReleaseSpinLock(sl, irql)
#define KeLowerIrql(oldIrql)
#define KeSetEvent(pEvt, foo, foo2)
#define KeAcquireSpinLock(sl, irql)
#define KeQuerySystemTime(t)
#define InitializeListHead(ListHead)
#define InterlockedExchangeAdd
#define InterlockedExchangeNoFence64
VOID NTAPI IoBuildPartialMdl(IN PMDL SourceMdl, IN PMDL TargetMdl, IN PVOID VirtualAddress, IN ULONG Length)
VOID NTAPI IoFreeWorkItem(IN PIO_WORKITEM IoWorkItem)
PIO_WORKITEM NTAPI IoAllocateWorkItem(IN PDEVICE_OBJECT DeviceObject)
#define IoSetCompletionRoutine(_Irp, _CompletionRoutine, _Context, _InvokeOnSuccess, _InvokeOnError, _InvokeOnCancel)
NTKRNLVISTAAPI USHORT NTAPI KeQueryHighestNodeNumber()
NTKRNLVISTAAPI USHORT NTAPI KeGetCurrentNodeNumber()
#define _In_reads_bytes_(s)
#define _Analysis_assume_
#define Int64ShrlMod32(a, b)
#define RTL_SIZEOF_THROUGH_FIELD(type, field)
#define UNREFERENCED_PARAMETER(P)
_In_ ULONG _In_ ULONG _In_ ULONG Length
enum _STORAGE_PROPERTY_ID STORAGE_PROPERTY_ID
@ StorageDeviceIoCapabilityProperty
* PSTORAGE_DEVICE_IO_CAPABILITY_DESCRIPTOR
* PSTORAGE_ADAPTER_DESCRIPTOR
VOID NTAPI IoStartNextPacket(IN PDEVICE_OBJECT DeviceObject, IN BOOLEAN Cancelable)
PIRP NTAPI IoAllocateIrp(IN CCHAR StackSize, IN BOOLEAN ChargeQuota)
VOID NTAPI IoReuseIrp(IN OUT PIRP Irp, IN NTSTATUS Status)
IO_PAGING_PRIORITY FASTCALL IoGetPagingIoPriority(IN PIRP Irp)
VOID NTAPI IoFreeIrp(IN PIRP Irp)
VOID NTAPI IoSetHardErrorOrVerifyDevice(IN PIRP Irp, IN PDEVICE_OBJECT DeviceObject)
#define STATUS_INTEGER_OVERFLOW
#define SERVICE_ACTION_POPULATE_TOKEN
#define SCSIOP_RECEIVE_ROD_TOKEN_INFORMATION
#define SERVICE_ACTION_RECEIVE_TOKEN_INFORMATION
#define REVERSE_BYTES_QUAD(Destination, Source)
#define SCSIOP_POPULATE_TOKEN
#define SCSIOP_WRITE_USING_TOKEN
#define SERVICE_ACTION_WRITE_USING_TOKEN
#define SCSIOP_READ_CAPACITY16
#define SENSE_BUFFER_SIZE_EX
#define REVERSE_BYTES(Destination, Source)
#define SRB_TYPE_STORAGE_REQUEST_BLOCK
NTKRNLVISTAAPI VOID IoSetMasterIrpStatus(_Inout_ PIRP MasterIrp, _In_ NTSTATUS Status)
NTKRNLVISTAAPI VOID NTAPI IoQueueWorkItemEx(_Inout_ PIO_WORKITEM IoWorkItem, _In_ PIO_WORKITEM_ROUTINE_EX WorkerRoutine, _In_ WORK_QUEUE_TYPE QueueType, _In_opt_ __drv_aliasesMem PVOID Context)
#define STATUS_MORE_PROCESSING_REQUIRED
FORCEINLINE VOID SrbSetSrbFlags(_In_ PVOID Srb, _In_ ULONG Flags)
FORCEINLINE VOID SrbSetRequestAttribute(_In_ PVOID Srb, _In_ UCHAR RequestAttribute)
FORCEINLINE VOID SrbAssignSrbFlags(_In_ PVOID Srb, _In_ ULONG Flags)
FORCEINLINE VOID SrbSetQueueSortKey(_In_ PVOID Srb, _In_ ULONG QueueSortKey)
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 SrbSetDataBuffer(_In_ PVOID Srb, _In_opt_ __drv_aliasesMem PVOID DataBuffer)
FORCEINLINE VOID SrbSetCdbLength(_In_ PVOID Srb, _In_ UCHAR CdbLength)
FORCEINLINE PVOID SrbGetDataBuffer(_In_ PVOID Srb)
FORCEINLINE VOID SrbSetTimeOutValue(_In_ PVOID Srb, _In_ ULONG TimeOutValue)
FORCEINLINE PVOID SrbGetSenseInfoBuffer(_In_ PVOID Srb)
FORCEINLINE UCHAR SrbGetSenseInfoBufferLength(_In_ PVOID Srb)
FORCEINLINE ULONG SrbGetDataTransferLength(_In_ PVOID Srb)
#define TRACE_LEVEL_WARNING
#define TRACE_LEVEL_VERBOSE
#define TRACE_LEVEL_ERROR
#define TRACE_LEVEL_INFORMATION
PCLASS_WORKING_SET WorkingSet
PDRIVER_STARTIO ClassStartIo
LARGE_INTEGER LastIoCompletionTime
BOOLEAN IdlePrioritySupported
ULONG MaxInterleavedNormalIo
ULONG LocalMinWorkingSetTransferPackets
ULONG LocalMaxWorkingSetTransferPackets
UCHAR MaxNumberOfIoRetries
LIST_ENTRY DeferredClientIrpList
LARGE_INTEGER LongestThrottlePeriod
PSTORAGE_REQUEST_BLOCK_HEADER SrbTemplate
PCLASS_INTERPRET_SENSE_INFO2 InterpretSenseInfo
PPNL_SLIST_HEADER FreeTransferPacketsLists
LARGE_INTEGER ThrottleStartTime
ULONG NumHighPriorityPagingIo
LARGE_INTEGER LastNonIdleIoTime
LARGE_INTEGER ThrottleStopTime
BOOLEAN LoggedTURFailureSinceLastIO
LIST_ENTRY AllTransferPacketsList
PCLASS_DRIVER_EXTENSION DriverExtension
PDEVICE_OBJECT LowerDeviceObject
struct _FUNCTIONAL_DEVICE_EXTENSION * PartitionZeroExtension
COMMON_DEVICE_EXTENSION CommonExtension
PSTORAGE_ADAPTER_DESCRIPTOR AdapterDescriptor
union _IO_STACK_LOCATION::@1581 Parameters
struct _IO_STACK_LOCATION::@3980::@4002 Scsi
struct _IO_STACK_LOCATION::@3980::@3984 Read
ULONG dwOSVersionInfoSize
LARGE_INTEGER TargetLocationCopy
PSTORAGE_REQUEST_BLOCK_HEADER Srb
SENSE_DATA_EX SrbErrorSenseData
UCHAR NumIoTimeoutRetries
UCHAR NumThinProvisioningRetries
BOOLEAN DriverUsesStartIO
PSRB_HISTORY RetryHistory
BOOLEAN CompleteOriginalIrpWhenLastPacketCompletes
PVOID ContinuationContext
ULONG LowMemRetry_remainingBufLen
LIST_ENTRY AllPktsListEntry
PCONTINUATION_ROUTINE ContinuationRoutine
#define RtlCopyMemory(Destination, Source, Length)
#define RtlZeroMemory(Destination, Length)
#define CONTAINING_RECORD(address, type, field)
#define STATUS_UNSUCCESSFUL
#define STATUS_INSUFFICIENT_RESOURCES
struct _CDB::_CDB10 CDB10
struct _CDB::_MEDIA_REMOVAL MEDIA_REMOVAL
struct _CDB::_MODE_SELECT MODE_SELECT
struct _CDB::_TOKEN_OPERATION TOKEN_OPERATION
struct _CDB::_START_STOP START_STOP
struct _CDB::_MODE_SENSE MODE_SENSE
struct _CDB::_RECEIVE_TOKEN_INFORMATION RECEIVE_TOKEN_INFORMATION
struct _CDB::_CDB16 CDB16
_Must_inspect_result_ _In_ WDFDEVICE Fdo
__drv_aliasesMem FORCEINLINE PIO_STACK_LOCATION IoGetNextIrpStackLocation(_In_ PIRP Irp)
#define IoIsErrorUserInduced(Status)
enum _IO_PAGING_PRIORITY IO_PAGING_PRIORITY
_In_opt_ PVOID _In_ PIO_WORKITEM IoWorkItem
@ IoPagingPriorityInvalid
#define IO_DISK_INCREMENT
#define IRP_SYNCHRONOUS_PAGING_IO
#define BYTES_TO_PAGES(Size)
#define MmPrepareMdlForReuse(_Mdl)
#define InterlockedPushEntrySList(SListHead, SListEntry)
#define InterlockedPopEntrySList(SListHead)
FORCEINLINE VOID InitializeSListHead(_Out_ PSLIST_HEADER SListHead)
#define VER_NT_DOMAIN_CONTROLLER
_IRQL_requires_same_ _In_ CLONG ByteSize
struct _OSVERSIONINFOEXW OSVERSIONINFOEXW
VOID CleanupTransferPacketToWorkingSetSize(_In_ PDEVICE_OBJECT Fdo, _In_ BOOLEAN LimitNumPktToDelete, _In_ ULONG Node)
VOID SetupModeSenseTransferPacket(TRANSFER_PACKET *Pkt, PKEVENT SyncEventPtr, PVOID ModeSenseBuffer, UCHAR ModeSenseBufferLen, UCHAR PageMode, UCHAR SubPage, PIRP OriginalIrp, UCHAR PageControl)
VOID EnqueueFreeTransferPacket(PDEVICE_OBJECT Fdo, __drv_aliasesMem PTRANSFER_PACKET Pkt)
NTSTATUS InitializeTransferPackets(PDEVICE_OBJECT Fdo)
PTRANSFER_PACKET DequeueFreeTransferPacket(PDEVICE_OBJECT Fdo, BOOLEAN AllocIfNeeded)
VOID SetupReadWriteTransferPacket(PTRANSFER_PACKET Pkt, PVOID Buf, ULONG Len, LARGE_INTEGER DiskLocation, PIRP OriginalIrp)
VOID SetupDriveCapacityTransferPacket(TRANSFER_PACKET *Pkt, PVOID ReadCapacityBuffer, ULONG ReadCapacityBufferLen, PKEVENT SyncEventPtr, PIRP OriginalIrp, BOOLEAN Use16ByteCdb)
VOID DestroyAllTransferPackets(PDEVICE_OBJECT Fdo)
VOID DestroyTransferPacket(_In_ __drv_freesMem(mem) PTRANSFER_PACKET Pkt)
VOID SetupModeSelectTransferPacket(TRANSFER_PACKET *Pkt, PKEVENT SyncEventPtr, PVOID ModeSelectBuffer, UCHAR ModeSelectBufferLen, BOOLEAN SavePages, PIRP OriginalIrp)
NTSTATUS SubmitTransferPacket(PTRANSFER_PACKET Pkt)
PTRANSFER_PACKET DequeueFreeTransferPacketEx(_In_ PDEVICE_OBJECT Fdo, _In_ BOOLEAN AllocIfNeeded, _In_ ULONG Node)
VOID SetupEjectionTransferPacket(TRANSFER_PACKET *Pkt, BOOLEAN PreventMediaRemoval, PKEVENT SyncEventPtr, PIRP OriginalIrp)