33#if (NTDDI_VERSION >= NTDDI_WIN8)
34#define SCSI_MAXIMUM_BUSES_PER_ADAPTER 255
36#define SCSI_MAXIMUM_TARGETS_PER_BUS 128
37#define SCSI_MAXIMUM_LUNS_PER_TARGET 255
38#define SCSI_MINIMUM_PHYSICAL_BREAKS 16
39#define SCSI_MAXIMUM_PHYSICAL_BREAKS 255
43#define SCSI_MAXIMUM_BUSES 8
44#define SCSI_MAXIMUM_TARGETS 8
45#define SCSI_MAXIMUM_LOGICAL_UNITS 8
48#define SCSI_DMA64_MINIPORT_SUPPORTED 0x01
49#define SCSI_DMA64_SYSTEM_SUPPORTED 0x80
50#if (NTDDI_VERSION > NTDDI_WS03SP1)
51#define SCSI_DMA64_MINIPORT_FULL64BIT_SUPPORTED 0x02
54#define SP_UNINITIALIZED_VALUE ((ULONG) ~0)
55#define SP_UNTAGGED ((UCHAR) ~0)
58#define SRBEV_BUS_RESET 0x0001
59#define SRBEV_SCSI_ASYNC_NOTIFICATION 0x0002
61#define MAXIMUM_CDB_SIZE 12
64#define DebugPrint(x) ScsiDebugPrint x
69#define SCSI_COMBINE_BUS_TARGET(Bus, Target)( \
70 ((((UCHAR) (Target)) & ~(0x20 - 1)) << 8) | \
71 (((UCHAR) (Bus)) << 5) | \
72 (((UCHAR) (Target)) & (0x20 - 1)))
74#define SCSI_DECODE_BUS_TARGET(Value, Bus, Target)( \
75 Bus = (UCHAR) ((Value) >> 5), \
76 Target = (UCHAR) ((((Value) >> 8) & ~(0x20 - 1)) | ((Value) & (0x20 - 1))))
79#define SRB_FUNCTION_EXECUTE_SCSI 0x00
80#define SRB_FUNCTION_CLAIM_DEVICE 0x01
81#define SRB_FUNCTION_IO_CONTROL 0x02
82#define SRB_FUNCTION_RECEIVE_EVENT 0x03
83#define SRB_FUNCTION_RELEASE_QUEUE 0x04
84#define SRB_FUNCTION_ATTACH_DEVICE 0x05
85#define SRB_FUNCTION_RELEASE_DEVICE 0x06
86#define SRB_FUNCTION_SHUTDOWN 0x07
87#define SRB_FUNCTION_FLUSH 0x08
88#define SRB_FUNCTION_PROTOCOL_COMMAND 0x09
89#define SRB_FUNCTION_ABORT_COMMAND 0x10
90#define SRB_FUNCTION_RELEASE_RECOVERY 0x11
91#define SRB_FUNCTION_RESET_BUS 0x12
92#define SRB_FUNCTION_RESET_DEVICE 0x13
93#define SRB_FUNCTION_TERMINATE_IO 0x14
94#define SRB_FUNCTION_FLUSH_QUEUE 0x15
95#define SRB_FUNCTION_REMOVE_DEVICE 0x16
96#define SRB_FUNCTION_WMI 0x17
97#define SRB_FUNCTION_LOCK_QUEUE 0x18
98#define SRB_FUNCTION_UNLOCK_QUEUE 0x19
99#define SRB_FUNCTION_QUIESCE_DEVICE 0x1a
100#define SRB_FUNCTION_RESET_LOGICAL_UNIT 0x20
101#define SRB_FUNCTION_SET_LINK_TIMEOUT 0x21
102#define SRB_FUNCTION_LINK_TIMEOUT_OCCURRED 0x22
103#define SRB_FUNCTION_LINK_TIMEOUT_COMPLETE 0x23
104#define SRB_FUNCTION_POWER 0x24
105#define SRB_FUNCTION_PNP 0x25
106#define SRB_FUNCTION_DUMP_POINTERS 0x26
107#define SRB_FUNCTION_FREE_DUMP_POINTERS 0x27
108#define SRB_FUNCTION_STORAGE_REQUEST_BLOCK 0x28
109#define SRB_FUNCTION_CRYPTO_OPERATION 0x29
110#define SRB_FUNCTION_GET_DUMP_INFO 0x2a
111#define SRB_FUNCTION_FREE_DUMP_INFO 0x2b
114#define SRB_STATUS_PENDING 0x00
115#define SRB_STATUS_SUCCESS 0x01
116#define SRB_STATUS_ABORTED 0x02
117#define SRB_STATUS_ABORT_FAILED 0x03
118#define SRB_STATUS_ERROR 0x04
119#define SRB_STATUS_BUSY 0x05
120#define SRB_STATUS_INVALID_REQUEST 0x06
121#define SRB_STATUS_INVALID_PATH_ID 0x07
122#define SRB_STATUS_NO_DEVICE 0x08
123#define SRB_STATUS_TIMEOUT 0x09
124#define SRB_STATUS_SELECTION_TIMEOUT 0x0A
125#define SRB_STATUS_COMMAND_TIMEOUT 0x0B
126#define SRB_STATUS_MESSAGE_REJECTED 0x0D
127#define SRB_STATUS_BUS_RESET 0x0E
128#define SRB_STATUS_PARITY_ERROR 0x0F
129#define SRB_STATUS_REQUEST_SENSE_FAILED 0x10
130#define SRB_STATUS_NO_HBA 0x11
131#define SRB_STATUS_DATA_OVERRUN 0x12
132#define SRB_STATUS_UNEXPECTED_BUS_FREE 0x13
133#define SRB_STATUS_PHASE_SEQUENCE_FAILURE 0x14
134#define SRB_STATUS_BAD_SRB_BLOCK_LENGTH 0x15
135#define SRB_STATUS_REQUEST_FLUSHED 0x16
136#define SRB_STATUS_INVALID_LUN 0x20
137#define SRB_STATUS_INVALID_TARGET_ID 0x21
138#define SRB_STATUS_BAD_FUNCTION 0x22
139#define SRB_STATUS_ERROR_RECOVERY 0x23
140#define SRB_STATUS_NOT_POWERED 0x24
141#define SRB_STATUS_LINK_DOWN 0x25
142#define SRB_STATUS_INSUFFICIENT_RESOURCES 0x26
143#define SRB_STATUS_THROTTLED_REQUEST 0x27
144#define SRB_STATUS_INTERNAL_ERROR 0x30
146#define SRB_STATUS_QUEUE_FROZEN 0x40
147#define SRB_STATUS_AUTOSENSE_VALID 0x80
149#define SRB_STATUS(Status) \
150 (Status & ~(SRB_STATUS_AUTOSENSE_VALID | SRB_STATUS_QUEUE_FROZEN))
153#define SRB_FLAGS_QUEUE_ACTION_ENABLE 0x00000002
154#define SRB_FLAGS_DISABLE_DISCONNECT 0x00000004
155#define SRB_FLAGS_DISABLE_SYNCH_TRANSFER 0x00000008
156#define SRB_FLAGS_BYPASS_FROZEN_QUEUE 0x00000010
157#define SRB_FLAGS_DISABLE_AUTOSENSE 0x00000020
158#define SRB_FLAGS_DATA_IN 0x00000040
159#define SRB_FLAGS_DATA_OUT 0x00000080
160#define SRB_FLAGS_NO_DATA_TRANSFER 0x00000000
161#define SRB_FLAGS_UNSPECIFIED_DIRECTION (SRB_FLAGS_DATA_IN | SRB_FLAGS_DATA_OUT)
162#define SRB_FLAGS_NO_QUEUE_FREEZE 0x00000100
163#define SRB_FLAGS_ADAPTER_CACHE_ENABLE 0x00000200
164#define SRB_FLAGS_FREE_SENSE_BUFFER 0x00000400
165#define SRB_FLAGS_D3_PROCESSING 0x00000800
166#define SRB_FLAGS_SEQUENTIAL_REQUIRED 0x00001000
167#define SRB_FLAGS_IS_ACTIVE 0x00010000
168#define SRB_FLAGS_ALLOCATED_FROM_ZONE 0x00020000
169#define SRB_FLAGS_SGLIST_FROM_POOL 0x00040000
170#define SRB_FLAGS_BYPASS_LOCKED_QUEUE 0x00080000
171#define SRB_FLAGS_NO_KEEP_AWAKE 0x00100000
172#define SRB_FLAGS_PORT_DRIVER_ALLOCSENSE 0x00200000
173#define SRB_FLAGS_PORT_DRIVER_SENSEHASPORT 0x00400000
174#define SRB_FLAGS_DONT_START_NEXT_PACKET 0x00800000
175#define SRB_FLAGS_PORT_DRIVER_RESERVED 0x0F000000
176#define SRB_FLAGS_CLASS_DRIVER_RESERVED 0xF0000000
179#define SCSI_PORT_SIGNATURE 0x54524f50
182#define SRB_SIMPLE_TAG_REQUEST 0x20
183#define SRB_HEAD_OF_QUEUE_TAG_REQUEST 0x21
184#define SRB_ORDERED_QUEUE_TAG_REQUEST 0x22
186#define SRB_WMI_FLAGS_ADAPTER_REQUEST 0x0001
187#define SRB_POWER_FLAGS_ADAPTER_REQUEST 0x0001
188#define SRB_PNP_FLAGS_ADAPTER_REQUEST 0x0001
190#define SP_BUS_PARITY_ERROR 0x0001
191#define SP_UNEXPECTED_DISCONNECT 0x0002
192#define SP_INVALID_RESELECTION 0x0003
193#define SP_BUS_TIME_OUT 0x0004
194#define SP_PROTOCOL_ERROR 0x0005
195#define SP_INTERNAL_ADAPTER_ERROR 0x0006
196#define SP_REQUEST_TIMEOUT 0x0007
197#define SP_IRQ_NOT_RESPONDING 0x0008
198#define SP_BAD_FW_WARNING 0x0009
199#define SP_BAD_FW_ERROR 0x000a
200#define SP_LOST_WMI_MINIPORT_REQUEST 0x000b
202#define SP_VER_TRACE_SUPPORT 0x0010
204#define SP_RETURN_NOT_FOUND 0
205#define SP_RETURN_FOUND 1
206#define SP_RETURN_ERROR 2
207#define SP_RETURN_BAD_CONFIG 3
271#define CONFIG_INFO_VERSION_2 sizeof(PORT_CONFIGURATION_INFORMATION)
327#define SCSI_REQUEST_BLOCK_SIZE sizeof(SCSI_REQUEST_BLOCK)
349#if (NTDDI_VERSION >= NTDDI_WS03SP1) && defined(_WIN64)
447#if (NTDDI_VERSION >= NTDDI_WIN8)
449#define SRB_ALIGN DECLSPEC_ALIGN(8)
450#define POINTER_ALIGN DECLSPEC_ALIGN(8)
476#define SRBEX_DATA_BIDIRECTIONAL_LENGTH ((2 * sizeof(ULONG)) + sizeof(PVOID))
489#define SRBEX_DATA_SCSI_CDB16_LENGTH ((20 * sizeof(UCHAR)) + sizeof(ULONG) + sizeof(PVOID))
506#define SRBEX_DATA_SCSI_CDB32_LENGTH ((36 * sizeof(UCHAR)) + sizeof(ULONG) + sizeof(PVOID))
523#define SRBEX_DATA_SCSI_CDB_VAR_LENGTH_MIN ((4 * sizeof(UCHAR)) + (3 * sizeof(ULONG)) + sizeof(PVOID))
524#define SRBEX_DATA_SCSI_CDB_VAR_LENGTH_MAX 0xffffffffUL
542#define SRBEX_DATA_WMI_LENGTH ((4 * sizeof(UCHAR)) + sizeof(ULONG) + sizeof(PVOID))
556#define SRBEX_DATA_POWER_LENGTH ((4 * sizeof(UCHAR)) + sizeof(STOR_DEVICE_POWER_STATE) + sizeof(STOR_POWER_ACTION))
569#define SRBEX_DATA_PNP_LENGTH ((4 * sizeof(UCHAR)) + sizeof(STOR_PNP_ACTION) + (2 * sizeof(ULONG)))
583#define SRBEX_DATA_IO_INFO_LENGTH ((5 * sizeof(ULONG)) + (4 * sizeof(UCHAR)))
585#define REQUEST_INFO_NO_CACHE_FLAG 0x00000001
586#define REQUEST_INFO_PAGING_IO_FLAG 0x00000002
587#define REQUEST_INFO_SEQUENTIAL_IO_FLAG 0x00000004
588#define REQUEST_INFO_TEMPORARY_FLAG 0x00000008
589#define REQUEST_INFO_WRITE_THROUGH_FLAG 0x00000010
590#define REQUEST_INFO_HYBRID_WRITE_THROUGH_FLAG 0x00000020
592#if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
594#define REQUEST_INFO_NO_FILE_OBJECT_FLAG 0x00000040
595#define REQUEST_INFO_VOLSNAP_IO_FLAG 0x00000080
596#define REQUEST_INFO_STREAM_FLAG 0x00000100
600#define REQUEST_INFO_VALID_CACHEPRIORITY_FLAG 0x80000000
616#define SRB_SIGNATURE 0x53524258
617#define STORAGE_REQUEST_BLOCK_VERSION_1 0x1
631 UCHAR ReservedUchar[4];
649 ULONG DataTransferLength;
663#define SRB_TYPE_SCSI_REQUEST_BLOCK 0
664#define SRB_TYPE_STORAGE_REQUEST_BLOCK 1
666#define STORAGE_ADDRESS_TYPE_BTL8 0
783#define SCSIPORT_API DECLSPEC_IMPORT
803#define ScsiPortConvertPhysicalAddressToUlong(Address) ((Address).LowPart)
804#define ScsiPortConvertPhysicalAddressToULongPtr(Address) ((ULONG_PTR)((Address).QuadPart))
979 ULONG DebugPrintLevel,
985#define ScsiPortReadPortUchar READ_PORT_UCHAR
986#define ScsiPortReadPortUshort READ_PORT_USHORT
987#define ScsiPortReadPortUlong READ_PORT_ULONG
989#define ScsiPortReadPortBufferUchar READ_PORT_BUFFER_UCHAR
990#define ScsiPortReadPortBufferUshort READ_PORT_BUFFER_USHORT
991#define ScsiPortReadPortBufferUlong READ_PORT_BUFFER_ULONG
993#define ScsiPortReadRegisterUchar READ_REGISTER_UCHAR
994#define ScsiPortReadRegisterUshort READ_REGISTER_USHORT
995#define ScsiPortReadRegisterUlong READ_REGISTER_ULONG
997#define ScsiPortReadRegisterBufferUchar READ_REGISTER_BUFFER_UCHAR
998#define ScsiPortReadRegisterBufferUshort READ_REGISTER_BUFFER_USHORT
999#define ScsiPortReadRegisterBufferUlong READ_REGISTER_BUFFER_ULONG
1001#define ScsiPortWritePortUchar WRITE_PORT_UCHAR
1002#define ScsiPortWritePortUshort WRITE_PORT_USHORT
1003#define ScsiPortWritePortUlong WRITE_PORT_ULONG
1005#define ScsiPortWritePortBufferUchar WRITE_PORT_BUFFER_UCHAR
1006#define ScsiPortWritePortBufferUshort WRITE_PORT_BUFFER_USHORT
1007#define ScsiPortWritePortBufferUlong WRITE_PORT_BUFFER_ULONG
1009#define ScsiPortWriteRegisterUchar WRITE_REGISTER_UCHAR
1010#define ScsiPortWriteRegisterUshort WRITE_REGISTER_USHORT
1011#define ScsiPortWriteRegisterUlong WRITE_REGISTER_ULONG
1013#define ScsiPortWriteRegisterBufferUchar WRITE_REGISTER_BUFFER_UCHAR
1014#define ScsiPortWriteRegisterBufferUshort WRITE_REGISTER_BUFFER_USHORT
1015#define ScsiPortWriteRegisterBufferUlong WRITE_REGISTER_BUFFER_ULONG
1017#define ScsiPortMoveMemory memmove
#define WriteBuffer(BaseIoAddress, Buffer, Count)
#define ReadBuffer(BaseIoAddress, Buffer, Count)
_In_ PSCSI_REQUEST_BLOCK Srb
_In_ PSCSI_REQUEST_BLOCK _In_opt_ PVOID _In_ ULONG _In_ BOOLEAN _In_opt_ WDFREQUEST OriginalRequest
_In_ CDROM_SCAN_FOR_SPECIAL_INFO _In_ PCDROM_SCAN_FOR_SPECIAL_HANDLER Function
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR _In_ UCHAR _In_ UCHAR Lun
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR PathId
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR _In_ UCHAR TargetId
static const WCHAR Signature[]
struct _SCSI_SUPPORTED_CONTROL_TYPE_LIST SCSI_SUPPORTED_CONTROL_TYPE_LIST
SCSIPORT_API VOID NTAPI ScsiPortLogError(IN PVOID HwDeviceExtension, IN PSCSI_REQUEST_BLOCK Srb OPTIONAL, IN UCHAR PathId, IN UCHAR TargetId, IN UCHAR Lun, IN ULONG ErrorCode, IN ULONG UniqueId)
SCSIPORT_API BOOLEAN NTAPI ScsiPortValidateRange(IN PVOID HwDeviceExtension, IN INTERFACE_TYPE BusType, IN ULONG SystemIoBusNumber, IN SCSI_PHYSICAL_ADDRESS IoAddress, IN ULONG NumberOfBytes, IN BOOLEAN InIoSpace)
VOID(NTAPI * PHW_DMA_STARTED)(IN PVOID DeviceExtension)
struct _SCSI_REQUEST_BLOCK SCSI_REQUEST_BLOCK
BOOLEAN(NTAPI * PHW_INTERRUPT)(IN PVOID DeviceExtension)
struct _ACCESS_RANGE ACCESS_RANGE
SCSIPORT_API VOID NTAPI ScsiPortReadPortBufferUshort(IN PUSHORT Port, IN PUSHORT Buffer, IN ULONG Count)
_SCSI_ADAPTER_CONTROL_TYPE
@ ScsiQuerySupportedControlTypes
@ MakeAdapterControlTypeSizeOfUlong
SCSIPORT_API VOID NTAPI ScsiPortReadRegisterBufferUshort(IN PUSHORT Register, IN PUSHORT Buffer, IN ULONG Count)
PHYSICAL_ADDRESS SCSI_PHYSICAL_ADDRESS
struct _PORT_CONFIGURATION_INFORMATION * PPORT_CONFIGURATION_INFORMATION
enum _SCSI_NOTIFICATION_TYPE * PSCSI_NOTIFICATION_TYPE
SCSIPORT_API VOID NTAPI ScsiPortWritePortBufferUshort(IN PUSHORT Port, IN PUSHORT Buffer, IN ULONG Count)
enum _SCSI_NOTIFICATION_TYPE SCSI_NOTIFICATION_TYPE
SCSIPORT_API ULONG NTAPI ScsiPortReadPortUlong(IN PULONG Port)
SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterUlong(IN PULONG Register, IN ULONG Value)
SCSIPORT_API VOID NTAPI ScsiPortFreeDeviceBase(IN PVOID HwDeviceExtension, IN PVOID MappedAddress)
SCSIPORT_API USHORT NTAPI ScsiPortReadPortUshort(IN PUSHORT Port)
SCSIPORT_API VOID NTAPI ScsiPortWritePortBufferUchar(IN PUCHAR Port, IN PUCHAR Buffer, IN ULONG Count)
SCSIPORT_API VOID NTAPI ScsiPortMoveMemory(IN PVOID WriteBuffer, IN PVOID ReadBuffer, IN ULONG Length)
_SCSI_ADAPTER_CONTROL_STATUS
@ ScsiAdapterControlSuccess
@ ScsiAdapterControlUnsuccessful
SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterBufferUlong(IN PULONG Register, IN PULONG Buffer, IN ULONG Count)
struct _HW_INITIALIZATION_DATA * PHW_INITIALIZATION_DATA
VOID(NTAPI * PHW_TIMER)(IN PVOID DeviceExtension)
struct _SCSI_WMI_REQUEST_BLOCK SCSI_WMI_REQUEST_BLOCK
enum _SCSI_ADAPTER_CONTROL_TYPE SCSI_ADAPTER_CONTROL_TYPE
SCSIPORT_API PSCSI_REQUEST_BLOCK NTAPI ScsiPortGetSrb(IN PVOID DeviceExtension, IN UCHAR PathId, IN UCHAR TargetId, IN UCHAR Lun, IN LONG QueueTag)
SCSIPORT_API ULONG NTAPI ScsiPortSetBusDataByOffset(IN PVOID DeviceExtension, IN ULONG BusDataType, IN ULONG SystemIoBusNumber, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Offset, IN ULONG Length)
enum _SCSI_ADAPTER_CONTROL_STATUS SCSI_ADAPTER_CONTROL_STATUS
SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterUchar(IN PUCHAR Register, IN UCHAR Value)
SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterBufferUshort(IN PUSHORT Register, IN PUSHORT Buffer, IN ULONG Count)
SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterUshort(IN PUSHORT Register, IN USHORT Value)
SCSIPORT_API ULONG NTAPI ScsiPortGetBusData(IN PVOID DeviceExtension, IN ULONG BusDataType, IN ULONG SystemIoBusNumber, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Length)
SCSIPORT_API VOID NTAPI ScsiPortReadPortBufferUchar(IN PUCHAR Port, IN PUCHAR Buffer, IN ULONG Count)
SCSIPORT_API ULONG NTAPI ScsiPortReadRegisterUlong(IN PULONG Register)
SCSIPORT_API SCSI_PHYSICAL_ADDRESS NTAPI ScsiPortConvertUlongToPhysicalAddress(ULONG UlongAddress)
SCSIPORT_API VOID NTAPI ScsiPortCompleteRequest(IN PVOID HwDeviceExtension, IN UCHAR PathId, IN UCHAR TargetId, IN UCHAR Lun, IN UCHAR SrbStatus)
struct _HW_INITIALIZATION_DATA HW_INITIALIZATION_DATA
SCSIPORT_API PVOID NTAPI ScsiPortGetVirtualAddress(IN PVOID HwDeviceExtension, IN SCSI_PHYSICAL_ADDRESS PhysicalAddress)
struct _SCSI_SUPPORTED_CONTROL_TYPE_LIST * PSCSI_SUPPORTED_CONTROL_TYPE_LIST
SCSIPORT_API VOID NTAPI ScsiPortFlushDma(IN PVOID DeviceExtension)
SCSIPORT_API VOID __cdecl ScsiDebugPrint(ULONG DebugPrintLevel, PCCHAR DebugMessage,...)
SCSIPORT_API VOID NTAPI ScsiPortReadPortBufferUlong(IN PULONG Port, IN PULONG Buffer, IN ULONG Count)
SCSIPORT_API PVOID NTAPI ScsiPortGetLogicalUnit(IN PVOID HwDeviceExtension, IN UCHAR PathId, IN UCHAR TargetId, IN UCHAR Lun)
BOOLEAN(NTAPI * PHW_STARTIO)(IN PVOID DeviceExtension, IN PSCSI_REQUEST_BLOCK Srb)
BOOLEAN(NTAPI * PHW_ADAPTER_STATE)(IN PVOID DeviceExtension, IN PVOID Context, IN BOOLEAN SaveState)
SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterBufferUchar(IN PUCHAR Register, IN PUCHAR Buffer, IN ULONG Count)
BOOLEAN(NTAPI * PHW_RESET_BUS)(IN PVOID DeviceExtension, IN ULONG PathId)
SCSIPORT_API PVOID NTAPI ScsiPortGetDeviceBase(IN PVOID HwDeviceExtension, IN INTERFACE_TYPE BusType, IN ULONG SystemIoBusNumber, IN SCSI_PHYSICAL_ADDRESS IoAddress, IN ULONG NumberOfBytes, IN BOOLEAN InIoSpace)
SCSIPORT_API VOID NTAPI ScsiPortWritePortUchar(IN PUCHAR Port, IN UCHAR Value)
SCSIPORT_API USHORT NTAPI ScsiPortReadRegisterUshort(IN PUSHORT Register)
SCSIPORT_API VOID NTAPI ScsiPortIoMapTransfer(IN PVOID HwDeviceExtension, IN PSCSI_REQUEST_BLOCK Srb, IN PVOID LogicalAddress, IN ULONG Length)
SCSIPORT_API ULONG NTAPI ScsiPortInitialize(IN PVOID Argument1, IN PVOID Argument2, IN struct _HW_INITIALIZATION_DATA *HwInitializationData, IN PVOID HwContext)
SCSIPORT_API VOID __cdecl ScsiPortNotification(IN SCSI_NOTIFICATION_TYPE NotificationType, IN PVOID HwDeviceExtension,...)
#define ScsiPortConvertPhysicalAddressToUlong(Address)
struct _SCSI_REQUEST_BLOCK * PSCSI_REQUEST_BLOCK
SCSIPORT_API VOID NTAPI ScsiPortStallExecution(IN ULONG Delay)
PHYSICAL_ADDRESS * PSCSI_PHYSICAL_ADDRESS
struct _PORT_CONFIGURATION_INFORMATION PORT_CONFIGURATION_INFORMATION
SCSIPORT_API VOID NTAPI ScsiPortWritePortUshort(IN PUSHORT Port, IN USHORT Value)
struct _SCSI_WMI_REQUEST_BLOCK * PSCSI_WMI_REQUEST_BLOCK
SCSI_ADAPTER_CONTROL_STATUS(NTAPI * PHW_ADAPTER_CONTROL)(IN PVOID DeviceExtension, IN SCSI_ADAPTER_CONTROL_TYPE ControlType, IN PVOID Parameters)
SCSIPORT_API VOID NTAPI ScsiPortWritePortBufferUlong(IN PULONG Port, IN PULONG Buffer, IN ULONG Count)
SCSIPORT_API VOID NTAPI ScsiPortReadRegisterBufferUlong(IN PULONG Register, IN PULONG Buffer, IN ULONG Count)
SCSIPORT_API UCHAR NTAPI ScsiPortReadRegisterUchar(IN PUCHAR Register)
enum _SCSI_ADAPTER_CONTROL_TYPE * PSCSI_ADAPTER_CONTROL_TYPE
SCSIPORT_API VOID NTAPI ScsiPortWritePortUlong(IN PULONG Port, IN ULONG Value)
enum _SCSI_ADAPTER_CONTROL_STATUS * PSCSI_ADAPTER_CONTROL_STATUS
SCSIPORT_API SCSI_PHYSICAL_ADDRESS NTAPI ScsiPortGetPhysicalAddress(IN PVOID HwDeviceExtension, IN PSCSI_REQUEST_BLOCK Srb, IN PVOID VirtualAddress, OUT ULONG *Length)
SCSIPORT_API UCHAR NTAPI ScsiPortReadPortUchar(IN PUCHAR Port)
SCSIPORT_API PVOID NTAPI ScsiPortGetUncachedExtension(IN PVOID HwDeviceExtension, IN PPORT_CONFIGURATION_INFORMATION ConfigInfo, IN ULONG NumberOfBytes)
ULONG(NTAPI * PHW_FIND_ADAPTER)(IN PVOID DeviceExtension, IN PVOID HwContext, IN PVOID BusInformation, IN PCHAR ArgumentString, IN OUT PPORT_CONFIGURATION_INFORMATION ConfigInfo, OUT PBOOLEAN Again)
SCSIPORT_API VOID NTAPI ScsiPortReadRegisterBufferUchar(IN PUCHAR Register, IN PUCHAR Buffer, IN ULONG Count)
struct _ACCESS_RANGE * PACCESS_RANGE
BOOLEAN(NTAPI * PHW_INITIALIZE)(IN PVOID DeviceExtension)
#define _IRQL_requires_max_(irql)
enum _INTERFACE_TYPE INTERFACE_TYPE
#define _In_reads_bytes_(size)
#define _Field_size_(size)
#define _Field_size_bytes_full_(size)
#define _Struct_size_bytes_(size)
#define _Must_inspect_result_
#define _Field_range_(min, max)
#define _At_buffer_(target, iter, bound, annos)
_In_ NDIS_ERROR_CODE ErrorCode
_In_ ULONG _In_ ULONG Offset
_In_ ULONG _In_ ULONG _In_ ULONG Length
_In_opt_ WDFREQUEST _In_ ULONG _In_ BOOLEAN _In_ PCDB Cdb
enum _KINTERRUPT_MODE KINTERRUPT_MODE
enum _DMA_SPEED DMA_SPEED
enum _DMA_WIDTH DMA_WIDTH
_In_ UCHAR SenseInfoBufferLength
struct STOR_ADDRESS_ALIGN _STOR_ADDRESS STOR_ADDRESS
@ StorPowerActionWarmEject
@ StorPowerActionShutdown
@ StorPowerActionReserved
@ StorPowerActionShutdownReset
@ StorPowerActionHibernate
@ StorPowerActionShutdownOff
enum _STOR_PNP_ACTION STOR_PNP_ACTION
struct _SCSI_PNP_REQUEST_BLOCK * PSCSI_PNP_REQUEST_BLOCK
#define SRBEX_DATA_SCSI_CDB32_LENGTH
enum _STOR_PNP_ACTION * PSTOR_PNP_ACTION
@ StorQueryResourceRequirements
@ StorFilterResourceRequirements
struct SRB_ALIGN _SRBEX_DATA_SCSI_CDB_VAR SRBEX_DATA_SCSI_CDB_VAR
struct SRB_ALIGN _SRBEX_DATA_BIDIRECTIONAL * PSRBEX_DATA_BIDIRECTIONAL
enum _STOR_DEVICE_POWER_STATE * PSTOR_DEVICE_POWER_STATE
struct SRB_ALIGN _SRBEX_DATA_IO_INFO SRBEX_DATA_IO_INFO
struct SRB_ALIGN _SRBEX_DATA_SCSI_CDB_VAR * PSRBEX_DATA_SCSI_CDB_VAR
struct SRB_ALIGN _SRBEX_DATA SRBEX_DATA
#define STORAGE_REQUEST_BLOCK_VERSION_1
#define SRBEX_DATA_SCSI_CDB_VAR_LENGTH_MIN
#define SRBEX_DATA_IO_INFO_LENGTH
_Must_inspect_result_ _In_ PVOID _In_ struct _HW_INITIALIZATION_DATA _In_ PVOID HwContext
#define SRBEX_DATA_SCSI_CDB_VAR_LENGTH_MAX
enum _STOR_DEVICE_POWER_STATE STOR_DEVICE_POWER_STATE
struct SRB_ALIGN _SRBEX_DATA_SCSI_CDB16 SRBEX_DATA_SCSI_CDB16
struct _STOR_DEVICE_CAPABILITIES STOR_DEVICE_CAPABILITIES
struct _SCSI_PNP_REQUEST_BLOCK SCSI_PNP_REQUEST_BLOCK
_Must_inspect_result_ _In_ PVOID _In_ struct _HW_INITIALIZATION_DATA * HwInitializationData
struct _STOR_DEVICE_CAPABILITIES * PSTOR_DEVICE_CAPABILITIES
#define SRB_FUNCTION_STORAGE_REQUEST_BLOCK
struct _SCSI_POWER_REQUEST_BLOCK SCSI_POWER_REQUEST_BLOCK
struct _SCSI_POWER_REQUEST_BLOCK * PSCSI_POWER_REQUEST_BLOCK
SCSIPORT_API VOID NTAPI ScsiPortQuerySystemTime(_Out_ PLARGE_INTEGER CurrentTime)
enum _SRBEXDATATYPE * PSRBEXDATATYPE
#define SRBEX_DATA_BIDIRECTIONAL_LENGTH
struct SRB_ALIGN _SRBEX_DATA * PSRBEX_DATA
#define SRBEX_DATA_PNP_LENGTH
struct SRB_ALIGN _SRBEX_DATA_PNP SRBEX_DATA_PNP
struct SRB_ALIGN _SRBEX_DATA_WMI SRBEX_DATA_WMI
enum _STOR_POWER_ACTION * PSTOR_POWER_ACTION
struct SRB_ALIGN _SRBEX_DATA_IO_INFO * PSRBEX_DATA_IO_INFO
enum _STOR_POWER_ACTION STOR_POWER_ACTION
struct SRB_ALIGN _SRBEX_DATA_POWER SRBEX_DATA_POWER
@ SrbExDataTypeMSReservedStart
@ SrbExDataTypeBidirectional
@ SrbExDataTypeScsiCdbVar
#define SRBEX_DATA_POWER_LENGTH
#define SRBEX_DATA_WMI_LENGTH
struct SRB_ALIGN _SRBEX_DATA_BIDIRECTIONAL SRBEX_DATA_BIDIRECTIONAL
struct SRB_ALIGN _SRBEX_DATA_SCSI_CDB16 * PSRBEX_DATA_SCSI_CDB16
struct SRB_ALIGN _SRBEX_DATA_SCSI_CDB32 * PSRBEX_DATA_SCSI_CDB32
struct SRB_ALIGN _SRBEX_DATA_SCSI_CDB32 SRBEX_DATA_SCSI_CDB32
struct SRB_ALIGN _STORAGE_REQUEST_BLOCK_HEADER * PSTORAGE_REQUEST_BLOCK_HEADER
struct SRB_ALIGN _SRBEX_DATA_POWER * PSRBEX_DATA_POWER
struct SRB_ALIGN _SRBEX_DATA_WMI * PSRBEX_DATA_WMI
struct SRB_ALIGN _SRBEX_DATA_PNP * PSRBEX_DATA_PNP
#define SRBEX_DATA_SCSI_CDB16_LENGTH
struct SRB_ALIGN _STORAGE_REQUEST_BLOCK_HEADER STORAGE_REQUEST_BLOCK_HEADER
enum _SRBEXDATATYPE SRBEXDATATYPE
@ StorPowerDeviceUnspecified
enum _STOR_PNP_ACTION STOR_PNP_ACTION
enum _STOR_DEVICE_POWER_STATE STOR_DEVICE_POWER_STATE
enum _STOR_POWER_ACTION STOR_POWER_ACTION
struct _ACCESS_RANGE ACCESS_RANGE
BOOLEAN(STREAMAPI * PHW_INTERRUPT)(IN PVOID DeviceExtension)
SCSI_PHYSICAL_ADDRESS RangeStart
PHW_INTERRUPT HwInterrupt
_ANONYMOUS_UNION union _HW_INITIALIZATION_DATA::@2218 DUMMYUNIONNAME
PHW_ADAPTER_CONTROL HwAdapterControl
PHW_ADAPTER_STATE HwAdapterState
PHW_DMA_STARTED HwDmaStarted
BOOLEAN MultipleRequestPerLu
BOOLEAN NeedPhysicalAddresses
ULONG SpecificLuExtensionSize
ULONG HwInitializationDataSize
PHW_INITIALIZE HwInitialize
ULONG DeviceExtensionSize
INTERFACE_TYPE AdapterInterfaceType
PHW_FIND_ADAPTER HwFindAdapter
ULONG NumberOfAccessRanges
STOR_PNP_ACTION PnPAction
struct _SCSI_REQUEST_BLOCK * NextSrb
STOR_POWER_ACTION PowerAction
struct _SCSI_REQUEST_BLOCK * NextSrb
STOR_DEVICE_POWER_STATE DevicePowerState
UCHAR SenseInfoBufferLength
_ANONYMOUS_UNION union _SCSI_REQUEST_BLOCK::@2217 DUMMYUNIONNAME
_Field_size_bytes_(DataTransferLength) PVOID DataBuffer
struct _SCSI_REQUEST_BLOCK * NextSrb
OUT BOOLEAN SupportedTypeList[0]
ULONG DataInTransferLength
_Field_size_bytes_full_(DataInTransferLength) PVOID POINTER_ALIGN DataInBuffer
_Field_range_(SrbExDataTypeBidirectional, SrbExDataTypeBidirectional) SRBEXDATATYPE Type
_Field_range_(SRBEX_DATA_BIDIRECTIONAL_LENGTH, SRBEX_DATA_BIDIRECTIONAL_LENGTH) ULONG Length
_Field_range_(SRBEX_DATA_IO_INFO_LENGTH, SRBEX_DATA_IO_INFO_LENGTH) ULONG Length
_Field_range_(SrbExDataTypeIoInfo, SrbExDataTypeIoInfo) SRBEXDATATYPE Type
STOR_PNP_ACTION PnPAction
_Field_range_(SRBEX_DATA_PNP_LENGTH, SRBEX_DATA_PNP_LENGTH) ULONG Length
_Field_range_(SrbExDataTypePnP, SrbExDataTypePnP) SRBEXDATATYPE Type
_Field_range_(SRBEX_DATA_POWER_LENGTH, SRBEX_DATA_POWER_LENGTH) ULONG Length
STOR_DEVICE_POWER_STATE DevicePowerState
STOR_POWER_ACTION PowerAction
_Field_range_(SrbExDataTypePower, SrbExDataTypePower) SRBEXDATATYPE Type
_Field_range_(SRBEX_DATA_SCSI_CDB16_LENGTH, SRBEX_DATA_SCSI_CDB16_LENGTH) ULONG Length
_Field_size_bytes_full_(SenseInfoBufferLength) PVOID POINTER_ALIGN SenseInfoBuffer
_Field_range_(SrbExDataTypeScsiCdb16, SrbExDataTypeScsiCdb16) SRBEXDATATYPE Type
UCHAR SenseInfoBufferLength
_Field_range_(SrbExDataTypeScsiCdb32, SrbExDataTypeScsiCdb32) SRBEXDATATYPE Type
_Field_range_(SRBEX_DATA_SCSI_CDB32_LENGTH, SRBEX_DATA_SCSI_CDB32_LENGTH) ULONG Length
_Field_size_bytes_full_(SenseInfoBufferLength) PVOID POINTER_ALIGN SenseInfoBuffer
UCHAR SenseInfoBufferLength
_Field_size_bytes_full_(CdbLength) UCHAR POINTER_ALIGN Cdb[ANYSIZE_ARRAY]
_Field_range_(SRBEX_DATA_SCSI_CDB_VAR_LENGTH_MIN, SRBEX_DATA_SCSI_CDB_VAR_LENGTH_MAX) ULONG Length
_Field_size_bytes_full_(SenseInfoBufferLength) PVOID POINTER_ALIGN SenseInfoBuffer
UCHAR SenseInfoBufferLength
_Field_range_(SrbExDataTypeScsiCdbVar, SrbExDataTypeScsiCdbVar) SRBEXDATATYPE Type
_Field_range_(SrbExDataTypeWmi, SrbExDataTypeWmi) SRBEXDATATYPE Type
_Field_range_(SRBEX_DATA_WMI_LENGTH, SRBEX_DATA_WMI_LENGTH) ULONG Length
PVOID POINTER_ALIGN DataPath
_Field_size_bytes_(Length) UCHAR Data[ANYSIZE_ARRAY]
_In_ WDF_SPECIAL_FILE_TYPE NotificationType
_In_ WDFDEVICE _In_ PPNP_BUS_INFORMATION BusInformation
_Must_inspect_result_ _In_ WDFDMATRANSACTION _In_ PFN_WDF_PROGRAM_DMA _In_ WDF_DMA_DIRECTION _In_ PMDL _In_ PVOID VirtualAddress
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT Version
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
_In_ WDFIORESREQLIST _In_ ULONG SlotNumber
_Reserved_ PVOID Reserved
_IRQL_requires_same_ _In_opt_ PVOID Argument1
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE BusType
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS PhysicalAddress
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes