ReactOS  0.4.13-dev-656-g74bcf30
ntddscsi.h
Go to the documentation of this file.
1 /*++ BUILD Version: 0001 // Increment this if a change has global effects
2 
3 Copyright (c) 1990-1993 Microsoft Corporation
4 
5 Module Name:
6 
7  ntddscsi.h
8 
9 Abstract:
10 
11  This is the include file that defines all constants and types for
12  accessing the SCSI port adapters.
13 
14 Author:
15 
16  Jeff Havens
17 
18 Revision History:
19 
20 --*/
21 
22 #ifndef _NTDDSCSIH_
23 #define _NTDDSCSIH_
24 
25 #pragma pack(push, 8)
26 
27 //
28 // Device Name - this string is the name of the device. It is the name
29 // that should be passed to NtOpenFile when accessing the device.
30 //
31 // Note: For devices that support multiple units, it should be suffixed
32 // with the Ascii representation of the unit number.
33 //
34 
35 #define IOCTL_SCSI_BASE FILE_DEVICE_CONTROLLER
36 
37 #define DD_SCSI_DEVICE_NAME "\\Device\\ScsiPort"
38 
39 
40 //
41 // NtDeviceIoControlFile IoControlCode values for this device.
42 //
43 // Warning: Remember that the low two bits of the code specify how the
44 // buffers are passed to the driver!
45 //
46 
47 #define IOCTL_SCSI_PASS_THROUGH CTL_CODE(IOCTL_SCSI_BASE, 0x0401, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
48 #define IOCTL_SCSI_MINIPORT CTL_CODE(IOCTL_SCSI_BASE, 0x0402, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
49 #define IOCTL_SCSI_GET_INQUIRY_DATA CTL_CODE(IOCTL_SCSI_BASE, 0x0403, METHOD_BUFFERED, FILE_ANY_ACCESS)
50 #define IOCTL_SCSI_GET_CAPABILITIES CTL_CODE(IOCTL_SCSI_BASE, 0x0404, METHOD_BUFFERED, FILE_ANY_ACCESS)
51 #define IOCTL_SCSI_PASS_THROUGH_DIRECT CTL_CODE(IOCTL_SCSI_BASE, 0x0405, METHOD_BUFFERED, FILE_READ_ACCESS | FILE_WRITE_ACCESS)
52 #define IOCTL_SCSI_GET_ADDRESS CTL_CODE(IOCTL_SCSI_BASE, 0x0406, METHOD_BUFFERED, FILE_ANY_ACCESS)
53 #define IOCTL_SCSI_RESCAN_BUS CTL_CODE(IOCTL_SCSI_BASE, 0x0407, METHOD_BUFFERED, FILE_ANY_ACCESS)
54 #define IOCTL_SCSI_GET_DUMP_POINTERS CTL_CODE(IOCTL_SCSI_BASE, 0x0408, METHOD_BUFFERED, FILE_ANY_ACCESS)
55 
56 //
57 // Define the SCSI pass through structure.
58 //
59 
60 typedef struct _SCSI_PASS_THROUGH {
61  USHORT Length;
63  UCHAR PathId;
65  UCHAR Lun;
68  UCHAR DataIn;
73  UCHAR Cdb[16];
75 
76 //
77 // Define the SCSI pass through direct structure.
78 //
79 
80 typedef struct _SCSI_PASS_THROUGH_DIRECT {
81  USHORT Length;
83  UCHAR PathId;
85  UCHAR Lun;
88  UCHAR DataIn;
93  UCHAR Cdb[16];
95 
96 //
97 // Define SCSI information.
98 // Used with the IOCTL_SCSI_GET_INQUIRY_DATA IOCTL.
99 //
100 
101 typedef struct _SCSI_BUS_DATA {
106 
107 //
108 // Define SCSI adapter bus information structure..
109 // Used with the IOCTL_SCSI_GET_INQUIRY_DATA IOCTL.
110 //
111 
112 typedef struct _SCSI_ADAPTER_BUS_INFO {
116 
117 //
118 // Define SCSI adapter bus information.
119 // Used with the IOCTL_SCSI_GET_INQUIRY_DATA IOCTL.
120 //
121 
122 typedef struct _SCSI_INQUIRY_DATA {
123  UCHAR PathId;
124  UCHAR TargetId;
125  UCHAR Lun;
129  UCHAR InquiryData[1];
131 
132 //
133 // Define header for I/O control SRB.
134 //
135 
136 typedef struct _SRB_IO_CONTROL {
138  UCHAR Signature[8];
139  ULONG Timeout;
142  ULONG Length;
144 
145 //
146 // SCSI port driver capabilities structure.
147 //
148 
149 typedef struct _IO_SCSI_CAPABILITIES {
150 
151  //
152  // Length of this structure
153  //
154 
155  ULONG Length;
156 
157  //
158  // Maximum transfer size in single SRB
159  //
160 
162 
163  //
164  // Maximum number of physical pages per data buffer
165  //
166 
168 
169  //
170  // Async calls from port to class
171  //
172 
174 
175  //
176  // Alignment mask for data transfers.
177  //
178 
180 
181  //
182  // Supports tagged queuing
183  //
184 
186 
187  //
188  // Host adapter scans down for bios devices.
189  //
190 
192 
193  //
194  // The host adapter uses programmed I/O.
195  //
196 
198 
200 
201 typedef struct _SCSI_ADDRESS {
202  ULONG Length;
204  UCHAR PathId;
205  UCHAR TargetId;
206  UCHAR Lun;
208 
209 //
210 // Define structure for returning crash dump pointers.
211 //
212 
213 struct _ADAPTER_OBJECT;
214 
215 typedef struct _DUMP_POINTERS {
223 
224 //
225 // Define values for pass-through DataIn field.
226 //
227 
228 #define SCSI_IOCTL_DATA_OUT 0
229 #define SCSI_IOCTL_DATA_IN 1
230 #define SCSI_IOCTL_DATA_UNSPECIFIED 2
231 
232 #pragma pack(pop)
233 
234 #endif
235 
UCHAR PathId
Definition: scsi_port.h:149
UCHAR PortNumber
Definition: scsi_port.h:148
ULONG SupportedAsynchronousEvents
Definition: scsi_port.h:139
PVOID MappedRegisterBase
Definition: scsi_port.h:160
struct _SCSI_PASS_THROUGH_DIRECT * PSCSI_PASS_THROUGH_DIRECT
BOOLEAN AdapterScansDown
Definition: scsi_port.h:142
ULONG Length
Definition: scsi_port.h:147
struct _SCSI_INQUIRY_DATA SCSI_INQUIRY_DATA
struct _IO_SCSI_CAPABILITIES * PIO_SCSI_CAPABILITIES
ULONG DataBufferOffset
Definition: scsi_port.h:69
ULONG ControlCode
Definition: scsi_port.h:128
ULONG SenseInfoOffset
Definition: scsi_port.h:70
PVOID CommonBufferVa
Definition: scsi_port.h:162
ULONG NextInquiryDataOffset
Definition: scsi_port.h:118
UCHAR TargetId
Definition: scsi_port.h:150
struct _SCSI_ADDRESS * PSCSI_ADDRESS
SCSI_BUS_DATA BusData[1]
Definition: scsi_port.h:106
struct _SRB_IO_CONTROL SRB_IO_CONTROL
UCHAR Cdb[16]
Definition: scsi_port.h:71
ULONG DataTransferLength
Definition: scsi_port.h:67
ULONG ReturnCode
Definition: scsi_port.h:129
ULONG CommonBufferSize
Definition: scsi_port.h:164
UCHAR SenseInfoLength
Definition: scsi_port.h:65
unsigned char BOOLEAN
ULONG InquiryDataOffset
Definition: scsi_port.h:98
PVOID PortConfiguration
Definition: scsi_port.h:161
struct _SCSI_PASS_THROUGH_DIRECT SCSI_PASS_THROUGH_DIRECT
struct _SCSI_ADAPTER_BUS_INFO * PSCSI_ADAPTER_BUS_INFO
struct _SCSI_ADDRESS SCSI_ADDRESS
struct _DUMP_POINTERS * PDUMP_POINTERS
struct _ADAPTER_OBJECT * AdapterObject
Definition: scsi_port.h:159
struct _SCSI_BUS_DATA * PSCSI_BUS_DATA
LARGE_INTEGER CommonBufferPa
Definition: scsi_port.h:163
unsigned char UCHAR
Definition: xmlstorage.h:181
struct _SCSI_ADAPTER_BUS_INFO SCSI_ADAPTER_BUS_INFO
struct _SRB_IO_CONTROL * PSRB_IO_CONTROL
struct _IO_SCSI_CAPABILITIES IO_SCSI_CAPABILITIES
struct _SCSI_PASS_THROUGH * PSCSI_PASS_THROUGH
struct _SCSI_INQUIRY_DATA * PSCSI_INQUIRY_DATA
UCHAR InquiryData[1]
Definition: scsi_port.h:119
struct _DUMP_POINTERS DUMP_POINTERS
unsigned short USHORT
Definition: pedump.c:61
ULONG InquiryDataLength
Definition: scsi_port.h:117
UCHAR InitiatorBusId
Definition: scsi_port.h:97
struct _SCSI_BUS_DATA SCSI_BUS_DATA
BOOLEAN DeviceClaimed
Definition: scsi_port.h:116
UCHAR Signature[8]
Definition: scsi_port.h:126
unsigned int ULONG
Definition: retypes.h:1
UCHAR NumberOfLogicalUnits
Definition: scsi_port.h:96
ULONG HeaderLength
Definition: scsi_port.h:125
struct _SCSI_PASS_THROUGH SCSI_PASS_THROUGH