ReactOS  0.4.15-dev-1392-g3014417
srb.h
Go to the documentation of this file.
1 /*
2  * scsi.h
3  *
4  * Interface between SCSI miniport drivers and the SCSI port driver.
5  *
6  * This file is part of the w32api package.
7  *
8  * Contributors:
9  * Created by Casper S. Hornstrup <chorns@users.sourceforge.net>
10  *
11  * THIS SOFTWARE IS NOT COPYRIGHTED
12  *
13  * This source code is offered for use in the public domain. You may
14  * use, modify or distribute it freely.
15  *
16  * This code is distributed in the hope that it will be useful but
17  * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18  * DISCLAIMED. This includes but is not limited to warranties of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20  *
21  */
22 
23 #ifndef _NTSRB_
24 #define _NTSRB_
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 #define SCSI_MAXIMUM_LOGICAL_UNITS 8
31 #define SCSI_MAXIMUM_TARGETS_PER_BUS 128
32 #define SCSI_MAXIMUM_LUNS_PER_TARGET 255
33 #define SCSI_MAXIMUM_BUSES 8
34 #define SCSI_MINIMUM_PHYSICAL_BREAKS 16
35 #define SCSI_MAXIMUM_PHYSICAL_BREAKS 255
36 #define SCSI_MAXIMUM_TARGETS 8
37 
38 /* PORT_CONFIGURATION_INFORMATION.Dma64BitAddresses constants */
39 #define SCSI_DMA64_MINIPORT_SUPPORTED 0x01
40 #define SCSI_DMA64_SYSTEM_SUPPORTED 0x80
41 #if (NTDDI_VERSION > NTDDI_WS03SP1)
42 #define SCSI_DMA64_MINIPORT_FULL64BIT_SUPPORTED 0x02
43 #endif
44 
45 #define SP_UNINITIALIZED_VALUE ((ULONG) ~0)
46 #define SP_UNTAGGED ((UCHAR) ~0)
47 
48 /* Asynchronous events */
49 #define SRBEV_BUS_RESET 0x0001
50 #define SRBEV_SCSI_ASYNC_NOTIFICATION 0x0002
51 
52 #define MAXIMUM_CDB_SIZE 12
53 
54 #if DBG
55 #define DebugPrint(x) ScsiDebugPrint x
56 #else
57 #define DebugPrint(x)
58 #endif
59 
60 #define SCSI_COMBINE_BUS_TARGET(Bus, Target)( \
61  ((((UCHAR) (Target)) & ~(0x20 - 1)) << 8) | \
62  (((UCHAR) (Bus)) << 5) | \
63  (((UCHAR) (Target)) & (0x20 - 1)))
64 
65 #define SCSI_DECODE_BUS_TARGET(Value, Bus, Target)( \
66  Bus = (UCHAR) ((Value) >> 5), \
67  Target = (UCHAR) ((((Value) >> 8) & ~(0x20 - 1)) | ((Value) & (0x20 - 1))))
68 
69 /* SCSI_REQUEST_BLOCK.Function constants */
70 #define SRB_FUNCTION_EXECUTE_SCSI 0x00
71 #define SRB_FUNCTION_CLAIM_DEVICE 0x01
72 #define SRB_FUNCTION_IO_CONTROL 0x02
73 #define SRB_FUNCTION_RECEIVE_EVENT 0x03
74 #define SRB_FUNCTION_RELEASE_QUEUE 0x04
75 #define SRB_FUNCTION_ATTACH_DEVICE 0x05
76 #define SRB_FUNCTION_RELEASE_DEVICE 0x06
77 #define SRB_FUNCTION_SHUTDOWN 0x07
78 #define SRB_FUNCTION_FLUSH 0x08
79 #define SRB_FUNCTION_PROTOCOL_COMMAND 0x09
80 #define SRB_FUNCTION_ABORT_COMMAND 0x10
81 #define SRB_FUNCTION_RELEASE_RECOVERY 0x11
82 #define SRB_FUNCTION_RESET_BUS 0x12
83 #define SRB_FUNCTION_RESET_DEVICE 0x13
84 #define SRB_FUNCTION_TERMINATE_IO 0x14
85 #define SRB_FUNCTION_FLUSH_QUEUE 0x15
86 #define SRB_FUNCTION_REMOVE_DEVICE 0x16
87 #define SRB_FUNCTION_WMI 0x17
88 #define SRB_FUNCTION_LOCK_QUEUE 0x18
89 #define SRB_FUNCTION_UNLOCK_QUEUE 0x19
90 #define SRB_FUNCTION_QUIESCE_DEVICE 0x1a
91 #define SRB_FUNCTION_RESET_LOGICAL_UNIT 0x20
92 #define SRB_FUNCTION_SET_LINK_TIMEOUT 0x21
93 #define SRB_FUNCTION_LINK_TIMEOUT_OCCURRED 0x22
94 #define SRB_FUNCTION_LINK_TIMEOUT_COMPLETE 0x23
95 #define SRB_FUNCTION_POWER 0x24
96 #define SRB_FUNCTION_PNP 0x25
97 #define SRB_FUNCTION_DUMP_POINTERS 0x26
98 #define SRB_FUNCTION_FREE_DUMP_POINTERS 0x27
99 #define SRB_FUNCTION_STORAGE_REQUEST_BLOCK 0x28 // special value
100 #define SRB_FUNCTION_CRYPTO_OPERATION 0x29
101 #define SRB_FUNCTION_GET_DUMP_INFO 0x2a
102 #define SRB_FUNCTION_FREE_DUMP_INFO 0x2b
103 
104 /* SCSI_REQUEST_BLOCK.SrbStatus constants */
105 #define SRB_STATUS_PENDING 0x00
106 #define SRB_STATUS_SUCCESS 0x01
107 #define SRB_STATUS_ABORTED 0x02
108 #define SRB_STATUS_ABORT_FAILED 0x03
109 #define SRB_STATUS_ERROR 0x04
110 #define SRB_STATUS_BUSY 0x05
111 #define SRB_STATUS_INVALID_REQUEST 0x06
112 #define SRB_STATUS_INVALID_PATH_ID 0x07
113 #define SRB_STATUS_NO_DEVICE 0x08
114 #define SRB_STATUS_TIMEOUT 0x09
115 #define SRB_STATUS_SELECTION_TIMEOUT 0x0A
116 #define SRB_STATUS_COMMAND_TIMEOUT 0x0B
117 #define SRB_STATUS_MESSAGE_REJECTED 0x0D
118 #define SRB_STATUS_BUS_RESET 0x0E
119 #define SRB_STATUS_PARITY_ERROR 0x0F
120 #define SRB_STATUS_REQUEST_SENSE_FAILED 0x10
121 #define SRB_STATUS_NO_HBA 0x11
122 #define SRB_STATUS_DATA_OVERRUN 0x12
123 #define SRB_STATUS_UNEXPECTED_BUS_FREE 0x13
124 #define SRB_STATUS_PHASE_SEQUENCE_FAILURE 0x14
125 #define SRB_STATUS_BAD_SRB_BLOCK_LENGTH 0x15
126 #define SRB_STATUS_REQUEST_FLUSHED 0x16
127 #define SRB_STATUS_INVALID_LUN 0x20
128 #define SRB_STATUS_INVALID_TARGET_ID 0x21
129 #define SRB_STATUS_BAD_FUNCTION 0x22
130 #define SRB_STATUS_ERROR_RECOVERY 0x23
131 #define SRB_STATUS_NOT_POWERED 0x24
132 #define SRB_STATUS_LINK_DOWN 0x25
133 #define SRB_STATUS_INSUFFICIENT_RESOURCES 0x26
134 #define SRB_STATUS_THROTTLED_REQUEST 0x27
135 #define SRB_STATUS_INTERNAL_ERROR 0x30
136 
137 #define SRB_STATUS_QUEUE_FROZEN 0x40
138 #define SRB_STATUS_AUTOSENSE_VALID 0x80
139 
140 #define SRB_STATUS(Status) \
141  (Status & ~(SRB_STATUS_AUTOSENSE_VALID | SRB_STATUS_QUEUE_FROZEN))
142 
143 /* SCSI_REQUEST_BLOCK.SrbFlags constants */
144 #define SRB_FLAGS_QUEUE_ACTION_ENABLE 0x00000002
145 #define SRB_FLAGS_DISABLE_DISCONNECT 0x00000004
146 #define SRB_FLAGS_DISABLE_SYNCH_TRANSFER 0x00000008
147 #define SRB_FLAGS_BYPASS_FROZEN_QUEUE 0x00000010
148 #define SRB_FLAGS_DISABLE_AUTOSENSE 0x00000020
149 #define SRB_FLAGS_DATA_IN 0x00000040
150 #define SRB_FLAGS_DATA_OUT 0x00000080
151 #define SRB_FLAGS_NO_DATA_TRANSFER 0x00000000
152 #define SRB_FLAGS_UNSPECIFIED_DIRECTION (SRB_FLAGS_DATA_IN | SRB_FLAGS_DATA_OUT)
153 #define SRB_FLAGS_NO_QUEUE_FREEZE 0x00000100
154 #define SRB_FLAGS_ADAPTER_CACHE_ENABLE 0x00000200
155 #define SRB_FLAGS_FREE_SENSE_BUFFER 0x00000400
156 #define SRB_FLAGS_D3_PROCESSING 0x00000800
157 #define SRB_FLAGS_SEQUENTIAL_REQUIRED 0x00001000
158 #define SRB_FLAGS_IS_ACTIVE 0x00010000
159 #define SRB_FLAGS_ALLOCATED_FROM_ZONE 0x00020000
160 #define SRB_FLAGS_SGLIST_FROM_POOL 0x00040000
161 #define SRB_FLAGS_BYPASS_LOCKED_QUEUE 0x00080000
162 #define SRB_FLAGS_NO_KEEP_AWAKE 0x00100000
163 #define SRB_FLAGS_PORT_DRIVER_ALLOCSENSE 0x00200000
164 #define SRB_FLAGS_PORT_DRIVER_SENSEHASPORT 0x00400000
165 #define SRB_FLAGS_DONT_START_NEXT_PACKET 0x00800000
166 #define SRB_FLAGS_PORT_DRIVER_RESERVED 0x0F000000
167 #define SRB_FLAGS_CLASS_DRIVER_RESERVED 0xF0000000
168 
169 #if DBG
170 #define SCSI_PORT_SIGNATURE 0x54524f50
171 #endif
172 
173 #define SRB_SIMPLE_TAG_REQUEST 0x20
174 #define SRB_HEAD_OF_QUEUE_TAG_REQUEST 0x21
175 #define SRB_ORDERED_QUEUE_TAG_REQUEST 0x22
176 
177 #define SRB_WMI_FLAGS_ADAPTER_REQUEST 0x0001
178 #define SRB_POWER_FLAGS_ADAPTER_REQUEST 0x0001
179 #define SRB_PNP_FLAGS_ADAPTER_REQUEST 0x0001
180 
181 #define SP_BUS_PARITY_ERROR 0x0001
182 #define SP_UNEXPECTED_DISCONNECT 0x0002
183 #define SP_INVALID_RESELECTION 0x0003
184 #define SP_BUS_TIME_OUT 0x0004
185 #define SP_PROTOCOL_ERROR 0x0005
186 #define SP_INTERNAL_ADAPTER_ERROR 0x0006
187 #define SP_REQUEST_TIMEOUT 0x0007
188 #define SP_IRQ_NOT_RESPONDING 0x0008
189 #define SP_BAD_FW_WARNING 0x0009
190 #define SP_BAD_FW_ERROR 0x000a
191 #define SP_LOST_WMI_MINIPORT_REQUEST 0x000b
192 
193 #define SP_VER_TRACE_SUPPORT 0x0010
194 
195 #define SP_RETURN_NOT_FOUND 0
196 #define SP_RETURN_FOUND 1
197 #define SP_RETURN_ERROR 2
198 #define SP_RETURN_BAD_CONFIG 3
199 
201 
202 typedef struct _ACCESS_RANGE {
207 
208 typedef struct _PORT_CONFIGURATION_INFORMATION {
209  ULONG Length;
218  ULONG DmaPort;
224  PVOID Reserved;
228  BOOLEAN Master;
250  ULONG DmaPort2;
261 
262 #define CONFIG_INFO_VERSION_2 sizeof(PORT_CONFIGURATION_INFORMATION)
263 
264 #ifdef __GNUC__
265 __extension__ /* enums limited to range of integer */
266 #endif
276 
281 
282 typedef struct _SCSI_SUPPORTED_CONTROL_TYPE_LIST {
286 
287 typedef struct _SCSI_REQUEST_BLOCK {
288  USHORT Length;
289  UCHAR Function;
292  UCHAR PathId;
293  UCHAR TargetId;
294  UCHAR Lun;
295  UCHAR QueueTag;
299  ULONG SrbFlags;
307  _ANONYMOUS_UNION union {
311  } DUMMYUNIONNAME;
312 #if defined(_WIN64)
313  ULONG Reserved;
314 #endif
315  UCHAR Cdb[16];
317 
318 #define SCSI_REQUEST_BLOCK_SIZE sizeof(SCSI_REQUEST_BLOCK)
319 
320 typedef struct _SCSI_WMI_REQUEST_BLOCK {
321  USHORT Length;
322  UCHAR Function;
325  UCHAR PathId;
326  UCHAR TargetId;
327  UCHAR Lun;
329  UCHAR WMIFlags;
330  UCHAR Reserved2[2];
331  ULONG SrbFlags;
335  PVOID DataPath;
340 #if (NTDDI_VERSION >= NTDDI_WS03SP1) && defined(_WIN64)
341  ULONG Reserved6;
342 #endif
343  UCHAR Reserved5[16];
345 
354 
355 typedef enum _STOR_POWER_ACTION {
365 
384 #if defined(_WIN64)
385  ULONG Reserved;
386 #endif
389 
390 typedef enum _STOR_PNP_ACTION {
399 
413 
414 typedef struct _SCSI_PNP_REQUEST_BLOCK {
432 #if defined(_WIN64)
433  ULONG Reserved;
434 #endif
437 
438 #if (NTDDI_VERSION >= NTDDI_WIN8)
439 #if defined(_WIN64)
440 #define SRB_ALIGN DECLSPEC_ALIGN(8)
441 #define POINTER_ALIGN DECLSPEC_ALIGN(8)
442 #else
443 #define SRB_ALIGN
444 #define POINTER_ALIGN
445 #endif
446 
447 typedef enum _SRBEXDATATYPE {
460 
461 typedef struct SRB_ALIGN _SRBEX_DATA {
466 
467 #define SRBEX_DATA_BIDIRECTIONAL_LENGTH ((2 * sizeof(ULONG)) + sizeof(PVOID))
468 
473  ULONG Length;
476  _Field_size_bytes_full_(DataInTransferLength)
479 
480 #define SRBEX_DATA_SCSI_CDB16_LENGTH ((20 * sizeof(UCHAR)) + sizeof(ULONG) + sizeof(PVOID))
481 
486  ULONG Length;
493  PVOID POINTER_ALIGN SenseInfoBuffer;
496 
497 #define SRBEX_DATA_SCSI_CDB32_LENGTH ((36 * sizeof(UCHAR)) + sizeof(ULONG) + sizeof(PVOID))
498 
503  ULONG Length;
510  PVOID POINTER_ALIGN SenseInfoBuffer;
513 
514 #define SRBEX_DATA_SCSI_CDB_VAR_LENGTH_MIN ((4 * sizeof(UCHAR)) + (3 * sizeof(ULONG)) + sizeof(PVOID))
515 #define SRBEX_DATA_SCSI_CDB_VAR_LENGTH_MAX 0xffffffffUL
516 
521  ULONG Length;
528  PVOID POINTER_ALIGN SenseInfoBuffer;
529  _Field_size_bytes_full_(CdbLength)
532 
533 #define SRBEX_DATA_WMI_LENGTH ((4 * sizeof(UCHAR)) + sizeof(ULONG) + sizeof(PVOID))
534 
535 typedef struct SRB_ALIGN _SRBEX_DATA_WMI {
539  ULONG Length;
546 
547 #define SRBEX_DATA_POWER_LENGTH ((4 * sizeof(UCHAR)) + sizeof(STOR_DEVICE_POWER_STATE) + sizeof(STOR_POWER_ACTION))
548 
549 typedef struct SRB_ALIGN _SRBEX_DATA_POWER {
553  ULONG Length;
559 
560 #define SRBEX_DATA_PNP_LENGTH ((4 * sizeof(UCHAR)) + sizeof(STOR_PNP_ACTION) + (2 * sizeof(ULONG)))
561 
562 typedef struct SRB_ALIGN _SRBEX_DATA_PNP {
566  ULONG Length;
573 
574 #define SRBEX_DATA_IO_INFO_LENGTH ((5 * sizeof(ULONG)) + (4 * sizeof(UCHAR)))
575 
576 #define REQUEST_INFO_NO_CACHE_FLAG 0x00000001
577 #define REQUEST_INFO_PAGING_IO_FLAG 0x00000002
578 #define REQUEST_INFO_SEQUENTIAL_IO_FLAG 0x00000004
579 #define REQUEST_INFO_TEMPORARY_FLAG 0x00000008
580 #define REQUEST_INFO_WRITE_THROUGH_FLAG 0x00000010
581 #define REQUEST_INFO_HYBRID_WRITE_THROUGH_FLAG 0x00000020
582 
583 #if (NTDDI_VERSION >= NTDDI_WINTHRESHOLD)
584 
585 #define REQUEST_INFO_NO_FILE_OBJECT_FLAG 0x00000040
586 #define REQUEST_INFO_VOLSNAP_IO_FLAG 0x00000080
587 #define REQUEST_INFO_STREAM_FLAG 0x00000100
588 
589 #endif /* (NTDDI_VERSION >= NTDDI_WINTHRESHOLD) */
590 
591 #define REQUEST_INFO_VALID_CACHEPRIORITY_FLAG 0x80000000
592 
597  ULONG Length;
606 
607 #define SRB_SIGNATURE 0x53524258
608 #define STORAGE_REQUEST_BLOCK_VERSION_1 0x1
609 
613  UCHAR Function;
616 
617 typedef _Struct_size_bytes_(SrbLength) struct SRB_ALIGN _STORAGE_REQUEST_BLOCK {
618  USHORT Length;
620  UCHAR Function;
621  UCHAR SrbStatus;
622  UCHAR ReservedUchar[4];
626  ULONG Version;
627  ULONG SrbLength;
628  ULONG SrbFunction;
629  ULONG SrbFlags;
630  ULONG ReservedUlong;
631  ULONG RequestTag;
632  USHORT RequestPriority;
633  USHORT RequestAttribute;
634  ULONG TimeOutValue;
635  ULONG SystemStatus;
636  ULONG ZeroGuard1;
637  _Field_range_(sizeof(STORAGE_REQUEST_BLOCK), SrbLength - sizeof(STOR_ADDRESS))
638  ULONG AddressOffset;
639  ULONG NumSrbExData;
640  ULONG DataTransferLength;
641  _Field_size_bytes_full_(DataTransferLength)
642  PVOID POINTER_ALIGN DataBuffer;
643  PVOID POINTER_ALIGN ZeroGuard2;
645  PVOID POINTER_ALIGN ClassContext;
646  PVOID POINTER_ALIGN PortContext;
647  PVOID POINTER_ALIGN MiniportContext;
648  struct _STORAGE_REQUEST_BLOCK POINTER_ALIGN *NextSrb;
649  _At_buffer_(SrbExDataOffset, _Iter_, NumSrbExData, _Field_range_(0, SrbLength - sizeof(SRBEX_DATA)))
650  _Field_size_(NumSrbExData)
651  ULONG SrbExDataOffset[ANYSIZE_ARRAY];
653 
654 #define SRB_TYPE_SCSI_REQUEST_BLOCK 0
655 #define SRB_TYPE_STORAGE_REQUEST_BLOCK 1
656 
657 #define STORAGE_ADDRESS_TYPE_BTL8 0
658 #endif /* (NTDDI_VERSION >= NTDDI_WIN8) */
659 
660 typedef
662 BOOLEAN
664  _In_ PVOID DeviceExtension);
665 
666 typedef
668 BOOLEAN
670  _In_ PVOID DeviceExtension,
672 
673 typedef
675 BOOLEAN
677  _In_ PVOID DeviceExtension);
678 
679 typedef VOID
681  _In_ PVOID DeviceExtension);
682 
683 typedef VOID
685  _In_ PVOID DeviceExtension);
686 
687 typedef
689 ULONG
691  _In_ PVOID DeviceExtension,
694  _In_ PCHAR ArgumentString,
696  _Out_ PBOOLEAN Again);
697 
698 typedef
700 BOOLEAN
702  _In_ PVOID DeviceExtension,
703  _In_ ULONG PathId);
704 
705 typedef
707 BOOLEAN
709  _In_ PVOID DeviceExtension,
712 
713 typedef
717  _In_ PVOID DeviceExtension,
718  _In_ SCSI_ADAPTER_CONTROL_TYPE ControlType,
720 
738 
739 typedef struct _HW_INITIALIZATION_DATA {
753  PVOID Reserved;
761  PVOID VendorId;
762  _ANONYMOUS_UNION union {
765  } DUMMYUNIONNAME;
767  PVOID DeviceId;
770 
771 #if defined(_NTDDK_)
772 #define SCSIPORT_API
773 #else
774 #define SCSIPORT_API DECLSPEC_IMPORT
775 #endif
776 
778 VOID
779 NTAPI
781  _In_ PVOID HwDeviceExtension,
782  _In_ UCHAR PathId,
784  _In_ UCHAR Lun,
785  _In_ UCHAR SrbStatus);
786 
789 ULONG
790 NTAPI
793 
794 #define ScsiPortConvertPhysicalAddressToUlong(Address) ((Address).LowPart)
795 #define ScsiPortConvertPhysicalAddressToULongPtr(Address) ((ULONG_PTR)((Address).QuadPart))
796 
800 NTAPI
802  _In_ ULONG_PTR UlongAddress);
803 
805 VOID
806 NTAPI
808  _In_ PVOID DeviceExtension);
809 
811 VOID
812 NTAPI
814  _In_ PVOID HwDeviceExtension,
815  _In_ PVOID MappedAddress);
816 
819 ULONG
820 NTAPI
822  _In_ PVOID DeviceExtension,
823  _In_ ULONG BusDataType,
824  _In_ ULONG SystemIoBusNumber,
827  _In_ ULONG Length);
828 
831 PVOID
832 NTAPI
834  _In_ PVOID HwDeviceExtension,
836  _In_ ULONG SystemIoBusNumber,
837  _In_ SCSI_PHYSICAL_ADDRESS IoAddress,
839  _In_ BOOLEAN InIoSpace);
840 
843 PVOID
844 NTAPI
846  _In_ PVOID HwDeviceExtension,
847  _In_ UCHAR PathId,
849  _In_ UCHAR Lun);
850 
854 NTAPI
856  _In_ PVOID HwDeviceExtension,
859  _Out_ ULONG *Length);
860 
864 NTAPI
866  _In_ PVOID DeviceExtension,
867  _In_ UCHAR PathId,
869  _In_ UCHAR Lun,
870  _In_ LONG QueueTag);
871 
874 PVOID
875 NTAPI
877  _In_ PVOID HwDeviceExtension,
880 
883 PVOID
884 NTAPI
886  _In_ PVOID HwDeviceExtension,
888 
892 ULONG
893 NTAPI
899 
901 VOID
902 NTAPI
904  _In_ PVOID HwDeviceExtension,
906  _In_ PVOID LogicalAddress,
907  _In_ ULONG Length);
908 
910 VOID
911 NTAPI
913  _In_ PVOID HwDeviceExtension,
915  _In_ UCHAR PathId,
917  _In_ UCHAR Lun,
919  _In_ ULONG UniqueId);
920 
922 VOID
923 __cdecl
926  _In_ PVOID HwDeviceExtension,
927  ...);
928 
930 VOID
931 NTAPI
933  _Out_ PLARGE_INTEGER CurrentTime);
934 
937 ULONG
938 NTAPI
940  _In_ PVOID DeviceExtension,
941  _In_ ULONG BusDataType,
942  _In_ ULONG SystemIoBusNumber,
945  _In_ ULONG Offset,
946  _In_ ULONG Length);
947 
949 VOID
950 NTAPI
952  _In_ ULONG Delay);
953 
956 BOOLEAN
957 NTAPI
959  _In_ PVOID HwDeviceExtension,
961  _In_ ULONG SystemIoBusNumber,
962  _In_ SCSI_PHYSICAL_ADDRESS IoAddress,
964  _In_ BOOLEAN InIoSpace);
965 
967 VOID
968 __cdecl
970  ULONG DebugPrintLevel,
971  PCCHAR DebugMessage,
972  ...);
973 
974 #if defined(_M_AMD64)
975 
976 #define ScsiPortReadPortUchar READ_PORT_UCHAR
977 #define ScsiPortReadPortUshort READ_PORT_USHORT
978 #define ScsiPortReadPortUlong READ_PORT_ULONG
979 
980 #define ScsiPortReadPortBufferUchar READ_PORT_BUFFER_UCHAR
981 #define ScsiPortReadPortBufferUshort READ_PORT_BUFFER_USHORT
982 #define ScsiPortReadPortBufferUlong READ_PORT_BUFFER_ULONG
983 
984 #define ScsiPortReadRegisterUchar READ_REGISTER_UCHAR
985 #define ScsiPortReadRegisterUshort READ_REGISTER_USHORT
986 #define ScsiPortReadRegisterUlong READ_REGISTER_ULONG
987 
988 #define ScsiPortReadRegisterBufferUchar READ_REGISTER_BUFFER_UCHAR
989 #define ScsiPortReadRegisterBufferUshort READ_REGISTER_BUFFER_USHORT
990 #define ScsiPortReadRegisterBufferUlong READ_REGISTER_BUFFER_ULONG
991 
992 #define ScsiPortWritePortUchar WRITE_PORT_UCHAR
993 #define ScsiPortWritePortUshort WRITE_PORT_USHORT
994 #define ScsiPortWritePortUlong WRITE_PORT_ULONG
995 
996 #define ScsiPortWritePortBufferUchar WRITE_PORT_BUFFER_UCHAR
997 #define ScsiPortWritePortBufferUshort WRITE_PORT_BUFFER_USHORT
998 #define ScsiPortWritePortBufferUlong WRITE_PORT_BUFFER_ULONG
999 
1000 #define ScsiPortWriteRegisterUchar WRITE_REGISTER_UCHAR
1001 #define ScsiPortWriteRegisterUshort WRITE_REGISTER_USHORT
1002 #define ScsiPortWriteRegisterUlong WRITE_REGISTER_ULONG
1003 
1004 #define ScsiPortWriteRegisterBufferUchar WRITE_REGISTER_BUFFER_UCHAR
1005 #define ScsiPortWriteRegisterBufferUshort WRITE_REGISTER_BUFFER_USHORT
1006 #define ScsiPortWriteRegisterBufferUlong WRITE_REGISTER_BUFFER_ULONG
1007 
1008 #define ScsiPortMoveMemory memmove
1009 
1010 #else
1011 
1014 UCHAR
1015 NTAPI
1017  _In_ PUCHAR Port);
1018 
1021 ULONG
1022 NTAPI
1024  _In_ PULONG Port);
1025 
1028 USHORT
1029 NTAPI
1031  _In_ PUSHORT Port);
1032 
1034 VOID
1035 NTAPI
1037  _In_ PUCHAR Port,
1038  _In_ PUCHAR Buffer,
1039  _In_ ULONG Count);
1040 
1042 VOID
1043 NTAPI
1045  _In_ PULONG Port,
1046  _In_ PULONG Buffer,
1047  _In_ ULONG Count);
1048 
1050 VOID
1051 NTAPI
1053  _In_ PUSHORT Port,
1055  _In_ ULONG Count);
1056 
1059 UCHAR
1060 NTAPI
1062  _In_ PUCHAR Register);
1063 
1066 ULONG
1067 NTAPI
1069  _In_ PULONG Register);
1070 
1073 USHORT
1074 NTAPI
1076  _In_ PUSHORT Register);
1077 
1079 VOID
1080 NTAPI
1082  _In_ PUCHAR Register,
1083  _In_ PUCHAR Buffer,
1084  _In_ ULONG Count);
1085 
1087 VOID
1088 NTAPI
1090  _In_ PULONG Register,
1091  _In_ PULONG Buffer,
1092  _In_ ULONG Count);
1093 
1095 VOID
1096 NTAPI
1098  _In_ PUSHORT Register,
1100  _In_ ULONG Count);
1101 
1103 VOID
1104 NTAPI
1106  _In_ PUCHAR Port,
1107  _In_ UCHAR Value);
1108 
1110 VOID
1111 NTAPI
1113  _In_ PULONG Port,
1114  _In_ ULONG Value);
1115 
1117 VOID
1118 NTAPI
1120  _In_ PUSHORT Port,
1121  _In_ USHORT Value);
1122 
1124 VOID
1125 NTAPI
1127  _In_ PUCHAR Port,
1128  _In_ PUCHAR Buffer,
1129  _In_ ULONG Count);
1130 
1132 VOID
1133 NTAPI
1135  _In_ PULONG Port,
1136  _In_ PULONG Buffer,
1137  _In_ ULONG Count);
1138 
1140 VOID
1141 NTAPI
1143  _In_ PUSHORT Port,
1145  _In_ ULONG Count);
1146 
1148 VOID
1149 NTAPI
1151  _In_ PUCHAR Register,
1152  _In_ UCHAR Value);
1153 
1155 VOID
1156 NTAPI
1158  _In_ PULONG Register,
1159  _In_ ULONG Value);
1160 
1162 VOID
1163 NTAPI
1165  _In_ PUSHORT Register,
1166  _In_ USHORT Value);
1167 
1169 VOID
1170 NTAPI
1172  _In_ PUCHAR Register,
1173  _In_ PUCHAR Buffer,
1174  _In_ ULONG Count);
1175 
1177 VOID
1178 NTAPI
1180  _In_ PULONG Register,
1181  _In_ PULONG Buffer,
1182  _In_ ULONG Count);
1183 
1185 VOID
1186 NTAPI
1188  _In_ PUSHORT Register,
1190  _In_ ULONG Count);
1191 
1193 VOID
1194 NTAPI
1198  _In_ ULONG Length);
1199 
1200 #endif /* defined(_M_AMD64) */
1201 
1202 #ifdef __cplusplus
1203 }
1204 #endif
1205 
1206 #endif /* _NTSRB_ */
SCSIPORT_API UCHAR NTAPI ScsiPortReadRegisterUchar(IN PUCHAR Register)
Definition: scsiport.c:1433
struct _SCSI_POWER_REQUEST_BLOCK SCSI_POWER_REQUEST_BLOCK
UCHAR SenseInfoBufferLength
Definition: srb.h:488
_In_ WDFIORESREQLIST _In_ ULONG SlotNumber
Definition: wdfresource.h:65
signed char * PCHAR
Definition: retypes.h:7
PHW_ADAPTER_STATE HwAdapterState
Definition: srb.h:565
SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterBufferUshort(IN PUSHORT Register, IN PUSHORT Buffer, IN ULONG Count)
Definition: scsiport.c:1580
_Must_inspect_result_ _In_ PVOID Argument2
Definition: srb.h:896
CPPORT Port[4]
Definition: headless.c:34
#define _Field_size_bytes_(s)
Definition: no_sal2.h:336
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)
Definition: scsiport.c:1283
struct SRB_ALIGN _SRBEX_DATA_BIDIRECTIONAL SRBEX_DATA_BIDIRECTIONAL
_SRBEXDATATYPE
Definition: srb.h:447
SCSIPORT_API VOID NTAPI ScsiPortWritePortUlong(IN PULONG Port, IN ULONG Value)
Definition: scsiport.c:1540
struct SRB_ALIGN _SRBEX_DATA_SCSI_CDB32 SRBEX_DATA_SCSI_CDB32
#define _Must_inspect_result_
Definition: no_sal2.h:62
struct _ACCESS_RANGE ACCESS_RANGE
BOOLEAN BufferAccessScsiPortControlled
Definition: srb.h:90
struct SRB_ALIGN _SRBEX_DATA_BIDIRECTIONAL * PSRBEX_DATA_BIDIRECTIONAL
struct SRB_ALIGN _SRBEX_DATA_WMI SRBEX_DATA_WMI
struct _STOR_DEVICE_CAPABILITIES * PSTOR_DEVICE_CAPABILITIES
INTERFACE_TYPE AdapterInterfaceType
Definition: srb.h:55
struct _SCSI_WMI_REQUEST_BLOCK SCSI_WMI_REQUEST_BLOCK
_In_ NDIS_ERROR_CODE ErrorCode
Definition: ndis.h:4436
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
ULONG SrbFlags
Definition: srb.h:252
PVOID SrbExtension
Definition: srb.h:259
enum _INTERFACE_TYPE INTERFACE_TYPE
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR _In_ UCHAR _In_ UCHAR Lun
Definition: classpnp.h:1310
STOR_PNP_ACTION PnPAction
Definition: srb.h:422
_In_ CDROM_SCAN_FOR_SPECIAL_INFO _In_ PCDROM_SCAN_FOR_SPECIAL_HANDLER Function
Definition: cdrom.h:1154
_IRQL_requires_same_ _In_opt_ PVOID Argument1
Definition: cmtypes.h:696
enum _SRBEXDATATYPE SRBEXDATATYPE
PVOID OriginalRequest
Definition: srb.h:258
_Must_inspect_result_ _In_ WDFQUEUE _In_opt_ WDFREQUEST _In_opt_ WDFFILEOBJECT _Inout_opt_ PWDF_REQUEST_PARAMETERS Parameters
Definition: wdfio.h:863
struct SRB_ALIGN _SRBEX_DATA_SCSI_CDB_VAR SRBEX_DATA_SCSI_CDB_VAR
UCHAR Cdb[16]
Definition: srb.h:271
SCSIPORT_API ULONG NTAPI ScsiPortInitialize(IN PVOID Argument1, IN PVOID Argument2, IN struct _HW_INITIALIZATION_DATA *HwInitializationData, IN PVOID HwContext)
Definition: scsiport.c:808
#define STORAGE_REQUEST_BLOCK_VERSION_1
Definition: srb.h:608
#define _In_reads_bytes_(s)
Definition: no_sal2.h:170
enum _SCSI_ADAPTER_CONTROL_TYPE * PSCSI_ADAPTER_CONTROL_TYPE
#define SRBEX_DATA_WMI_LENGTH
Definition: srb.h:533
enum _SCSI_ADAPTER_CONTROL_STATUS SCSI_ADAPTER_CONTROL_STATUS
#define __cdecl
Definition: accygwin.h:79
enum _SCSI_NOTIFICATION_TYPE SCSI_NOTIFICATION_TYPE
USHORT PortVersionFlags
Definition: srb.h:764
SCSIPORT_API PVOID NTAPI ScsiPortGetVirtualAddress(IN PVOID HwDeviceExtension, IN SCSI_PHYSICAL_ADDRESS PhysicalAddress)
Definition: scsiport.c:806
struct _SCSI_REQUEST_BLOCK * PSCSI_REQUEST_BLOCK
_STOR_PNP_ACTION
Definition: srb.h:390
SCSIPORT_API ULONG NTAPI ScsiPortGetBusData(IN PVOID DeviceExtension, IN ULONG BusDataType, IN ULONG SystemIoBusNumber, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Length)
Definition: scsiport.c:549
#define ANYSIZE_ARRAY
Definition: typedefs.h:46
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE BusType
Definition: halfuncs.h:156
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR PathId
Definition: classpnp.h:1310
BOOLEAN(NTAPI * PHW_RESET_BUS)(IN PVOID DeviceExtension, IN ULONG PathId)
Definition: srb.h:471
_STOR_DEVICE_POWER_STATE
Definition: srb.h:346
SCSIPORT_API PVOID NTAPI ScsiPortGetLogicalUnit(IN PVOID HwDeviceExtension, IN UCHAR PathId, IN UCHAR TargetId, IN UCHAR Lun)
Definition: scsiport.c:594
enum _SCSI_NOTIFICATION_TYPE * PSCSI_NOTIFICATION_TYPE
ULONG DataInTransferLength
Definition: srb.h:474
#define SRBEX_DATA_PNP_LENGTH
Definition: srb.h:560
struct SRB_ALIGN _SRBEX_DATA * PSRBEX_DATA
PVOID DataBuffer
Definition: srb.h:255
PVOID OriginalRequest
Definition: srb.h:297
#define _ANONYMOUS_UNION
Definition: ntbasedef.h:30
struct SRB_ALIGN _SRBEX_DATA_POWER SRBEX_DATA_POWER
_SCSI_NOTIFICATION_TYPE
Definition: srb.h:522
struct SRB_ALIGN _SRBEX_DATA_PNP SRBEX_DATA_PNP
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR _In_ UCHAR TargetId
Definition: classpnp.h:1310
UCHAR WMIFlags
Definition: srb.h:541
unsigned char * PUCHAR
Definition: retypes.h:3
ULONG DataTransferLength
Definition: srb.h:253
#define SRB_ALIGN
Definition: srb.h:443
SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterUchar(IN PUCHAR Register, IN UCHAR Value)
Definition: scsiport.c:1591
SCSIPORT_API VOID NTAPI ScsiPortWritePortBufferUchar(IN PUCHAR Port, IN PUCHAR Buffer, IN ULONG Count)
Definition: scsiport.c:1501
SCSIPORT_API VOID NTAPI ScsiPortQuerySystemTime(_Out_ PLARGE_INTEGER CurrentTime)
ULONG HwInitializationDataSize
Definition: srb.h:542
struct SRB_ALIGN _SRBEX_DATA SRBEX_DATA
#define ReadBuffer(BaseIoAddress, Buffer, Count)
Definition: atapi.h:339
_Must_inspect_result_ _In_ PVOID _In_ struct _HW_INITIALIZATION_DATA _In_ PVOID HwContext
Definition: srb.h:897
struct _HW_INITIALIZATION_DATA HW_INITIALIZATION_DATA
enum _STOR_PNP_ACTION STOR_PNP_ACTION
UCHAR SenseInfoBufferLength
Definition: srb.h:523
ULONG DeviceExtensionSize
Definition: srb.h:566
enum _DMA_WIDTH DMA_WIDTH
SCSIPORT_API VOID NTAPI ScsiPortReadRegisterBufferUshort(IN PUSHORT Register, IN PUSHORT Buffer, IN ULONG Count)
Definition: scsiport.c:1422
SCSIPORT_API SCSI_PHYSICAL_ADDRESS NTAPI ScsiPortGetPhysicalAddress(IN PVOID HwDeviceExtension, IN PSCSI_REQUEST_BLOCK Srb, IN PVOID VirtualAddress, OUT ULONG *Length)
Definition: scsiport.c:607
UCHAR CdbLength
Definition: srb.h:250
_Must_inspect_result_ _IRQL_requires_max_(PASSIVE_LEVEL) SCSIPORT_API ULONG NTAPI ScsiPortInitialize(_In_ PVOID Argument1
Definition: Messaging.c:64
PHW_DMA_STARTED HwDmaStarted
Definition: srb.h:564
BOOLEAN MultipleRequestPerLu
Definition: srb.h:576
PHW_FIND_ADAPTER HwFindAdapter
Definition: srb.h:562
SCSIPORT_API VOID NTAPI ScsiPortMoveMemory(IN PVOID WriteBuffer, IN PVOID ReadBuffer, IN ULONG Length)
Definition: scsiport.c:1298
USHORT DeviceIdLength
Definition: srb.h:581
SCSIPORT_API VOID NTAPI ScsiPortWritePortUshort(IN PUSHORT Port, IN USHORT Value)
Definition: scsiport.c:1549
ACCESS_RANGE(* AccessRanges)[]
Definition: srb.h:70
ULONG SpecificLuExtensionSize
Definition: srb.h:567
UCHAR CachePriority
Definition: srb.h:602
struct _SCSI_REQUEST_BLOCK * NextSrb
Definition: srb.h:257
UCHAR QueueAction
Definition: srb.h:249
ULONG LinkTimeoutValue
Definition: srb.h:310
PHW_RESET_BUS HwResetBus
Definition: srb.h:563
SCSIPORT_API VOID NTAPI ScsiPortReadPortBufferUlong(IN PULONG Port, IN PULONG Buffer, IN ULONG Count)
Definition: stubs.c:74
SCSIPORT_API PSCSI_REQUEST_BLOCK NTAPI ScsiPortGetSrb(IN PVOID DeviceExtension, IN UCHAR PathId, IN UCHAR TargetId, IN UCHAR Lun, IN LONG QueueTag)
Definition: scsiport.c:643
#define POINTER_ALIGN
Definition: srb.h:444
ULONG TimeOutValue
Definition: srb.h:254
_STOR_POWER_ACTION
Definition: srb.h:355
SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterUlong(IN PULONG Register, IN ULONG Value)
Definition: scsiport.c:1600
_Field_size_bytes_(DataTransferLength) PVOID DataBuffer
UCHAR SrbStatus
Definition: srb.h:243
#define _In_opt_
Definition: no_sal2.h:212
BOOLEAN(NTAPI * PHW_ADAPTER_STATE)(IN PVOID DeviceExtension, IN PVOID Context, IN BOOLEAN SaveState)
Definition: srb.h:478
SCSIPORT_API ULONG NTAPI ScsiPortReadPortUlong(IN PULONG Port)
Definition: scsiport.c:1384
BOOLEAN AutoRequestSense
Definition: srb.h:575
#define SRBEX_DATA_SCSI_CDB32_LENGTH
Definition: srb.h:497
BOOLEAN TaggedQueuing
Definition: srb.h:574
OUT BOOLEAN SupportedTypeList[0]
Definition: srb.h:213
uint32_t ULONG_PTR
Definition: typedefs.h:65
UCHAR WMISubFunction
Definition: srb.h:540
struct SRB_ALIGN _STORAGE_REQUEST_BLOCK_HEADER * PSTORAGE_REQUEST_BLOCK_HEADER
_In_ WDF_SPECIAL_FILE_TYPE NotificationType
Definition: wdfdevice.h:1024
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)
Definition: scsiport.c:1481
struct _SCSI_REQUEST_BLOCK * NextSrb
Definition: srb.h:428
enum _STOR_DEVICE_POWER_STATE STOR_DEVICE_POWER_STATE
struct SRB_ALIGN _SRBEX_DATA_SCSI_CDB16 SRBEX_DATA_SCSI_CDB16
_Iter_
Definition: memory.h:71
struct _SCSI_PNP_REQUEST_BLOCK * PSCSI_PNP_REQUEST_BLOCK
SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterBufferUlong(IN PULONG Register, IN PULONG Buffer, IN ULONG Count)
Definition: scsiport.c:1569
SCSIPORT_API SCSI_PHYSICAL_ADDRESS NTAPI ScsiPortConvertUlongToPhysicalAddress(ULONG UlongAddress)
BOOLEAN NeedPhysicalAddresses
Definition: srb.h:573
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
STOR_POWER_ACTION PowerAction
Definition: srb.h:557
typedef _Field_range_(0, 255) ULONG AACS_LAYER_NUMBER
BOOLEAN(NTAPI * PHW_INITIALIZE)(IN PVOID DeviceExtension)
Definition: srb.h:429
long LONG
Definition: pedump.c:60
UCHAR WMISubFunction
Definition: srb.h:284
PHW_INTERRUPT HwInterrupt
Definition: srb.h:561
SCSIPORT_API ULONG NTAPI ScsiPortReadRegisterUlong(IN PULONG Register)
Definition: scsiport.c:1441
struct SRB_ALIGN _SRBEX_DATA_PNP * PSRBEX_DATA_PNP
UCHAR ScsiStatus
Definition: srb.h:244
#define _At_buffer_(t, i, c, a)
Definition: no_sal2.h:42
USHORT VendorIdLength
Definition: srb.h:578
enum _STOR_DEVICE_POWER_STATE * PSTOR_DEVICE_POWER_STATE
SCSIPORT_API VOID NTAPI ScsiPortWritePortUchar(IN PUCHAR Port, IN UCHAR Value)
Definition: scsiport.c:1531
ULONG DataTransferLength
Definition: srb.h:292
USHORT ReservedUshort
Definition: srb.h:580
struct SRB_ALIGN _SRBEX_DATA_IO_INFO SRBEX_DATA_IO_INFO
unsigned char BOOLEAN
PHW_STARTIO HwStartIo
Definition: srb.h:560
UCHAR Reserved4[16]
Definition: srb.h:435
struct SRB_ALIGN _SRBEX_DATA_SCSI_CDB16 * PSRBEX_DATA_SCSI_CDB16
enum _KINTERRUPT_MODE KINTERRUPT_MODE
static WCHAR Address[46]
Definition: ping.c:68
SCSIPORT_API VOID NTAPI ScsiPortReadPortBufferUshort(IN PUSHORT Port, IN PUSHORT Buffer, IN ULONG Count)
Definition: stubs.c:64
* PSTORAGE_REQUEST_BLOCK
Definition: srb.h:652
#define _Out_
Definition: no_sal2.h:160
struct _SCSI_PNP_REQUEST_BLOCK SCSI_PNP_REQUEST_BLOCK
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
SCSIPORT_API USHORT NTAPI ScsiPortReadPortUshort(IN PUSHORT Port)
Definition: scsiport.c:1392
enum _STOR_POWER_ACTION STOR_POWER_ACTION
KINTERRUPT_MODE InterruptMode2
Definition: srb.h:97
Definition: bufpool.h:45
struct SRB_ALIGN _SRBEX_DATA_IO_INFO * PSRBEX_DATA_IO_INFO
struct SRB_ALIGN _STORAGE_REQUEST_BLOCK_HEADER STORAGE_REQUEST_BLOCK_HEADER
_Must_inspect_result_ _In_ WDFDMATRANSACTION _In_ PFN_WDF_PROGRAM_DMA _In_ WDF_DMA_DIRECTION _In_ PMDL _In_ PVOID VirtualAddress
UCHAR QueueTag
Definition: srb.h:248
UCHAR TargetId
Definition: srb.h:246
#define SRBEX_DATA_BIDIRECTIONAL_LENGTH
Definition: srb.h:467
#define SRBEX_DATA_SCSI_CDB_VAR_LENGTH_MAX
Definition: srb.h:515
BOOLEAN IsWriteRequest
Definition: srb.h:601
UCHAR Reserved2[2]
Definition: srb.h:290
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
Definition: wdfregistry.h:406
KINTERRUPT_MODE InterruptMode
Definition: srb.h:60
SCSIPORT_API VOID NTAPI ScsiPortReadRegisterBufferUchar(IN PUCHAR Register, IN PUCHAR Buffer, IN ULONG Count)
Definition: scsiport.c:1400
Definition: srb.h:732
int Count
Definition: noreturn.cpp:7
SCSIPORT_API VOID NTAPI ScsiPortCompleteRequest(IN PVOID HwDeviceExtension, IN UCHAR PathId, IN UCHAR TargetId, IN UCHAR Lun, IN UCHAR SrbStatus)
Definition: scsiport.c:498
struct _SCSI_WMI_REQUEST_BLOCK * PSCSI_WMI_REQUEST_BLOCK
BOOLEAN ReceiveEvent
Definition: srb.h:577
UCHAR SenseInfoBufferLength
Definition: srb.h:505
ULONG DataTransferLength
Definition: srb.h:376
struct _SCSI_SUPPORTED_CONTROL_TYPE_LIST * PSCSI_SUPPORTED_CONTROL_TYPE_LIST
SCSI_ADAPTER_CONTROL_STATUS(NTAPI * PHW_ADAPTER_CONTROL)(IN PVOID DeviceExtension, IN SCSI_ADAPTER_CONTROL_TYPE ControlType, IN PVOID Parameters)
Definition: srb.h:486
struct _ACCESS_RANGE * PACCESS_RANGE
UCHAR Function
Definition: srb.h:242
BOOLEAN(NTAPI * PHW_STARTIO)(IN PVOID DeviceExtension, IN PSCSI_REQUEST_BLOCK Srb)
Definition: srb.h:435
struct STOR_ADDRESS_ALIGN _STOR_ADDRESS STOR_ADDRESS
enum _SRBEXDATATYPE * PSRBEXDATATYPE
_In_ UCHAR SenseInfoBufferLength
Definition: scsi.h:3705
Type
Definition: Type.h:6
_In_opt_ WDFREQUEST _In_ ULONG _In_ BOOLEAN _In_ PCDB Cdb
Definition: scratch.h:156
typedef _Struct_size_bytes_(SrbLength) struct SRB_ALIGN _STORAGE_REQUEST_BLOCK
Definition: srb.h:617
BOOLEAN AtdiskSecondaryClaimed
Definition: srb.h:79
char DataInBuffer[128]
Definition: gdblib.c:99
struct SRB_ALIGN _SRBEX_DATA_SCSI_CDB32 * PSRBEX_DATA_SCSI_CDB32
_SCSI_ADAPTER_CONTROL_TYPE
Definition: srb.h:168
IN PVOID IN PVOID IN USHORT Version
Definition: pci.h:361
USHORT Length
Definition: srb.h:241
#define _Inout_
Definition: no_sal2.h:162
PVOID SenseInfoBuffer
Definition: srb.h:427
PVOID POINTER_ALIGN DataPath
Definition: srb.h:544
struct _SCSI_REQUEST_BLOCK SCSI_REQUEST_BLOCK
ULONG Reserved1
Definition: srb.h:543
SCSI_PHYSICAL_ADDRESS RangeStart
Definition: srb.h:41
#define SCSIPORT_API
Definition: srb.h:774
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)
Definition: scsiport.c:1457
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS PhysicalAddress
Definition: iotypes.h:1081
_ANONYMOUS_UNION union _HW_INITIALIZATION_DATA::@2196 DUMMYUNIONNAME
SCSIPORT_API VOID NTAPI ScsiPortReadPortBufferUchar(IN PUCHAR Port, IN PUCHAR Buffer, IN ULONG Count)
Definition: stubs.c:54
#define SRB_FUNCTION_STORAGE_REQUEST_BLOCK
Definition: srb.h:99
unsigned char UCHAR
Definition: xmlstorage.h:181
struct _PORT_CONFIGURATION_INFORMATION PORT_CONFIGURATION_INFORMATION
#define SRBEX_DATA_SCSI_CDB_VAR_LENGTH_MIN
Definition: srb.h:514
BOOLEAN RangeInMemory
Definition: srb.h:43
char * PBOOLEAN
Definition: retypes.h:11
Definition: srb.h:733
#define _Field_size_(s)
Definition: no_sal2.h:332
ULONG SrbPnPFlags
Definition: srb.h:570
PHYSICAL_ADDRESS SCSI_PHYSICAL_ADDRESS
Definition: srb.h:38
#define VOID
Definition: acefi.h:82
UCHAR PnPSubFunction
Definition: srb.h:567
ULONG InternalStatus
Definition: srb.h:261
#define SRB_SIGNATURE
Definition: srb.h:607
PVOID OriginalRequest
Definition: srb.h:429
ULONG RWLength
Definition: srb.h:600
struct _HW_INITIALIZATION_DATA * PHW_INITIALIZATION_DATA
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
#define SRBEX_DATA_POWER_LENGTH
Definition: srb.h:547
_In_ PSCSI_REQUEST_BLOCK _In_opt_ PVOID _In_ ULONG _In_ BOOLEAN _In_opt_ WDFREQUEST OriginalRequest
Definition: cdrom.h:989
ULONG NumberOfAccessRanges
Definition: srb.h:569
#define SaveState(State)
STOR_POWER_ACTION PowerAction
Definition: srb.h:383
enum _DMA_SPEED DMA_SPEED
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)
Definition: scsiport.c:562
struct SRB_ALIGN _SRBEX_DATA_POWER * PSRBEX_DATA_POWER
PHYSICAL_ADDRESS * PSCSI_PHYSICAL_ADDRESS
Definition: srb.h:38
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
#define _In_
Definition: no_sal2.h:158
_ANONYMOUS_UNION union _SCSI_REQUEST_BLOCK::@2195 DUMMYUNIONNAME
UCHAR SenseInfoBufferLength
Definition: srb.h:251
enum _SCSI_ADAPTER_CONTROL_STATUS * PSCSI_ADAPTER_CONTROL_STATUS
PHW_ADAPTER_CONTROL HwAdapterControl
Definition: srb.h:768
UCHAR Reserved5[16]
Definition: srb.h:387
ULONG Reserved1
Definition: srb.h:571
SCSIPORT_API VOID NTAPI ScsiPortWritePortBufferUshort(IN PUSHORT Port, IN PUSHORT Buffer, IN ULONG Count)
Definition: scsiport.c:1521
UCHAR PathId
Definition: srb.h:245
SCSIPORT_API VOID NTAPI ScsiPortFreeDeviceBase(IN PVOID HwDeviceExtension, IN PVOID MappedAddress)
Definition: scsiport.c:540
unsigned short USHORT
Definition: pedump.c:61
Definition: srb.h:531
#define _Field_size_bytes_full_(s)
Definition: no_sal2.h:352
STORAGE_REQUEST_BLOCK
Definition: srb.h:652
SRBEXDATATYPE Type
Definition: srb.h:462
SCSIPORT_API VOID __cdecl ScsiDebugPrint(ULONG DebugPrintLevel, PCCHAR DebugMessage,...)
ULONG RangeLength
Definition: srb.h:42
ULONG SrbExtensionSize
Definition: srb.h:568
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
Definition: iotypes.h:1018
unsigned int * PULONG
Definition: retypes.h:1
ULONG Length
Definition: srb.h:463
BOOLEAN(NTAPI * PHW_INTERRUPT)(IN PVOID DeviceExtension)
Definition: srb.h:442
#define ScsiPortConvertPhysicalAddressToUlong(Address)
Definition: srb.h:794
enum _STOR_PNP_ACTION * PSTOR_PNP_ACTION
SCSIPORT_API VOID NTAPI ScsiPortWritePortBufferUlong(IN PULONG Port, IN PULONG Buffer, IN ULONG Count)
Definition: scsiport.c:1511
Definition: bcd.h:201
PHW_INITIALIZE HwInitialize
Definition: srb.h:559
struct SRB_ALIGN _SRBEX_DATA_SCSI_CDB_VAR * PSRBEX_DATA_SCSI_CDB_VAR
struct _SCSI_REQUEST_BLOCK * NextSrb
Definition: srb.h:380
enum _SCSI_ADAPTER_CONTROL_TYPE SCSI_ADAPTER_CONTROL_TYPE
_SCSI_ADAPTER_CONTROL_STATUS
Definition: srb.h:182
SCSIPORT_API UCHAR NTAPI ScsiPortReadPortUchar(IN PUCHAR Port)
Definition: scsiport.c:1374
PVOID SenseInfoBuffer
Definition: srb.h:256
struct tagContext Context
Definition: acpixf.h:1034
#define BOOLEAN
Definition: pedump.c:73
VOID(NTAPI * PHW_TIMER)(IN PVOID DeviceExtension)
Definition: srb.h:448
INTERFACE_TYPE AdapterInterfaceType
Definition: srb.h:557
unsigned int ULONG
Definition: retypes.h:1
struct _STOR_DEVICE_CAPABILITIES STOR_DEVICE_CAPABILITIES
SCSIPORT_API VOID __cdecl ScsiPortNotification(IN SCSI_NOTIFICATION_TYPE NotificationType, IN PVOID HwDeviceExtension,...)
Definition: scsiport.c:1416
BOOLEAN MapBuffers
Definition: srb.h:572
struct _SCSI_POWER_REQUEST_BLOCK * PSCSI_POWER_REQUEST_BLOCK
SCSIPORT_API VOID NTAPI ScsiPortFlushDma(IN PVOID DeviceExtension)
Definition: scsiport.c:531
struct SRB_ALIGN _SRBEX_DATA_WMI * PSRBEX_DATA_WMI
SCSIPORT_API VOID NTAPI ScsiPortReadRegisterBufferUlong(IN PULONG Register, IN PULONG Buffer, IN ULONG Count)
Definition: scsiport.c:1411
struct _SCSI_SUPPORTED_CONTROL_TYPE_LIST SCSI_SUPPORTED_CONTROL_TYPE_LIST
IN PSCSI_REQUEST_BLOCK Srb
Definition: class2.h:49
ULONG DataTransferLength
Definition: srb.h:424
_In_ WDFDEVICE _In_ PPNP_BUS_INFORMATION BusInformation
Definition: wdfdevice.h:3912
SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterUshort(IN PUSHORT Register, IN USHORT Value)
Definition: scsiport.c:1609
SCSIPORT_API PVOID NTAPI ScsiPortGetUncachedExtension(IN PVOID HwDeviceExtension, IN PPORT_CONFIGURATION_INFORMATION ConfigInfo, IN ULONG NumberOfBytes)
Definition: scsiport.c:721
static const WCHAR Signature[]
Definition: parser.c:141
UCHAR Reserved5[16]
Definition: srb.h:300
UCHAR PnPSubFunction
Definition: srb.h:418
STOR_DEVICE_POWER_STATE DevicePowerState
Definition: srb.h:556
enum _STOR_POWER_ACTION * PSTOR_POWER_ACTION
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)
Definition: srb.h:460
STOR_PNP_ACTION PnPAction
Definition: srb.h:569
UCHAR SrbPowerFlags
Definition: srb.h:554
SCSIPORT_API VOID NTAPI ScsiPortStallExecution(IN ULONG Delay)
Definition: scsiport.c:1473
STOR_DEVICE_POWER_STATE DevicePowerState
Definition: srb.h:374
#define SRBEX_DATA_SCSI_CDB16_LENGTH
Definition: srb.h:480
unsigned short * PUSHORT
Definition: retypes.h:2
ULONG QueueSortKey
Definition: srb.h:262
#define WriteBuffer(BaseIoAddress, Buffer, Count)
Definition: atapi.h:344
SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterBufferUchar(IN PUCHAR Register, IN PUCHAR Buffer, IN ULONG Count)
Definition: scsiport.c:1558
VOID(NTAPI * PHW_DMA_STARTED)(IN PVOID DeviceExtension)
Definition: srb.h:454
SCSIPORT_API USHORT NTAPI ScsiPortReadRegisterUshort(IN PUSHORT Register)
Definition: scsiport.c:1449
_Must_inspect_result_ _In_ PVOID _In_ struct _HW_INITIALIZATION_DATA * HwInitializationData
Definition: srb.h:897
SCSIPORT_API VOID NTAPI ScsiPortIoMapTransfer(IN PVOID HwDeviceExtension, IN PSCSI_REQUEST_BLOCK Srb, IN PVOID LogicalAddress, IN ULONG Length)
Definition: scsiport.c:1271
struct _PORT_CONFIGURATION_INFORMATION * PPORT_CONFIGURATION_INFORMATION
#define SRBEX_DATA_IO_INFO_LENGTH
Definition: srb.h:574