ReactOS 0.4.15-dev-8344-g0574987
ntddscsi.h
Go to the documentation of this file.
1/*++ BUILD Version: 0001 // Increment this if a change has global effects
2
3Copyright (c) 1990-1993 Microsoft Corporation
4
5Module Name:
6
7 ntddscsi.h
8
9Abstract:
10
11 This is the include file that defines all constants and types for
12 accessing the SCSI port adapters.
13
14Author:
15
16 Jeff Havens
17
18Revision 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
60typedef struct _SCSI_PASS_THROUGH {
65 UCHAR Lun;
73 UCHAR Cdb[16];
75
76//
77// Define the SCSI pass through direct structure.
78//
79
80typedef struct _SCSI_PASS_THROUGH_DIRECT {
85 UCHAR Lun;
93 UCHAR Cdb[16];
95
96//
97// Define SCSI information.
98// Used with the IOCTL_SCSI_GET_INQUIRY_DATA IOCTL.
99//
100
101typedef 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
112typedef 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
122typedef struct _SCSI_INQUIRY_DATA {
125 UCHAR Lun;
131
132//
133// Define header for I/O control SRB.
134//
135
136typedef struct _SRB_IO_CONTROL {
138 UCHAR Signature[8];
144
145//
146// SCSI port driver capabilities structure.
147//
148
149typedef struct _IO_SCSI_CAPABILITIES {
150
151 //
152 // Length of this structure
153 //
154
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
201typedef struct _SCSI_ADDRESS {
206 UCHAR Lun;
208
209//
210// Define structure for returning crash dump pointers.
211//
212
213struct _ADAPTER_OBJECT;
214
215typedef 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
unsigned char BOOLEAN
struct _SCSI_PASS_THROUGH_DIRECT * PSCSI_PASS_THROUGH_DIRECT
struct _SCSI_PASS_THROUGH * PSCSI_PASS_THROUGH
struct _IO_SCSI_CAPABILITIES * PIO_SCSI_CAPABILITIES
struct _SCSI_PASS_THROUGH_DIRECT SCSI_PASS_THROUGH_DIRECT
struct _SCSI_INQUIRY_DATA SCSI_INQUIRY_DATA
struct _SCSI_ADAPTER_BUS_INFO SCSI_ADAPTER_BUS_INFO
struct _SRB_IO_CONTROL * PSRB_IO_CONTROL
struct _SCSI_ADDRESS * PSCSI_ADDRESS
struct _SCSI_INQUIRY_DATA * PSCSI_INQUIRY_DATA
struct _SCSI_BUS_DATA SCSI_BUS_DATA
struct _SCSI_ADDRESS SCSI_ADDRESS
struct _SCSI_BUS_DATA * PSCSI_BUS_DATA
struct _DUMP_POINTERS * PDUMP_POINTERS
struct _SRB_IO_CONTROL SRB_IO_CONTROL
struct _IO_SCSI_CAPABILITIES IO_SCSI_CAPABILITIES
struct _SCSI_PASS_THROUGH SCSI_PASS_THROUGH
struct _SCSI_ADAPTER_BUS_INFO * PSCSI_ADAPTER_BUS_INFO
struct _DUMP_POINTERS DUMP_POINTERS
unsigned short USHORT
Definition: pedump.c:61
PVOID CommonBufferVa
Definition: scsi_port.h:162
PVOID PortConfiguration
Definition: scsi_port.h:161
LARGE_INTEGER CommonBufferPa
Definition: scsi_port.h:163
struct _ADAPTER_OBJECT * AdapterObject
Definition: scsi_port.h:159
PVOID MappedRegisterBase
Definition: scsi_port.h:160
ULONG CommonBufferSize
Definition: scsi_port.h:164
BOOLEAN AdapterScansDown
Definition: scsi_port.h:142
ULONG SupportedAsynchronousEvents
Definition: scsi_port.h:139
SCSI_BUS_DATA BusData[1]
Definition: scsi_port.h:106
UCHAR PathId
Definition: scsi_port.h:149
UCHAR TargetId
Definition: scsi_port.h:150
ULONG Length
Definition: scsi_port.h:147
UCHAR PortNumber
Definition: scsi_port.h:148
ULONG InquiryDataOffset
Definition: scsi_port.h:98
UCHAR NumberOfLogicalUnits
Definition: scsi_port.h:96
UCHAR InitiatorBusId
Definition: scsi_port.h:97
UCHAR InquiryData[1]
Definition: scsi_port.h:119
ULONG NextInquiryDataOffset
Definition: scsi_port.h:118
ULONG InquiryDataLength
Definition: scsi_port.h:117
BOOLEAN DeviceClaimed
Definition: scsi_port.h:116
UCHAR SenseInfoLength
Definition: scsi_port.h:65
UCHAR Cdb[16]
Definition: scsi_port.h:71
ULONG DataTransferLength
Definition: scsi_port.h:67
ULONG SenseInfoOffset
Definition: scsi_port.h:70
ULONG DataBufferOffset
Definition: scsi_port.h:69
UCHAR Signature[8]
Definition: scsi_port.h:126
ULONG ControlCode
Definition: scsi_port.h:128
ULONG HeaderLength
Definition: scsi_port.h:125
ULONG ReturnCode
Definition: scsi_port.h:129
uint32_t ULONG
Definition: typedefs.h:59
unsigned char UCHAR
Definition: xmlstorage.h:181