ReactOS  0.4.14-dev-49-gfb4591c
storport.h
Go to the documentation of this file.
1 /*
2  * storport.h
3  *
4  * StorPort interface
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 _NTSTORPORT_
24 #define _NTSTORPORT_
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 #if defined(_STORPORT_)
31 #define STORPORT_API
32 #else
33 #define STORPORT_API DECLSPEC_IMPORT
34 #endif
35 
36 #define DIRECT_ACCESS_DEVICE 0x00
37 #define SEQUENTIAL_ACCESS_DEVICE 0x01
38 #define PRINTER_DEVICE 0x02
39 #define PROCESSOR_DEVICE 0x03
40 #define WRITE_ONCE_READ_MULTIPLE_DEVICE 0x04
41 #define READ_ONLY_DIRECT_ACCESS_DEVICE 0x05
42 #define SCANNER_DEVICE 0x06
43 #define OPTICAL_DEVICE 0x07
44 #define MEDIUM_CHANGER 0x08
45 #define COMMUNICATION_DEVICE 0x09
46 #define ARRAY_CONTROLLER_DEVICE 0x0C
47 #define SCSI_ENCLOSURE_DEVICE 0x0D
48 #define REDUCED_BLOCK_DEVICE 0x0E
49 #define OPTICAL_CARD_READER_WRITER_DEVICE 0x0F
50 #define BRIDGE_CONTROLLER_DEVICE 0x10
51 #define OBJECT_BASED_STORAGE_DEVICE 0x11
52 #define LOGICAL_UNIT_NOT_PRESENT_DEVICE 0x7F
53 
54 #define DEVICE_CONNECTED 0x00
55 
56 #define CDB6GENERIC_LENGTH 6
57 #define CDB10GENERIC_LENGTH 10
58 #define CDB12GENERIC_LENGTH 12
59 
60 #define INQUIRYDATABUFFERSIZE 36
61 #define SENSE_BUFFER_SIZE 18
62 #define MAX_SENSE_BUFFER_SIZE 255
63 
64 #define FILE_DEVICE_SCSI 0x0000001b
65 #define IOCTL_SCSI_EXECUTE_IN ((FILE_DEVICE_SCSI << 16) + 0x0011)
66 #define IOCTL_SCSI_EXECUTE_OUT ((FILE_DEVICE_SCSI << 16) + 0x0012)
67 #define IOCTL_SCSI_EXECUTE_NONE ((FILE_DEVICE_SCSI << 16) + 0x0013)
68 
69 #define MODE_PAGE_VENDOR_SPECIFIC 0x00
70 #define MODE_PAGE_ERROR_RECOVERY 0x01
71 #define MODE_PAGE_DISCONNECT 0x02
72 #define MODE_PAGE_FORMAT_DEVICE 0x03
73 #define MODE_PAGE_MRW 0x03
74 #define MODE_PAGE_RIGID_GEOMETRY 0x04
75 #define MODE_PAGE_FLEXIBILE 0x05
76 #define MODE_PAGE_WRITE_PARAMETERS 0x05
77 #define MODE_PAGE_VERIFY_ERROR 0x07
78 #define MODE_PAGE_CACHING 0x08
79 #define MODE_PAGE_PERIPHERAL 0x09
80 #define MODE_PAGE_CONTROL 0x0A
81 #define MODE_PAGE_MEDIUM_TYPES 0x0B
82 #define MODE_PAGE_NOTCH_PARTITION 0x0C
83 #define MODE_PAGE_CD_AUDIO_CONTROL 0x0E
84 #define MODE_PAGE_DATA_COMPRESS 0x0F
85 #define MODE_PAGE_DEVICE_CONFIG 0x10
86 #define MODE_PAGE_XOR_CONTROL 0x10
87 #define MODE_PAGE_MEDIUM_PARTITION 0x11
88 #define MODE_PAGE_ENCLOSURE_SERVICES_MANAGEMENT 0x14
89 #define MODE_PAGE_EXTENDED 0x15
90 #define MODE_PAGE_EXTENDED_DEVICE_SPECIFIC 0x16
91 #define MODE_PAGE_CDVD_FEATURE_SET 0x18
92 #define MODE_PAGE_PROTOCOL_SPECIFIC_LUN 0x18
93 #define MODE_PAGE_PROTOCOL_SPECIFIC_PORT 0x19
94 #define MODE_PAGE_POWER_CONDITION 0x1A
95 #define MODE_PAGE_LUN_MAPPING 0x1B
96 #define MODE_PAGE_FAULT_REPORTING 0x1C
97 #define MODE_PAGE_CDVD_INACTIVITY 0x1D
98 #define MODE_PAGE_ELEMENT_ADDRESS 0x1D
99 #define MODE_PAGE_TRANSPORT_GEOMETRY 0x1E
100 #define MODE_PAGE_DEVICE_CAPABILITIES 0x1F
101 #define MODE_PAGE_CAPABILITIES 0x2A
102 #define MODE_SENSE_RETURN_ALL 0x3F
103 
104 #define MODE_SENSE_CURRENT_VALUES 0x00
105 #define MODE_SENSE_CHANGEABLE_VALUES 0x40
106 #define MODE_SENSE_DEFAULT_VAULES 0x80
107 #define MODE_SENSE_SAVED_VALUES 0xc0
108 
109 #define SCSIOP_TEST_UNIT_READY 0x00
110 #define SCSIOP_REZERO_UNIT 0x01
111 #define SCSIOP_REWIND 0x01
112 #define SCSIOP_REQUEST_BLOCK_ADDR 0x02
113 #define SCSIOP_REQUEST_SENSE 0x03
114 #define SCSIOP_FORMAT_UNIT 0x04
115 #define SCSIOP_READ_BLOCK_LIMITS 0x05
116 #define SCSIOP_REASSIGN_BLOCKS 0x07
117 #define SCSIOP_INIT_ELEMENT_STATUS 0x07
118 #define SCSIOP_READ6 0x08
119 #define SCSIOP_RECEIVE 0x08
120 #define SCSIOP_WRITE6 0x0A
121 #define SCSIOP_PRINT 0x0A
122 #define SCSIOP_SEND 0x0A
123 #define SCSIOP_SEEK6 0x0B
124 #define SCSIOP_TRACK_SELECT 0x0B
125 #define SCSIOP_SLEW_PRINT 0x0B
126 #define SCSIOP_SET_CAPACITY 0x0B
127 #define SCSIOP_SEEK_BLOCK 0x0C
128 #define SCSIOP_PARTITION 0x0D
129 #define SCSIOP_READ_REVERSE 0x0F
130 #define SCSIOP_WRITE_FILEMARKS 0x10
131 #define SCSIOP_FLUSH_BUFFER 0x10
132 #define SCSIOP_SPACE 0x11
133 #define SCSIOP_INQUIRY 0x12
134 #define SCSIOP_VERIFY6 0x13
135 #define SCSIOP_RECOVER_BUF_DATA 0x14
136 #define SCSIOP_MODE_SELECT 0x15
137 #define SCSIOP_RESERVE_UNIT 0x16
138 #define SCSIOP_RELEASE_UNIT 0x17
139 #define SCSIOP_COPY 0x18
140 #define SCSIOP_ERASE 0x19
141 #define SCSIOP_MODE_SENSE 0x1A
142 #define SCSIOP_START_STOP_UNIT 0x1B
143 #define SCSIOP_STOP_PRINT 0x1B
144 #define SCSIOP_LOAD_UNLOAD 0x1B
145 #define SCSIOP_RECEIVE_DIAGNOSTIC 0x1C
146 #define SCSIOP_SEND_DIAGNOSTIC 0x1D
147 #define SCSIOP_MEDIUM_REMOVAL 0x1E
148 #define SCSIOP_READ_FORMATTED_CAPACITY 0x23
149 #define SCSIOP_READ_CAPACITY 0x25
150 #define SCSIOP_READ 0x28
151 #define SCSIOP_WRITE 0x2A
152 #define SCSIOP_SEEK 0x2B
153 #define SCSIOP_LOCATE 0x2B
154 #define SCSIOP_POSITION_TO_ELEMENT 0x2B
155 #define SCSIOP_WRITE_VERIFY 0x2E
156 #define SCSIOP_VERIFY 0x2F
157 #define SCSIOP_SEARCH_DATA_HIGH 0x30
158 #define SCSIOP_SEARCH_DATA_EQUAL 0x31
159 #define SCSIOP_SEARCH_DATA_LOW 0x32
160 #define SCSIOP_SET_LIMITS 0x33
161 #define SCSIOP_READ_POSITION 0x34
162 #define SCSIOP_SYNCHRONIZE_CACHE 0x35
163 #define SCSIOP_COMPARE 0x39
164 #define SCSIOP_COPY_COMPARE 0x3A
165 #define SCSIOP_WRITE_DATA_BUFF 0x3B
166 #define SCSIOP_READ_DATA_BUFF 0x3C
167 #define SCSIOP_WRITE_LONG 0x3F
168 #define SCSIOP_CHANGE_DEFINITION 0x40
169 #define SCSIOP_WRITE_SAME 0x41
170 #define SCSIOP_READ_SUB_CHANNEL 0x42
171 #define SCSIOP_READ_TOC 0x43
172 #define SCSIOP_READ_HEADER 0x44
173 #define SCSIOP_REPORT_DENSITY_SUPPORT 0x44
174 #define SCSIOP_PLAY_AUDIO 0x45
175 #define SCSIOP_GET_CONFIGURATION 0x46
176 #define SCSIOP_PLAY_AUDIO_MSF 0x47
177 #define SCSIOP_PLAY_TRACK_INDEX 0x48
178 #define SCSIOP_PLAY_TRACK_RELATIVE 0x49
179 #define SCSIOP_GET_EVENT_STATUS 0x4A
180 #define SCSIOP_PAUSE_RESUME 0x4B
181 #define SCSIOP_LOG_SELECT 0x4C
182 #define SCSIOP_LOG_SENSE 0x4D
183 #define SCSIOP_STOP_PLAY_SCAN 0x4E
184 #define SCSIOP_XDWRITE 0x50
185 #define SCSIOP_XPWRITE 0x51
186 #define SCSIOP_READ_DISK_INFORMATION 0x51
187 #define SCSIOP_READ_DISC_INFORMATION 0x51
188 #define SCSIOP_READ_TRACK_INFORMATION 0x52
189 #define SCSIOP_XDWRITE_READ 0x53
190 #define SCSIOP_RESERVE_TRACK_RZONE 0x53
191 #define SCSIOP_SEND_OPC_INFORMATION 0x54
192 #define SCSIOP_MODE_SELECT10 0x55
193 #define SCSIOP_RESERVE_UNIT10 0x56
194 #define SCSIOP_RESERVE_ELEMENT 0x56
195 #define SCSIOP_RELEASE_UNIT10 0x57
196 #define SCSIOP_RELEASE_ELEMENT 0x57
197 #define SCSIOP_REPAIR_TRACK 0x58
198 #define SCSIOP_MODE_SENSE10 0x5A
199 #define SCSIOP_CLOSE_TRACK_SESSION 0x5B
200 #define SCSIOP_READ_BUFFER_CAPACITY 0x5C
201 #define SCSIOP_SEND_CUE_SHEET 0x5D
202 #define SCSIOP_PERSISTENT_RESERVE_IN 0x5E
203 #define SCSIOP_PERSISTENT_RESERVE_OUT 0x5F
204 #define SCSIOP_XDWRITE_EXTENDED16 0x80
205 #define SCSIOP_WRITE_FILEMARKS16 0x80
206 #define SCSIOP_REBUILD16 0x81
207 #define SCSIOP_READ_REVERSE16 0x81
208 #define SCSIOP_REGENERATE16 0x82
209 #define SCSIOP_EXTENDED_COPY 0x83
210 #define SCSIOP_RECEIVE_COPY_RESULTS 0x84
211 #define SCSIOP_ATA_PASSTHROUGH16 0x85
212 #define SCSIOP_ACCESS_CONTROL_IN 0x86
213 #define SCSIOP_ACCESS_CONTROL_OUT 0x87
214 #define SCSIOP_READ16 0x88
215 #define SCSIOP_WRITE16 0x8A
216 #define SCSIOP_READ_ATTRIBUTES 0x8C
217 #define SCSIOP_WRITE_ATTRIBUTES 0x8D
218 #define SCSIOP_WRITE_VERIFY16 0x8E
219 #define SCSIOP_VERIFY16 0x8F
220 #define SCSIOP_PREFETCH16 0x90
221 #define SCSIOP_SYNCHRONIZE_CACHE16 0x91
222 #define SCSIOP_SPACE16 0x91
223 #define SCSIOP_LOCK_UNLOCK_CACHE16 0x92
224 #define SCSIOP_LOCATE16 0x92
225 #define SCSIOP_WRITE_SAME16 0x93
226 #define SCSIOP_ERASE16 0x93
227 #define SCSIOP_READ_CAPACITY16 0x9E
228 #define SCSIOP_SERVICE_ACTION_IN16 0x9E
229 #define SCSIOP_SERVICE_ACTION_OUT16 0x9F
230 #define SCSIOP_REPORT_LUNS 0xA0
231 #define SCSIOP_BLANK 0xA1
232 #define SCSIOP_ATA_PASSTHROUGH12 0xA1
233 #define SCSIOP_SEND_EVENT 0xA2
234 #define SCSIOP_SEND_KEY 0xA3
235 #define SCSIOP_MAINTENANCE_IN 0xA3
236 #define SCSIOP_REPORT_KEY 0xA4
237 #define SCSIOP_MAINTENANCE_OUT 0xA4
238 #define SCSIOP_MOVE_MEDIUM 0xA5
239 #define SCSIOP_LOAD_UNLOAD_SLOT 0xA6
240 #define SCSIOP_EXCHANGE_MEDIUM 0xA6
241 #define SCSIOP_SET_READ_AHEAD 0xA7
242 #define SCSIOP_MOVE_MEDIUM_ATTACHED 0xA7
243 #define SCSIOP_READ12 0xA8
244 #define SCSIOP_GET_MESSAGE 0xA8
245 #define SCSIOP_SERVICE_ACTION_OUT12 0xA9
246 #define SCSIOP_WRITE12 0xAA
247 #define SCSIOP_SEND_MESSAGE 0xAB
248 #define SCSIOP_SERVICE_ACTION_IN12 0xAB
249 #define SCSIOP_GET_PERFORMANCE 0xAC
250 #define SCSIOP_READ_DVD_STRUCTURE 0xAD
251 #define SCSIOP_WRITE_VERIFY12 0xAE
252 #define SCSIOP_VERIFY12 0xAF
253 #define SCSIOP_SEARCH_DATA_HIGH12 0xB0
254 #define SCSIOP_SEARCH_DATA_EQUAL12 0xB1
255 #define SCSIOP_SEARCH_DATA_LOW12 0xB2
256 #define SCSIOP_SET_LIMITS12 0xB3
257 #define SCSIOP_READ_ELEMENT_STATUS_ATTACHED 0xB4
258 #define SCSIOP_REQUEST_VOL_ELEMENT 0xB5
259 #define SCSIOP_SEND_VOLUME_TAG 0xB6
260 #define SCSIOP_SET_STREAMING 0xB6
261 #define SCSIOP_READ_DEFECT_DATA 0xB7
262 #define SCSIOP_READ_ELEMENT_STATUS 0xB8
263 #define SCSIOP_READ_CD_MSF 0xB9
264 #define SCSIOP_SCAN_CD 0xBA
265 #define SCSIOP_REDUNDANCY_GROUP_IN 0xBA
266 #define SCSIOP_SET_CD_SPEED 0xBB
267 #define SCSIOP_REDUNDANCY_GROUP_OUT 0xBB
268 #define SCSIOP_PLAY_CD 0xBC
269 #define SCSIOP_SPARE_IN 0xBC
270 #define SCSIOP_MECHANISM_STATUS 0xBD
271 #define SCSIOP_SPARE_OUT 0xBD
272 #define SCSIOP_READ_CD 0xBE
273 #define SCSIOP_VOLUME_SET_IN 0xBE
274 #define SCSIOP_SEND_DVD_STRUCTURE 0xBF
275 #define SCSIOP_VOLUME_SET_OUT 0xBF
276 #define SCSIOP_INIT_ELEMENT_RANGE 0xE7
277 
278 #define SCSISTAT_GOOD 0x00
279 #define SCSISTAT_CHECK_CONDITION 0x02
280 #define SCSISTAT_CONDITION_MET 0x04
281 #define SCSISTAT_BUSY 0x08
282 #define SCSISTAT_INTERMEDIATE 0x10
283 #define SCSISTAT_INTERMEDIATE_COND_MET 0x14
284 #define SCSISTAT_RESERVATION_CONFLICT 0x18
285 #define SCSISTAT_COMMAND_TERMINATED 0x22
286 #define SCSISTAT_QUEUE_FULL 0x28
287 
288 #define SETBITON 1
289 #define SETBITOFF 0
290 
291 #define SP_RETURN_NOT_FOUND 0
292 #define SP_RETURN_FOUND 1
293 #define SP_RETURN_ERROR 2
294 #define SP_RETURN_BAD_CONFIG 3
295 
296 #define SRB_FUNCTION_EXECUTE_SCSI 0x00
297 #define SRB_FUNCTION_CLAIM_DEVICE 0x01
298 #define SRB_FUNCTION_IO_CONTROL 0x02
299 #define SRB_FUNCTION_RECEIVE_EVENT 0x03
300 #define SRB_FUNCTION_RELEASE_QUEUE 0x04
301 #define SRB_FUNCTION_ATTACH_DEVICE 0x05
302 #define SRB_FUNCTION_RELEASE_DEVICE 0x06
303 #define SRB_FUNCTION_SHUTDOWN 0x07
304 #define SRB_FUNCTION_FLUSH 0x08
305 #define SRB_FUNCTION_ABORT_COMMAND 0x10
306 #define SRB_FUNCTION_RELEASE_RECOVERY 0x11
307 #define SRB_FUNCTION_RESET_BUS 0x12
308 #define SRB_FUNCTION_RESET_DEVICE 0x13
309 #define SRB_FUNCTION_TERMINATE_IO 0x14
310 #define SRB_FUNCTION_FLUSH_QUEUE 0x15
311 #define SRB_FUNCTION_REMOVE_DEVICE 0x16
312 #define SRB_FUNCTION_WMI 0x17
313 #define SRB_FUNCTION_LOCK_QUEUE 0x18
314 #define SRB_FUNCTION_UNLOCK_QUEUE 0x19
315 #define SRB_FUNCTION_RESET_LOGICAL_UNIT 0x20
316 #define SRB_FUNCTION_SET_LINK_TIMEOUT 0x21
317 #define SRB_FUNCTION_LINK_TIMEOUT_OCCURRED 0x22
318 #define SRB_FUNCTION_LINK_TIMEOUT_COMPLETE 0x23
319 #define SRB_FUNCTION_POWER 0x24
320 #define SRB_FUNCTION_PNP 0x25
321 #define SRB_FUNCTION_DUMP_POINTERS 0x26
322 
323 #define SRB_STATUS_PENDING 0x00
324 #define SRB_STATUS_SUCCESS 0x01
325 #define SRB_STATUS_ABORTED 0x02
326 #define SRB_STATUS_ABORT_FAILED 0x03
327 #define SRB_STATUS_ERROR 0x04
328 #define SRB_STATUS_BUSY 0x05
329 #define SRB_STATUS_INVALID_REQUEST 0x06
330 #define SRB_STATUS_INVALID_PATH_ID 0x07
331 #define SRB_STATUS_NO_DEVICE 0x08
332 #define SRB_STATUS_TIMEOUT 0x09
333 #define SRB_STATUS_SELECTION_TIMEOUT 0x0A
334 #define SRB_STATUS_COMMAND_TIMEOUT 0x0B
335 #define SRB_STATUS_MESSAGE_REJECTED 0x0D
336 #define SRB_STATUS_BUS_RESET 0x0E
337 #define SRB_STATUS_PARITY_ERROR 0x0F
338 #define SRB_STATUS_REQUEST_SENSE_FAILED 0x10
339 #define SRB_STATUS_NO_HBA 0x11
340 #define SRB_STATUS_DATA_OVERRUN 0x12
341 #define SRB_STATUS_UNEXPECTED_BUS_FREE 0x13
342 #define SRB_STATUS_PHASE_SEQUENCE_FAILURE 0x14
343 #define SRB_STATUS_BAD_SRB_BLOCK_LENGTH 0x15
344 #define SRB_STATUS_REQUEST_FLUSHED 0x16
345 #define SRB_STATUS_INVALID_LUN 0x20
346 #define SRB_STATUS_INVALID_TARGET_ID 0x21
347 #define SRB_STATUS_BAD_FUNCTION 0x22
348 #define SRB_STATUS_ERROR_RECOVERY 0x23
349 #define SRB_STATUS_NOT_POWERED 0x24
350 #define SRB_STATUS_LINK_DOWN 0x25
351 #define SRB_STATUS_INTERNAL_ERROR 0x30
352 #define SRB_STATUS_QUEUE_FROZEN 0x40
353 #define SRB_STATUS_AUTOSENSE_VALID 0x80
354 #define SRB_STATUS(Status) (Status & ~(SRB_STATUS_AUTOSENSE_VALID | SRB_STATUS_QUEUE_FROZEN))
355 
356 #define SRB_FLAGS_QUEUE_ACTION_ENABLE 0x00000002
357 #define SRB_FLAGS_DISABLE_DISCONNECT 0x00000004
358 #define SRB_FLAGS_DISABLE_SYNCH_TRANSFER 0x00000008
359 
360 #define SRB_FLAGS_BYPASS_FROZEN_QUEUE 0x00000010
361 #define SRB_FLAGS_DISABLE_AUTOSENSE 0x00000020
362 #define SRB_FLAGS_DATA_IN 0x00000040
363 #define SRB_FLAGS_DATA_OUT 0x00000080
364 #define SRB_FLAGS_NO_DATA_TRANSFER 0x00000000
365 #define SRB_FLAGS_UNSPECIFIED_DIRECTION (SRB_FLAGS_DATA_IN | SRB_FLAGS_DATA_OUT)
366 
367 #define SRB_FLAGS_NO_QUEUE_FREEZE 0x00000100
368 #define SRB_FLAGS_ADAPTER_CACHE_ENABLE 0x00000200
369 #define SRB_FLAGS_FREE_SENSE_BUFFER 0x00000400
370 
371 #define SRB_FLAGS_IS_ACTIVE 0x00010000
372 #define SRB_FLAGS_ALLOCATED_FROM_ZONE 0x00020000
373 #define SRB_FLAGS_SGLIST_FROM_POOL 0x00040000
374 #define SRB_FLAGS_BYPASS_LOCKED_QUEUE 0x00080000
375 
376 #define SRB_FLAGS_NO_KEEP_AWAKE 0x00100000
377 #define SRB_FLAGS_PORT_DRIVER_ALLOCSENSE 0x00200000
378 
379 #define SRB_FLAGS_PORT_DRIVER_SENSEHASPORT 0x00400000
380 #define SRB_FLAGS_DONT_START_NEXT_PACKET 0x00800000
381 
382 #define SRB_FLAGS_PORT_DRIVER_RESERVED 0x0F000000
383 #define SRB_FLAGS_CLASS_DRIVER_RESERVED 0xF0000000
384 
385 #define SRB_SIMPLE_TAG_REQUEST 0x20
386 #define SRB_HEAD_OF_QUEUE_TAG_REQUEST 0x21
387 #define SRB_ORDERED_QUEUE_TAG_REQUEST 0x22
388 
389 #define SRB_WMI_FLAGS_ADAPTER_REQUEST 0x01
390 #define SRB_POWER_FLAGS_ADAPTER_REQUEST 0x01
391 #define SRB_PNP_FLAGS_ADAPTER_REQUEST 0x01
392 
393 #define STOR_MAP_NO_BUFFERS (0)
394 #define STOR_MAP_ALL_BUFFERS (1)
395 #define STOR_MAP_NON_READ_WRITE_BUFFERS (2)
396 
397 #define VPD_SUPPORTED_PAGES 0x00
398 #define VPD_SERIAL_NUMBER 0x80
399 #define VPD_DEVICE_IDENTIFIERS 0x83
400 #define VPD_MEDIA_SERIAL_NUMBER 0x84
401 #define VPD_SOFTWARE_INTERFACE_IDENTIFIERS 0x84
402 #define VPD_NETWORK_MANAGEMENT_ADDRESSES 0x85
403 #define VPD_EXTENDED_INQUIRY_DATA 0x86
404 #define VPD_MODE_PAGE_POLICY 0x87
405 #define VPD_SCSI_PORTS 0x88
406 
407 #define SCSI_SENSE_NO_SENSE 0x00
408 #define SCSI_SENSE_RECOVERED_ERROR 0x01
409 #define SCSI_SENSE_NOT_READY 0x02
410 #define SCSI_SENSE_MEDIUM_ERROR 0x03
411 #define SCSI_SENSE_HARDWARE_ERROR 0x04
412 #define SCSI_SENSE_ILLEGAL_REQUEST 0x05
413 #define SCSI_SENSE_UNIT_ATTENTION 0x06
414 #define SCSI_SENSE_DATA_PROTECT 0x07
415 #define SCSI_SENSE_BLANK_CHECK 0x08
416 #define SCSI_SENSE_UNIQUE 0x09
417 #define SCSI_SENSE_COPY_ABORTED 0x0A
418 #define SCSI_SENSE_ABORTED_COMMAND 0x0B
419 #define SCSI_SENSE_EQUAL 0x0C
420 #define SCSI_SENSE_VOL_OVERFLOW 0x0D
421 #define SCSI_SENSE_MISCOMPARE 0x0E
422 #define SCSI_SENSE_RESERVED 0x0F
423 
425 {
429 
430 typedef enum _STOR_DMA_WIDTH
431 {
437 
438 typedef enum _STOR_SPINLOCK
439 {
440  DpcLock = 1,
443 } STOR_SPINLOCK;
444 
446 {
455 
457 {
461 
463 {
486 
488 {
496 
497 typedef enum _STOR_POWER_ACTION
498 {
508 
509 typedef enum _STOR_PNP_ACTION
510 {
519 
520 typedef enum _VPD_CODE_SET
521 {
527 
528 typedef enum _VPD_ASSOCIATION
529 {
536 
538 {
549 
551 {
569 #if (NTDDI_VERSION >= NTDDI_WIN7)
579 #endif
581 
583 {
589 
590 typedef enum _GETSGSTATUS
591 {
595 
596 typedef struct _SCSI_REQUEST_BLOCK
597 {
598  USHORT Length;
599  UCHAR Function;
602  UCHAR PathId;
603  UCHAR TargetId;
604  UCHAR Lun;
605  UCHAR QueueTag;
609  ULONG SrbFlags;
617  union
618  {
622  };
623 #if defined(_WIN64)
624  ULONG Reserved;
625 #endif
626  UCHAR Cdb[16];
628 
629 typedef struct _SCSI_WMI_REQUEST_BLOCK
630 {
631  USHORT Length;
632  UCHAR Function;
635  UCHAR PathId;
636  UCHAR TargetId;
637  UCHAR Lun;
639  UCHAR WMIFlags;
640  UCHAR Reserved2[2];
641  ULONG SrbFlags;
645  PVOID DataPath;
650 #if (NTDDI_VERSION >= NTDDI_WS03SP1) && defined(_WIN64)
651  ULONG Reserved6;
652 #endif
653  UCHAR Reserved5[16];
655 
656 typedef struct _SCSI_POWER_REQUEST_BLOCK
657 {
658  USHORT Length;
659  UCHAR Function;
662  UCHAR PathId;
663  UCHAR TargetId;
664  UCHAR Lun;
666  ULONG SrbFlags;
675 #if defined(_WIN64)
676  ULONG Reserved;
677 #endif
678  UCHAR Reserved5[16];
680 
681 typedef struct _STOR_DEVICE_CAPABILITIES
682 {
683  USHORT Version;
684  ULONG DeviceD1:1;
685  ULONG DeviceD2:1;
688  ULONG Removable:1;
689  ULONG DockDevice:1;
690  ULONG UniqueID:1;
695 
696 typedef struct _SCSI_PNP_REQUEST_BLOCK
697 {
698  USHORT Length;
699  UCHAR Function;
702  UCHAR PathId;
703  UCHAR TargetId;
704  UCHAR Lun;
706  ULONG SrbFlags;
715 #if defined(_WIN64)
716  ULONG Reserved;
717 #endif
718  UCHAR Reserved4[16];
720 
721 #include <pshpack1.h>
722 typedef union _CDB
723 {
724  struct _CDB6GENERIC
725  {
727  UCHAR Immediate:1;
731  UCHAR Link:1;
732  UCHAR Flag:1;
733  UCHAR Reserved:4;
736  struct _CDB6READWRITE
737  {
744  UCHAR Control;
746  struct _CDB6INQUIRY
747  {
749  UCHAR Reserved1:5;
751  UCHAR PageCode;
754  UCHAR Control;
756  struct _CDB6INQUIRY3
757  {
761  UCHAR Reserved1:6;
762  UCHAR PageCode;
765  UCHAR Control;
767  struct _CDB6VERIFY
768  {
770  UCHAR Fixed:1;
771  UCHAR ByteCompare:1;
772  UCHAR Immediate:1;
773  UCHAR Reserved:2;
776  UCHAR Control;
778  struct _CDB6FORMAT
779  {
788  struct _CDB10
789  {
792  UCHAR Reserved1:2;
803  UCHAR Control;
804  } CDB10, *PCDB10;
805  struct _CDB12
806  {
809  UCHAR Reserved1:2;
813  UCHAR LogicalBlock[4];
816  UCHAR Control;
817  } CDB12, *PCDB12;
818  struct _CDB16
819  {
821  UCHAR Reserved1:3;
824  UCHAR Protection:3;
825  UCHAR LogicalBlock[8];
828  UCHAR Control;
829  } CDB16, *PCDB16;
830  struct _PAUSE_RESUME
831  {
833  UCHAR Reserved1:5;
835  UCHAR Reserved2[6];
836  UCHAR Action;
837  UCHAR Control;
839  struct _READ_TOC
840  {
842  UCHAR Reserved0:1;
843  UCHAR Msf:1;
844  UCHAR Reserved1:3;
846  UCHAR Format2:4;
847  UCHAR Reserved2:4;
848  UCHAR Reserved3[3];
851  UCHAR Control:6;
852  UCHAR Format:2;
853  } READ_TOC, *PREAD_TOC;
854  struct _READ_DISK_INFORMATION
855  {
857  UCHAR Reserved1:5;
858  UCHAR Lun:3;
859  UCHAR Reserved2[5];
861  UCHAR Control;
863  struct _READ_TRACK_INFORMATION
864  {
866  UCHAR Track:1;
867  UCHAR Reserved1:3;
868  UCHAR Reserved2:1;
869  UCHAR Lun:3;
870  UCHAR BlockAddress[4];
873  UCHAR Control;
875  struct _RESERVE_TRACK_RZONE
876  {
878  UCHAR Reserved1[4];
880  UCHAR Control;
882  struct _SEND_OPC_INFORMATION
883  {
885  UCHAR DoOpc:1;
886  UCHAR Reserved1:7;
887  UCHAR Exclude0:1;
888  UCHAR Exclude1:1;
889  UCHAR Reserved2:6;
890  UCHAR Reserved3[4];
894  struct _REPAIR_TRACK
895  {
897  UCHAR Immediate:1;
898  UCHAR Reserved1:7;
899  UCHAR Reserved2[2];
900  UCHAR TrackNumber[2];
901  UCHAR Reserved3[3];
902  UCHAR Control;
904  struct _CLOSE_TRACK
905  {
907  UCHAR Immediate:1;
908  UCHAR Reserved1:7;
909  UCHAR Track:1;
910  UCHAR Session:1;
911  UCHAR Reserved2:6;
913  UCHAR TrackNumber[2];
914  UCHAR Reserved4[3];
915  UCHAR Control;
917  struct _READ_BUFFER_CAPACITY
918  {
920  UCHAR BlockInfo:1;
921  UCHAR Reserved1:7;
922  UCHAR Reserved2[5];
924  UCHAR Control;
926  struct _SEND_CUE_SHEET
927  {
929  UCHAR Reserved[5];
930  UCHAR CueSheetSize[3];
931  UCHAR Control;
933  struct _READ_HEADER
934  {
936  UCHAR Reserved1:1;
937  UCHAR Msf:1;
938  UCHAR Reserved2:3;
939  UCHAR Lun:3;
943  UCHAR Control;
945  struct _PLAY_AUDIO
946  {
948  UCHAR Reserved1:5;
952  UCHAR PlayLength[2];
953  UCHAR Control;
955  struct _PLAY_AUDIO_MSF
956  {
958  UCHAR Reserved1:5;
964  UCHAR EndingM;
965  UCHAR EndingS;
966  UCHAR EndingF;
967  UCHAR Control;
969  struct _BLANK_MEDIA
970  {
972  UCHAR BlankType:3;
973  UCHAR Reserved1:1;
974  UCHAR Immediate:1;
975  UCHAR Reserved2:3;
977  UCHAR Reserved3[5];
978  UCHAR Control;
980  struct _PLAY_CD
981  {
983  UCHAR Reserved1:1;
984  UCHAR CMSF:1;
986  UCHAR Lun:3;
987  _ANONYMOUS_UNION union
988  {
989  struct _LBA
990  {
992  UCHAR PlayLength[4];
993  } LBA;
994  struct _MSF
995  {
1000  UCHAR EndingM;
1001  UCHAR EndingS;
1002  UCHAR EndingF;
1003  UCHAR Reserved2;
1004  } MSF;
1005  } DUMMYUNIONNAME;
1006  UCHAR Audio:1;
1007  UCHAR Composite:1;
1008  UCHAR Port1:1;
1009  UCHAR Port2:1;
1010  UCHAR Reserved2:3;
1011  UCHAR Speed:1;
1012  UCHAR Control;
1013  } PLAY_CD, *PPLAY_CD;
1014  struct _SCAN_CD
1015  {
1018  UCHAR Reserved1:3;
1019  UCHAR Direct:1;
1020  UCHAR Lun:3;
1022  UCHAR Reserved2[3];
1023  UCHAR Reserved3:6;
1024  UCHAR Type:2;
1025  UCHAR Reserved4;
1026  UCHAR Control;
1027  } SCAN_CD, *PSCAN_CD;
1028  struct _STOP_PLAY_SCAN
1029  {
1031  UCHAR Reserved1:5;
1032  UCHAR Lun:3;
1033  UCHAR Reserved2[7];
1034  UCHAR Control;
1036  struct _SUBCHANNEL
1037  {
1039  UCHAR Reserved0:1;
1040  UCHAR Msf:1;
1041  UCHAR Reserved1:3;
1043  UCHAR Reserved2:6;
1044  UCHAR SubQ:1;
1045  UCHAR Reserved3:1;
1046  UCHAR Format;
1047  UCHAR Reserved4[2];
1050  UCHAR Control;
1051  } SUBCHANNEL, *PSUBCHANNEL;
1052  struct _READ_CD
1053  {
1056  UCHAR Reserved0:1;
1058  UCHAR Lun:3;
1059  UCHAR StartingLBA[4];
1060  UCHAR TransferBlocks[3];
1061  UCHAR Reserved2:1;
1062  UCHAR ErrorFlags:2;
1063  UCHAR IncludeEDC:1;
1065  UCHAR HeaderCode:2;
1068  UCHAR Reserved3:5;
1069  UCHAR Control;
1070  } READ_CD, *PREAD_CD;
1071  struct _READ_CD_MSF
1072  {
1075  UCHAR Reserved1:1;
1077  UCHAR Lun:3;
1078  UCHAR Reserved2;
1079  UCHAR StartingM;
1080  UCHAR StartingS;
1081  UCHAR StartingF;
1082  UCHAR EndingM;
1083  UCHAR EndingS;
1084  UCHAR EndingF;
1085  UCHAR Reserved3;
1086  UCHAR Reserved4:1;
1087  UCHAR ErrorFlags:2;
1088  UCHAR IncludeEDC:1;
1090  UCHAR HeaderCode:2;
1093  UCHAR Reserved5:5;
1094  UCHAR Control;
1096  struct _PLXTR_READ_CDDA
1097  {
1099  UCHAR Reserved0:5;
1109  UCHAR SubCode;
1110  UCHAR Control;
1112  struct _NEC_READ_CDDA
1113  {
1115  UCHAR Reserved0;
1120  UCHAR Reserved1;
1123  UCHAR Control;
1125  struct _MODE_SENSE
1126  {
1128  UCHAR Reserved1:3;
1129  UCHAR Dbd:1;
1130  UCHAR Reserved2:1;
1132  UCHAR PageCode:6;
1133  UCHAR Pc:2;
1134  UCHAR Reserved3;
1136  UCHAR Control;
1137  } MODE_SENSE, *PMODE_SENSE;
1138  struct _MODE_SENSE10
1139  {
1141  UCHAR Reserved1:3;
1142  UCHAR Dbd:1;
1143  UCHAR Reserved2:1;
1145  UCHAR PageCode:6;
1146  UCHAR Pc:2;
1147  UCHAR Reserved3[4];
1149  UCHAR Control;
1151  struct _MODE_SELECT
1152  {
1154  UCHAR SPBit:1;
1155  UCHAR Reserved1:3;
1156  UCHAR PFBit:1;
1158  UCHAR Reserved2[2];
1160  UCHAR Control;
1162  struct _MODE_SELECT10
1163  {
1165  UCHAR SPBit:1;
1166  UCHAR Reserved1:3;
1167  UCHAR PFBit:1;
1169  UCHAR Reserved2[5];
1171  UCHAR Control;
1173  struct _LOCATE
1174  {
1176  UCHAR Immediate:1;
1177  UCHAR CPBit:1;
1178  UCHAR BTBit:1;
1179  UCHAR Reserved1:2;
1181  UCHAR Reserved3;
1183  UCHAR Reserved4;
1184  UCHAR Partition;
1185  UCHAR Control;
1186  } LOCATE, *PLOCATE;
1187  struct _LOGSENSE
1188  {
1190  UCHAR SPBit:1;
1191  UCHAR PPCBit:1;
1192  UCHAR Reserved1:3;
1194  UCHAR PageCode:6;
1195  UCHAR PCBit:2;
1196  UCHAR Reserved2;
1197  UCHAR Reserved3;
1200  UCHAR Control;
1201  } LOGSENSE, *PLOGSENSE;
1202  struct _LOGSELECT
1203  {
1205  UCHAR SPBit:1;
1206  UCHAR PCRBit:1;
1207  UCHAR Reserved1:3;
1209  UCHAR Reserved:6;
1210  UCHAR PCBit:2;
1211  UCHAR Reserved2[4];
1213  UCHAR Control;
1214  } LOGSELECT, *PLOGSELECT;
1215  struct _PRINT
1216  {
1218  UCHAR Reserved:5;
1220  UCHAR TransferLength[3];
1221  UCHAR Control;
1222  } PRINT, *PPRINT;
1223  struct _SEEK
1224  {
1226  UCHAR Reserved1:5;
1229  UCHAR Reserved2[3];
1230  UCHAR Control;
1231  } SEEK, *PSEEK;
1232  struct _ERASE
1233  {
1235  UCHAR Long:1;
1236  UCHAR Immediate:1;
1237  UCHAR Reserved1:3;
1239  UCHAR Reserved2[3];
1240  UCHAR Control;
1241  } ERASE, *PERASE;
1242  struct _START_STOP
1243  {
1245  UCHAR Immediate:1;
1246  UCHAR Reserved1:4;
1248  UCHAR Reserved2[2];
1249  UCHAR Start:1;
1250  UCHAR LoadEject:1;
1251  UCHAR Reserved3:6;
1252  UCHAR Control;
1253  } START_STOP, *PSTART_STOP;
1254  struct _MEDIA_REMOVAL
1255  {
1257  UCHAR Reserved1:5;
1259  UCHAR Reserved2[2];
1260  UCHAR Prevent:1;
1261  UCHAR Persistant:1;
1262  UCHAR Reserved3:6;
1263  UCHAR Control;
1265  struct _SEEK_BLOCK
1266  {
1268  UCHAR Immediate:1;
1269  UCHAR Reserved1:7;
1270  UCHAR BlockAddress[3];
1271  UCHAR Link:1;
1272  UCHAR Flag:1;
1273  UCHAR Reserved2:4;
1274  UCHAR VendorUnique:2;
1275  } SEEK_BLOCK, *PSEEK_BLOCK;
1276  struct _REQUEST_BLOCK_ADDRESS
1277  {
1279  UCHAR Reserved1[3];
1281  UCHAR Link:1;
1282  UCHAR Flag:1;
1283  UCHAR Reserved2:4;
1284  UCHAR VendorUnique:2;
1286  struct _PARTITION
1287  {
1289  UCHAR Immediate:1;
1290  UCHAR Sel:1;
1292  UCHAR Reserved1[3];
1293  UCHAR Control;
1294  } PARTITION, *PPARTITION;
1295  struct _WRITE_TAPE_MARKS
1296  {
1298  UCHAR Immediate:1;
1299  UCHAR WriteSetMarks:1;
1300  UCHAR Reserved:3;
1302  UCHAR TransferLength[3];
1303  UCHAR Control;
1305  struct _SPACE_TAPE_MARKS
1306  {
1308  UCHAR Code:3;
1309  UCHAR Reserved:2;
1312  UCHAR NumMarks;
1314  union
1315  {
1316  UCHAR value;
1317  struct
1318  {
1319  UCHAR Link:1;
1320  UCHAR Flag:1;
1321  UCHAR Reserved:4;
1322  UCHAR VendorUnique:2;
1323  } Fields;
1324  } Byte6;
1326  struct _READ_POSITION
1327  {
1328  UCHAR Operation;
1329  UCHAR BlockType:1;
1330  UCHAR Reserved1:4;
1331  UCHAR Lun:3;
1332  UCHAR Reserved2[7];
1333  UCHAR Control;
1335  struct _CDB6READWRITETAPE
1336  {
1339  UCHAR Reserved:3;
1343  UCHAR Link:1;
1344  UCHAR Flag:1;
1345  UCHAR Reserved1:4;
1346  UCHAR VendorUnique:2;
1348  struct _INIT_ELEMENT_STATUS
1349  {
1351  UCHAR Reserved1:5;
1353  UCHAR Reserved2[3];
1354  UCHAR Reserved3:7;
1355  UCHAR NoBarCode:1;
1357  struct _INITIALIZE_ELEMENT_RANGE
1358  {
1360  UCHAR Range:1;
1361  UCHAR Reserved1:4;
1364  UCHAR Reserved2[2];
1366  UCHAR Reserved3;
1367  UCHAR Reserved4:7;
1368  UCHAR NoBarCode:1;
1370  struct _POSITION_TO_ELEMENT
1371  {
1373  UCHAR Reserved1:5;
1377  UCHAR Reserved2[2];
1378  UCHAR Flip:1;
1379  UCHAR Reserved3:7;
1380  UCHAR Control;
1382  struct _MOVE_MEDIUM
1383  {
1385  UCHAR Reserved1:5;
1390  UCHAR Reserved2[2];
1391  UCHAR Flip:1;
1392  UCHAR Reserved3:7;
1393  UCHAR Control;
1395  struct _EXCHANGE_MEDIUM
1396  {
1398  UCHAR Reserved1:5;
1404  UCHAR Flip1:1;
1405  UCHAR Flip2:1;
1406  UCHAR Reserved3:6;
1407  UCHAR Control;
1409  struct _READ_ELEMENT_STATUS
1410  {
1412  UCHAR ElementType:4;
1413  UCHAR VolTag:1;
1417  UCHAR Reserved1;
1419  UCHAR Reserved2;
1420  UCHAR Control;
1422  struct _SEND_VOLUME_TAG
1423  {
1425  UCHAR ElementType:4;
1426  UCHAR Reserved1:1;
1429  UCHAR Reserved2;
1430  UCHAR ActionCode:5;
1431  UCHAR Reserved3:3;
1432  UCHAR Reserved4[2];
1434  UCHAR Reserved5;
1435  UCHAR Control;
1437  struct _REQUEST_VOLUME_ELEMENT_ADDRESS
1438  {
1440  UCHAR ElementType:4;
1441  UCHAR VolTag:1;
1444  UCHAR NumberElements[2];
1445  UCHAR Reserved1;
1447  UCHAR Reserved2;
1448  UCHAR Control;
1450  struct _LOAD_UNLOAD
1451  {
1453  UCHAR Immediate:1;
1454  UCHAR Reserved1:4;
1455  UCHAR Lun:3;
1456  UCHAR Reserved2[2];
1457  UCHAR Start:1;
1458  UCHAR LoadEject:1;
1459  UCHAR Reserved3:6;
1460  UCHAR Reserved4[3];
1461  UCHAR Slot;
1462  UCHAR Reserved5[3];
1464  struct _MECH_STATUS
1465  {
1467  UCHAR Reserved:5;
1468  UCHAR Lun:3;
1469  UCHAR Reserved1[6];
1471  UCHAR Reserved2[1];
1472  UCHAR Control;
1474  struct _SYNCHRONIZE_CACHE10
1475  {
1477  UCHAR RelAddr:1;
1478  UCHAR Immediate:1;
1479  UCHAR Reserved:3;
1480  UCHAR Lun:3;
1482  UCHAR Reserved2;
1483  UCHAR BlockCount[2];
1484  UCHAR Control;
1486  struct _GET_EVENT_STATUS_NOTIFICATION
1487  {
1489  UCHAR Immediate:1;
1490  UCHAR Reserved:4;
1491  UCHAR Lun:3;
1492  UCHAR Reserved2[2];
1494  UCHAR Reserved3[2];
1496  UCHAR Control;
1498  struct _GET_PERFORMANCE
1499  {
1501  UCHAR Except:2;
1502  UCHAR Write:1;
1503  UCHAR Tolerance:2;
1504  UCHAR Reserved0:3;
1505  UCHAR StartingLBA[4];
1506  UCHAR Reserved1[2];
1508  UCHAR Type;
1509  UCHAR Control;
1510  } GET_PERFORMANCE;
1511  struct _READ_DVD_STRUCTURE
1512  {
1514  UCHAR Reserved1:5;
1515  UCHAR Lun:3;
1516  UCHAR RMDBlockNumber[4];
1518  UCHAR Format;
1520  UCHAR Reserved3:6;
1521  UCHAR AGID:2;
1522  UCHAR Control;
1524  struct _SET_STREAMING
1525  {
1527  UCHAR Reserved[8];
1529  UCHAR Control;
1530  } SET_STREAMING;
1531  struct _SEND_DVD_STRUCTURE
1532  {
1534  UCHAR Reserved1:5;
1535  UCHAR Lun:3;
1536  UCHAR Reserved2[5];
1537  UCHAR Format;
1539  UCHAR Reserved3;
1540  UCHAR Control;
1542  struct _SEND_KEY
1543  {
1545  UCHAR Reserved1:5;
1546  UCHAR Lun:3;
1547  UCHAR Reserved2[6];
1549  UCHAR KeyFormat:6;
1550  UCHAR AGID:2;
1551  UCHAR Control;
1552  } SEND_KEY, *PSEND_KEY;
1553  struct _REPORT_KEY
1554  {
1556  UCHAR Reserved1:5;
1557  UCHAR Lun:3;
1559  UCHAR Reserved2[2];
1561  UCHAR KeyFormat:6;
1562  UCHAR AGID:2;
1563  UCHAR Control;
1564  } REPORT_KEY, *PREPORT_KEY;
1565  struct _SET_READ_AHEAD
1566  {
1568  UCHAR Reserved1:5;
1569  UCHAR Lun:3;
1570  UCHAR TriggerLBA[4];
1571  UCHAR ReadAheadLBA[4];
1572  UCHAR Reserved2;
1573  UCHAR Control;
1575  struct _READ_FORMATTED_CAPACITIES
1576  {
1578  UCHAR Reserved1:5;
1579  UCHAR Lun:3;
1580  UCHAR Reserved2[5];
1582  UCHAR Control;
1584  struct _REPORT_LUNS
1585  {
1587  UCHAR Reserved1[5];
1589  UCHAR Reserved2[1];
1590  UCHAR Control;
1592  struct _PERSISTENT_RESERVE_IN
1593  {
1595  UCHAR ServiceAction:5;
1596  UCHAR Reserved1:3;
1597  UCHAR Reserved2[5];
1599  UCHAR Control;
1601  struct _PERSISTENT_RESERVE_OUT
1602  {
1604  UCHAR ServiceAction:5;
1605  UCHAR Reserved1:3;
1606  UCHAR Type:4;
1607  UCHAR Scope:4;
1608  UCHAR Reserved2[4];
1610  UCHAR Control;
1612  struct _GET_CONFIGURATION
1613  {
1615  UCHAR RequestType:1;
1616  UCHAR Reserved1:7;
1618  UCHAR Reserved2[3];
1620  UCHAR Control;
1622  struct _SET_CD_SPEED
1623  {
1625  _ANONYMOUS_UNION union
1626  {
1627  UCHAR Reserved1;
1628  _ANONYMOUS_STRUCT struct
1629  {
1631  UCHAR Reserved3:6;
1632  } DUMMYSTRUCTNAME;
1633  } DUMMYUNIONNAME;
1634  UCHAR ReadSpeed[2];
1635  UCHAR WriteSpeed[2];
1636  UCHAR Reserved2[5];
1637  UCHAR Control;
1639  struct _READ12
1640  {
1643  UCHAR Reserved1:2;
1647  UCHAR LogicalBlock[4];
1648  UCHAR TransferLength[4];
1649  UCHAR Reserved2:7;
1650  UCHAR Streaming:1;
1651  UCHAR Control;
1652  } READ12;
1653  struct _WRITE12
1654  {
1657  UCHAR Reserved1:1;
1658  UCHAR EBP:1;
1662  UCHAR LogicalBlock[4];
1663  UCHAR TransferLength[4];
1664  UCHAR Reserved2:7;
1665  UCHAR Streaming:1;
1666  UCHAR Control;
1667  } WRITE12;
1668  struct _READ16
1669  {
1671  UCHAR Reserved1:3;
1674  UCHAR ReadProtect:3;
1675  UCHAR LogicalBlock[8];
1676  UCHAR TransferLength[4];
1677  UCHAR Reserved2:7;
1678  UCHAR Streaming:1;
1679  UCHAR Control;
1680  } READ16;
1681  struct _WRITE16
1682  {
1684  UCHAR Reserved1:3;
1687  UCHAR WriteProtect:3;
1688  UCHAR LogicalBlock[8];
1689  UCHAR TransferLength[4];
1690  UCHAR Reserved2:7;
1691  UCHAR Streaming:1;
1692  UCHAR Control;
1693  } WRITE16;
1694  struct _VERIFY16
1695  {
1697  UCHAR Reserved1:1;
1698  UCHAR ByteCheck:1;
1699  UCHAR BlockVerify:1;
1700  UCHAR Reserved2: 1;
1702  UCHAR VerifyProtect:3;
1703  UCHAR LogicalBlock[8];
1705  UCHAR Reserved3:7;
1706  UCHAR Streaming:1;
1707  UCHAR Control;
1708  } VERIFY16;
1709  struct _SYNCHRONIZE_CACHE16
1710  {
1712  UCHAR Reserved1:1;
1713  UCHAR Immediate:1;
1714  UCHAR Reserved2:6;
1715  UCHAR LogicalBlock[8];
1716  UCHAR BlockCount[4];
1717  UCHAR Reserved3;
1718  UCHAR Control;
1720  struct _READ_CAPACITY16
1721  {
1723  UCHAR ServiceAction:5;
1724  UCHAR Reserved1:3;
1725  UCHAR LogicalBlock[8];
1726  UCHAR BlockCount[4];
1727  UCHAR PMI:1;
1728  UCHAR Reserved2:7;
1729  UCHAR Control;
1730  } READ_CAPACITY16;
1731  ULONG AsUlong[4];
1732  UCHAR AsByte[16];
1733 } CDB, *PCDB;
1734 
1735 typedef union _EIGHT_BYTE
1736 {
1737  struct
1738  {
1739  UCHAR Byte0;
1740  UCHAR Byte1;
1741  UCHAR Byte2;
1742  UCHAR Byte3;
1743  UCHAR Byte4;
1744  UCHAR Byte5;
1745  UCHAR Byte6;
1746  UCHAR Byte7;
1747  };
1750 
1751 typedef union _FOUR_BYTE
1752 {
1753  struct
1754  {
1755  UCHAR Byte0;
1756  UCHAR Byte1;
1757  UCHAR Byte2;
1758  UCHAR Byte3;
1759  };
1760  ULONG AsULong;
1761 } FOUR_BYTE, *PFOUR_BYTE;
1762 
1763 typedef union _TWO_BYTE
1764 {
1765  struct
1766  {
1767  UCHAR Byte0;
1768  UCHAR Byte1;
1769  };
1770  USHORT AsUShort;
1771 } TWO_BYTE, *PTWO_BYTE;
1772 #include <poppack.h>
1773 
1774 #if (NTDDI_VERSION < NTDDI_WINXP)
1775 typedef struct _INQUIRYDATA
1776 {
1777  UCHAR DeviceType:5;
1781  UCHAR Versions;
1783  UCHAR HiSupport:1;
1784  UCHAR NormACA:1;
1785  UCHAR ReservedBit:1;
1786  UCHAR AERC:1;
1788  UCHAR Reserved[2];
1789  UCHAR SoftReset:1;
1790  UCHAR CommandQueue:1;
1791  UCHAR Reserved2:1;
1793  UCHAR Synchronous:1;
1794  UCHAR Wide16Bit:1;
1795  UCHAR Wide32Bit:1;
1797  UCHAR VendorId[8];
1798  UCHAR ProductId[16];
1800  UCHAR VendorSpecific[20];
1801  UCHAR Reserved3[40];
1803 #else
1804 #include <pshpack1.h>
1805 typedef struct _INQUIRYDATA
1806 {
1807  UCHAR DeviceType:5;
1811  union
1812  {
1813  UCHAR Versions;
1814  struct
1815  {
1816  UCHAR ANSIVersion:3;
1817  UCHAR ECMAVersion:3;
1818  UCHAR ISOVersion:2;
1819  };
1820  };
1822  UCHAR HiSupport:1;
1823  UCHAR NormACA:1;
1824  UCHAR TerminateTask:1;
1825  UCHAR AERC:1;
1827  UCHAR Reserved;
1828  UCHAR Addr16:1;
1829  UCHAR Addr32:1;
1830  UCHAR AckReqQ:1;
1831  UCHAR MediumChanger:1;
1832  UCHAR MultiPort:1;
1833  UCHAR ReservedBit2:1;
1835  UCHAR ReservedBit3:1;
1836  UCHAR SoftReset:1;
1837  UCHAR CommandQueue:1;
1840  UCHAR Synchronous:1;
1841  UCHAR Wide16Bit:1;
1842  UCHAR Wide32Bit:1;
1844  UCHAR VendorId[8];
1845  UCHAR ProductId[16];
1847  UCHAR VendorSpecific[20];
1848  UCHAR Reserved3[40];
1850 #include <poppack.h>
1851 #endif
1852 
1853 typedef struct _VPD_MEDIA_SERIAL_NUMBER_PAGE
1854 {
1855  UCHAR DeviceType:5;
1857  UCHAR PageCode;
1858  UCHAR Reserved;
1859  UCHAR PageLength;
1860  UCHAR SerialNumber[0];
1862 
1863 typedef struct _VPD_SERIAL_NUMBER_PAGE
1864 {
1865  UCHAR DeviceType:5;
1867  UCHAR PageCode;
1868  UCHAR Reserved;
1869  UCHAR PageLength;
1870  UCHAR SerialNumber[0];
1872 
1873 typedef struct _VPD_IDENTIFICATION_DESCRIPTOR
1874 {
1875  UCHAR CodeSet:4;
1876  UCHAR Reserved:4;
1878  UCHAR Association:2;
1879  UCHAR Reserved2:2;
1880  UCHAR Reserved3;
1882  UCHAR Identifier[0];
1884 
1885 typedef struct _VPD_IDENTIFICATION_PAGE
1886 {
1887  UCHAR DeviceType:5;
1889  UCHAR PageCode;
1890  UCHAR Reserved;
1891  UCHAR PageLength;
1892  UCHAR Descriptors[0];
1894 
1895 typedef struct _VPD_SUPPORTED_PAGES_PAGE
1896 {
1897  UCHAR DeviceType:5;
1899  UCHAR PageCode;
1900  UCHAR Reserved;
1901  UCHAR PageLength;
1904 
1905 #include <pshpack1.h>
1906 typedef struct _READ_CAPACITY_DATA
1907 {
1911 
1912 typedef struct _READ_CAPACITY_DATA_EX
1913 {
1917 
1918 typedef struct _MODE_PARAMETER_HEADER
1919 {
1921  UCHAR MediumType;
1925 
1926 typedef struct _MODE_PARAMETER_HEADER10
1927 {
1928  UCHAR ModeDataLength[2];
1929  UCHAR MediumType;
1931  UCHAR Reserved[2];
1934 
1935 typedef struct _MODE_PARAMETER_BLOCK
1936 {
1938  UCHAR NumberOfBlocks[3];
1939  UCHAR Reserved;
1940  UCHAR BlockLength[3];
1942 
1943 typedef struct _LUN_LIST
1944 {
1945  UCHAR LunListLength[4];
1946  UCHAR Reserved[4];
1947 #if !defined(__midl)
1948  UCHAR Lun[0][8];
1949 #endif
1950 } LUN_LIST, *PLUN_LIST;
1951 
1952 typedef struct _SENSE_DATA
1953 {
1954  UCHAR ErrorCode:7;
1955  UCHAR Valid:1;
1957  UCHAR SenseKey:4;
1958  UCHAR Reserved:1;
1960  UCHAR EndOfMedia:1;
1961  UCHAR FileMark:1;
1962  UCHAR Information[4];
1970 
1971 #include <poppack.h>
1972 
1974 
1975 typedef struct _ACCESS_RANGE
1976 {
1981 
1982 typedef struct _MEMORY_REGION
1983 {
1988 
1989 typedef struct _PORT_CONFIGURATION_INFORMATION
1990 {
1991  ULONG Length;
1999  ULONG DmaChannel;
2000  ULONG DmaPort;
2006  PVOID Reserved;
2008  CCHAR InitiatorBusId[8];
2010  BOOLEAN Master;
2026  UCHAR ReservedUchars[2];
2027  ULONG SlotNumber;
2032  ULONG DmaPort2;
2044 
2046 {
2051 
2053 {
2058 
2059 typedef struct _DPC_BUFFER
2060 {
2064  struct
2065  {
2068  };
2074 } DPC_BUFFER;
2075 
2076 typedef struct _STOR_DPC
2077 {
2080 } STOR_DPC, *PSTOR_DPC;
2081 
2082 typedef struct _STOR_LOCK_HANDLE
2083 {
2085  struct
2086  {
2087  struct
2088  {
2091  } LockQueue;
2093  } Context;
2095 
2097 {
2113 
2115 {
2125 
2127 {
2133 
2135 {
2143 
2144 typedef
2145 BOOLEAN
2147  _In_ PVOID DeviceExtension);
2148 
2149 typedef
2150 BOOLEAN
2152  _In_ PVOID DeviceExtension,
2154 
2155 typedef
2156 BOOLEAN
2158  _In_ PVOID DeviceExtension,
2160 
2161 typedef
2162 BOOLEAN
2164  _In_ PVOID DeviceExtension);
2165 
2166 typedef
2167 VOID
2169  _In_ PVOID DeviceExtension);
2170 
2171 typedef
2172 VOID
2174  _In_ PVOID DeviceExtension);
2175 
2176 typedef
2177 ULONG
2179  IN PVOID DeviceExtension,
2180  IN PVOID HwContext,
2181  IN PVOID BusInformation,
2182  IN PCHAR ArgumentString,
2184  OUT PBOOLEAN Again);
2185 
2186 typedef
2187 BOOLEAN
2189  IN PVOID DeviceExtension,
2190  IN ULONG PathId);
2191 
2192 typedef
2193 BOOLEAN
2195  IN PVOID DeviceExtension,
2196  IN PVOID Context,
2197  IN BOOLEAN SaveState);
2198 
2199 typedef
2202  IN PVOID DeviceExtension,
2203  IN SCSI_ADAPTER_CONTROL_TYPE ControlType,
2204  IN PVOID Parameters);
2205 
2206 typedef
2207 BOOLEAN
2209  _In_ PVOID DeviceExtension);
2210 
2211 typedef
2212 VOID
2214  _In_ PSTOR_DPC Dpc,
2215  _In_ PVOID HwDeviceExtension,
2218 
2219 typedef
2220 BOOLEAN
2221 (NTAPI STOR_SYNCHRONIZED_ACCESS)(
2222  _In_ PVOID HwDeviceExtension,
2224 
2225 typedef STOR_SYNCHRONIZED_ACCESS *PSTOR_SYNCHRONIZED_ACCESS;
2226 
2227 typedef
2228 VOID
2231  _In_ PVOID *Irp,
2233  _In_ PVOID Context);
2234 
2235 typedef
2236 BOOLEAN
2238  _In_ PVOID HwDeviceExtension,
2239  _In_ ULONG MessageId,
2240  _Out_ PMESSAGE_INTERRUPT_INFORMATION InterruptInfo);
2241 
2242 typedef
2243 VOID
2245  _In_ PVOID HwDeviceExtension,
2246  _In_ PSTOR_SCATTER_GATHER_LIST ScatterGatherList,
2247  _In_ BOOLEAN WriteToDevice);
2248 
2249 typedef
2252  _In_ PVOID HwDeviceExtension,
2253  _In_ PVOID Mdl,
2254  _In_ PVOID CurrentVa,
2255  _In_ ULONG Length,
2257  _In_ PVOID Context,
2258  _In_ BOOLEAN WriteToDevice,
2259  _Inout_ PVOID ScatterGatherBuffer,
2260  _In_ ULONG ScatterGatherBufferLength);
2261 
2262 typedef
2263 VOID
2265  _In_ PVOID PMemory,
2266  _In_ PVOID HwDeviceExtension,
2267  _In_opt_ PVOID PMdl);
2268 
2269 typedef
2270 PVOID
2273  _In_ ULONG Tag,
2274  _In_ PVOID HwDeviceExtension,
2275  _Out_ PVOID *PMdl);
2276 
2277 typedef
2278 PVOID
2281 
2283 {
2292 
2293 typedef struct _HW_INITIALIZATION_DATA
2294 {
2308  PVOID Reserved;
2316  PVOID VendorId;
2319  PVOID DeviceId;
2323 
2324 
2325 
2326 #define REVERSE_BYTES_QUAD(Destination, Source) { \
2327  PEIGHT_BYTE d = (PEIGHT_BYTE)(Destination); \
2328  PEIGHT_BYTE s = (PEIGHT_BYTE)(Source); \
2329  d->Byte7 = s->Byte0; \
2330  d->Byte6 = s->Byte1; \
2331  d->Byte5 = s->Byte2; \
2332  d->Byte4 = s->Byte3; \
2333  d->Byte3 = s->Byte4; \
2334  d->Byte2 = s->Byte5; \
2335  d->Byte1 = s->Byte6; \
2336  d->Byte0 = s->Byte7; \
2337 }
2338 
2339 #define REVERSE_BYTES(Destination, Source) { \
2340  PFOUR_BYTE d = (PFOUR_BYTE)(Destination); \
2341  PFOUR_BYTE s = (PFOUR_BYTE)(Source); \
2342  d->Byte3 = s->Byte0; \
2343  d->Byte2 = s->Byte1; \
2344  d->Byte1 = s->Byte2; \
2345  d->Byte0 = s->Byte3; \
2346 }
2347 
2348 #define REVERSE_BYTES_SHORT(Destination, Source) { \
2349  PTWO_BYTE d = (PTWO_BYTE)(Destination); \
2350  PTWO_BYTE s = (PTWO_BYTE)(Source); \
2351  d->Byte1 = s->Byte0; \
2352  d->Byte0 = s->Byte1; \
2353 }
2354 
2355 #define StorPortCopyMemory(Destination,Source,Length) memcpy((Destination),(Source),(Length))
2356 
2358 PUCHAR
2359 NTAPI
2361  _In_ PVOID HwDeviceExtension,
2362  _In_ PULONG Length);
2363 
2365 BOOLEAN
2366 NTAPI
2367 StorPortBusy(
2368  _In_ PVOID HwDeviceExtension,
2369  _In_ ULONG RequestsToComplete);
2370 
2372 VOID
2373 NTAPI
2375  _In_ PVOID HwDeviceExtension,
2376  _In_ UCHAR PathId,
2378  _In_ UCHAR Lun,
2379  _In_ UCHAR SrbStatus);
2380 
2382 ULONG64
2383 NTAPI
2386 
2389 NTAPI
2391  _In_ ULONG64 UlongAddress);
2392 
2394 VOID
2395 __cdecl
2397  _In_ ULONG DebugPrintLevel,
2398  _In_ PCCHAR DebugMessage,
2399  ...);
2400 
2402 BOOLEAN
2403 NTAPI
2405  _In_ PVOID HwDeviceExtension,
2406  _In_ UCHAR PathId,
2408  _In_ UCHAR Lun,
2409  _In_ ULONG RequestsToComplete);
2410 
2412 BOOLEAN
2413 NTAPI
2415  _In_ PVOID HwDeviceExtension,
2416  _In_ UCHAR PathId,
2418  _In_ UCHAR Lun);
2419 
2421 VOID
2422 NTAPI
2424  _In_ PVOID HwDeviceExtension,
2425  _In_ PVOID MappedAddress);
2426 
2428 VOID
2429 NTAPI
2431  _In_ PVOID HwDeviceExtension,
2432  _In_ PUCHAR Buffer);
2433 
2435 ULONG
2436 NTAPI
2438  _In_ PVOID DeviceExtension,
2439  _In_ ULONG BusDataType,
2440  _In_ ULONG SystemIoBusNumber,
2443  _In_ ULONG Length);
2444 
2446 PVOID
2447 NTAPI
2449  _In_ PVOID HwDeviceExtension,
2451  _In_ ULONG SystemIoBusNumber,
2452  _In_ STOR_PHYSICAL_ADDRESS IoAddress,
2454  _In_ BOOLEAN InIoSpace);
2455 
2457 PVOID
2458 NTAPI
2460  _In_ PVOID HwDeviceExtension,
2461  _In_ UCHAR PathId,
2463  _In_ UCHAR Lun);
2464 
2467 NTAPI
2469  _In_ PVOID HwDeviceExtension,
2472  _Out_ ULONG *Length);
2473 
2476 NTAPI
2478  _In_ PVOID DeviceExtension,
2480 
2483 NTAPI
2485  _In_ PVOID DeviceExtension,
2486  _In_ UCHAR PathId,
2488  _In_ UCHAR Lun,
2489  _In_ LONG QueueTag);
2490 
2492 PVOID
2493 NTAPI
2495  _In_ PVOID HwDeviceExtension,
2498 
2500 PVOID
2501 NTAPI
2503  _In_ PVOID HwDeviceExtension,
2505 
2507 ULONG
2508 NTAPI
2514 
2516 VOID
2517 NTAPI
2519  _In_ PVOID HwDeviceExtension,
2521  _In_ UCHAR PathId,
2523  _In_ UCHAR Lun,
2525  _In_ ULONG UniqueId);
2526 
2528 VOID
2529 NTAPI
2533  _In_ ULONG Length);
2534 
2536 VOID
2537 __cdecl
2539  _In_ SCSI_NOTIFICATION_TYPE NotificationType,
2540  _In_ PVOID HwDeviceExtension,
2541  ...);
2542 
2544 VOID
2545 NTAPI
2547  _Out_ PLARGE_INTEGER CurrentTime);
2548 
2550 BOOLEAN
2551 NTAPI
2553  _In_ PVOID HwDeviceExtension,
2554  _In_ ULONG TimeOut);
2555 
2557 BOOLEAN
2558 NTAPI
2560  _In_ PVOID HwDeviceExtension,
2561  _In_ UCHAR PathId,
2563  _In_ UCHAR Lun,
2564  _In_ ULONG TimeOut);
2565 
2567 VOID
2568 NTAPI
2570  _In_ PVOID HwDeviceExtension,
2571  _In_ PUCHAR Port,
2572  _In_ PUCHAR Buffer,
2573  _In_ ULONG Count);
2574 
2576 VOID
2577 NTAPI
2579  _In_ PVOID HwDeviceExtension,
2580  _In_ PULONG Port,
2581  _In_ PULONG Buffer,
2582  _In_ ULONG Count);
2583 
2585 VOID
2586 NTAPI
2588  _In_ PVOID HwDeviceExtension,
2589  _In_ PUSHORT Port,
2591  _In_ ULONG Count);
2592 
2594 UCHAR
2595 NTAPI
2597  _In_ PVOID HwDeviceExtension,
2598  _In_ PUCHAR Port);
2599 
2601 ULONG
2602 NTAPI
2604  _In_ PVOID HwDeviceExtension,
2605  _In_ PULONG Port);
2606 
2608 USHORT
2609 NTAPI
2611  _In_ PVOID HwDeviceExtension,
2612  _In_ PUSHORT Port);
2613 
2615 VOID
2616 NTAPI
2618  _In_ PVOID HwDeviceExtension,
2619  _In_ PUCHAR Register,
2620  _In_ PUCHAR Buffer,
2621  _In_ ULONG Count);
2622 
2624 VOID
2625 NTAPI
2627  _In_ PVOID HwDeviceExtension,
2628  _In_ PULONG Register,
2629  _In_ PULONG Buffer,
2630  _In_ ULONG Count);
2631 
2633 VOID
2634 NTAPI
2636  _In_ PVOID HwDeviceExtension,
2637  _In_ PUSHORT Register,
2639  _In_ ULONG Count);
2640 
2642 UCHAR
2643 NTAPI
2645  _In_ PVOID HwDeviceExtension,
2646  _In_ PUCHAR Register);
2647 
2649 ULONG
2650 NTAPI
2652  _In_ PVOID HwDeviceExtension,
2653  _In_ PULONG Register);
2654 
2656 USHORT
2657 NTAPI
2659  _In_ PVOID HwDeviceExtension,
2660  _In_ PUSHORT Register);
2661 
2663 BOOLEAN
2664 NTAPI
2666  _In_ PVOID HwDeviceExtension);
2667 
2669 BOOLEAN
2670 NTAPI
2672  _In_ PVOID HwDeviceExtension,
2674  _In_ ULONG Global,
2675  _In_ ULONG Type,
2676  _In_ PUCHAR Buffer,
2678 
2680 BOOLEAN
2681 NTAPI
2683  _In_ PVOID HwDeviceExtension,
2685  _In_ ULONG Global,
2686  _In_ ULONG Type,
2687  _In_ PUCHAR Buffer,
2689 
2691 BOOLEAN
2692 NTAPI
2694  _In_ PVOID HwDeviceExtension);
2695 
2697 BOOLEAN
2698 NTAPI
2700  _In_ PVOID HwDeviceExtension,
2701  _In_ UCHAR PathId,
2703  _In_ UCHAR Lun);
2704 
2706 ULONG
2707 NTAPI
2709  _In_ PVOID DeviceExtension,
2710  _In_ ULONG BusDataType,
2711  _In_ ULONG SystemIoBusNumber,
2714  _In_ ULONG Offset,
2715  _In_ ULONG Length);
2716 
2718 BOOLEAN
2719 NTAPI
2721  _In_ PVOID HwDeviceExtension,
2722  _In_ UCHAR PathId,
2724  _In_ UCHAR Lun,
2725  _In_ ULONG Depth);
2726 
2728 VOID
2729 NTAPI
2731  _In_ ULONG Delay);
2732 
2734 VOID
2735 NTAPI
2737  _In_ PVOID HwDeviceExtension,
2738  _In_ PSTOR_SYNCHRONIZED_ACCESS SynchronizedAccessRoutine,
2740 
2742 BOOLEAN
2743 NTAPI
2745  _In_ PVOID HwDeviceExtension,
2747  _In_ ULONG SystemIoBusNumber,
2748  _In_ STOR_PHYSICAL_ADDRESS IoAddress,
2750  _In_ BOOLEAN InIoSpace);
2751 
2753 VOID
2754 NTAPI
2756  _In_ PVOID HwDeviceExtension,
2757  _In_ PUCHAR Port,
2758  _In_ PUCHAR Buffer,
2759  _In_ ULONG Count);
2760 
2762 VOID
2763 NTAPI
2765  _In_ PVOID HwDeviceExtension,
2766  _In_ PULONG Port,
2767  _In_ PULONG Buffer,
2768  _In_ ULONG Count);
2769 
2771 VOID
2772 NTAPI
2774  _In_ PVOID HwDeviceExtension,
2775  _In_ PUSHORT Port,
2777  _In_ ULONG Count);
2778 
2780 VOID
2781 NTAPI
2783  _In_ PVOID HwDeviceExtension,
2784  _In_ PUCHAR Port,
2785  _In_ UCHAR Value);
2786 
2788 VOID
2789 NTAPI
2791  _In_ PVOID HwDeviceExtension,
2792  _In_ PULONG Port,
2793  _In_ ULONG Value);
2794 
2796 VOID
2797 NTAPI
2799  _In_ PVOID HwDeviceExtension,
2800  _In_ PUSHORT Port,
2801  _In_ USHORT Value);
2802 
2804 VOID
2805 NTAPI
2807  _In_ PVOID HwDeviceExtension,
2808  _In_ PUCHAR Register,
2809  _In_ PUCHAR Buffer,
2810  _In_ ULONG Count);
2811 
2813 VOID
2814 NTAPI
2816  _In_ PVOID HwDeviceExtension,
2817  _In_ PULONG Register,
2818  _In_ PULONG Buffer,
2819  _In_ ULONG Count);
2820 
2822 VOID
2823 NTAPI
2825  _In_ PVOID HwDeviceExtension,
2826  _In_ PUSHORT Register,
2828  _In_ ULONG Count);
2829 
2831 VOID
2832 NTAPI
2834  _In_ PVOID HwDeviceExtension,
2835  _In_ PUCHAR Register,
2836  _In_ UCHAR Value);
2837 
2839 VOID
2840 NTAPI
2842  _In_ PVOID HwDeviceExtension,
2843  _In_ PULONG Register,
2844  _In_ ULONG Value);
2845 
2847 VOID
2848 NTAPI
2850  _In_ PVOID HwDeviceExtension,
2851  _In_ PUSHORT Register,
2852  _In_ USHORT Value);
2853 
2854 
2856 BOOLEAN
2858  _In_ PVOID DeviceExtension,
2859  _In_ PHW_PASSIVE_INITIALIZE_ROUTINE HwPassiveInitializeRoutine)
2860 {
2861  LONG Succ;
2862  Succ = FALSE;
2864  DeviceExtension,
2865  HwPassiveInitializeRoutine,
2866  &Succ);
2867  return (BOOLEAN)Succ;
2868 }
2869 
2871 VOID
2873  _In_ PVOID DeviceExtension,
2875  _In_ PHW_DPC_ROUTINE HwDpcRoutine)
2876 {
2878  DeviceExtension,
2879  Dpc,
2880  HwDpcRoutine);
2881 }
2882 
2884 BOOLEAN
2886  _In_ PVOID DeviceExtension,
2887  _In_ PSTOR_DPC Dpc,
2890 {
2891  LONG Succ;
2892  Succ = FALSE;
2894  DeviceExtension,
2895  Dpc,
2898  &Succ);
2899  return (BOOLEAN)Succ;
2900 }
2901 
2903 VOID
2905  _In_ PVOID DeviceExtension,
2907  _In_ PVOID LockContext,
2909 {
2911  DeviceExtension,
2912  SpinLock,
2913  LockContext,
2914  LockHandle);
2915 }
2916 
2918 VOID
2920  _In_ PVOID DeviceExtension,
2922 {
2924  DeviceExtension,
2925  LockHandle);
2926 }
2927 
2929 ULONG
2931  _In_ STORPORT_FUNCTION_CODE FunctionCode,
2932  _In_ PVOID HwDeviceExtension,
2933  ...);
2934 
2936 ULONG
2938  _In_ PVOID HwDeviceExtension,
2940  _In_ ULONG Tag,
2941  _Out_ PVOID *BufferPointer
2942  )
2943 {
2945  HwDeviceExtension,
2946  NumberOfBytes,
2947  Tag,
2948  BufferPointer);
2949 }
2950 
2952 ULONG
2954  _In_ PVOID HwDeviceExtension,
2955  _In_ PVOID BufferPointer)
2956 {
2958  HwDeviceExtension,
2959  BufferPointer);
2960 }
2961 
2963 ULONG
2965  _In_ PVOID HwDeviceExtension,
2966  _In_ PVOID BufferPointer,
2968  _Out_ PVOID *Mdl)
2969 {
2971  HwDeviceExtension,
2972  BufferPointer,
2973  NumberOfBytes,
2974  Mdl);
2975 }
2976 
2978 ULONG
2980  _In_ PVOID HwDeviceExtension,
2981  _In_ PVOID Mdl)
2982 {
2984  HwDeviceExtension,
2985  Mdl);
2986 }
2987 
2989 ULONG
2991  _In_ PVOID HwDeviceExtension,
2992  _Inout_ PVOID Mdl)
2993 {
2995  HwDeviceExtension,
2996  Mdl);
2997 }
2998 
3000 ULONG
3002  _In_ PVOID HwDeviceExtension,
3004  _Out_ PVOID *SystemAddress)
3005 {
3007  HwDeviceExtension,
3008  Srb,
3009  SystemAddress);
3010 }
3011 
3013 ULONG
3015  _In_ PVOID HwDeviceExtension,
3017  _Out_ PVOID *Mdl)
3018 {
3020  HwDeviceExtension,
3021  Srb,
3022  Mdl);
3023 }
3024 
3026 ULONG
3028  _In_ PVOID HwDeviceExtension,
3029  _In_ PVOID Irp)
3030 {
3032  HwDeviceExtension,
3033  Irp);
3034 }
3035 
3037 ULONG
3039  _In_ PVOID HwDeviceExtension,
3040  _Out_ PVOID *AdapterDeviceObject,
3043 {
3045  HwDeviceExtension,
3046  AdapterDeviceObject,
3049 }
3050 
3052 ULONG
3054  _In_ PVOID HwDeviceExtension,
3055  _In_ PVOID Mdl,
3056  _In_ PVOID CurrentVa,
3057  _In_ ULONG Length,
3059  _In_ PVOID Context,
3060  _In_ BOOLEAN WriteToDevice,
3061  _Inout_ PVOID ScatterGatherBuffer,
3062  _In_ ULONG ScatterGatherBufferLength)
3063 {
3065  HwDeviceExtension,
3066  Mdl,
3067  CurrentVa,
3068  Length,
3070  Context,
3071  WriteToDevice,
3072  ScatterGatherBuffer,
3073  ScatterGatherBufferLength);
3074 }
3075 
3077 ULONG
3079  _In_ PVOID HwDeviceExtension,
3080  _In_ PSTOR_SCATTER_GATHER_LIST ScatterGatherList,
3081  _In_ BOOLEAN WriteToDevice)
3082 {
3084  HwDeviceExtension,
3085  ScatterGatherList,
3086  WriteToDevice);
3087 }
3088 
3090 ULONG
3092  _In_ PVOID HwDeviceExtension,
3093  _In_ ULONG MessageId,
3095 {
3097  HwDeviceExtension,
3098  MessageId,
3099  OldIrql);
3100 }
3101 
3103 ULONG
3105  _In_ PVOID HwDeviceExtension,
3106  _In_ ULONG MessageId,
3107  _In_ ULONG OldIrql)
3108 {
3110  HwDeviceExtension,
3111  MessageId,
3112  OldIrql);
3113 }
3114 
3116 ULONG
3118  _In_ PVOID HwDeviceExtension,
3119  _In_ ULONG MessageId,
3120  _Out_ PMESSAGE_INTERRUPT_INFORMATION InterruptInfo)
3121 {
3123  HwDeviceExtension,
3124  MessageId,
3125  InterruptInfo);
3126 }
3127 
3129 ULONG
3131  _In_ PVOID HwDeviceExtension,
3132  _In_ BOOLEAN Query,
3133  _Inout_ PPERF_CONFIGURATION_DATA PerfConfigData)
3134 {
3136  HwDeviceExtension,
3137  Query,
3138  PerfConfigData);
3139 }
3140 
3142 ULONG
3144  _In_ PVOID HwDeviceExtension,
3146  _Inout_ PSTARTIO_PERFORMANCE_PARAMETERS StartIoPerfParams)
3147 {
3149  HwDeviceExtension,
3150  Srb,
3151  StartIoPerfParams);
3152 }
3153 
3155 ULONG
3157  _In_ PVOID HwDeviceExtension,
3158  _Inout_ PSTOR_LOG_EVENT_DETAILS LogDetails,
3160 {
3162  HwDeviceExtension,
3163  LogDetails,
3164  MaximumSize);
3165 }
3166 
3167 #if DBG
3168 #define DebugPrint(x) StorPortDebugPrint x
3169 #else
3170 #define DebugPrint(x)
3171 #endif
3172 
3173 #ifdef __cplusplus
3174 }
3175 #endif
3176 
3177 #endif /* _NTSTORPORT_ */
UCHAR AllocationLength
Definition: scsi.h:775
UCHAR FieldReplaceableUnitCode
Definition: cdrw_hw.h:1177
STORPORT_API ULONG NTAPI StorPortReadRegisterUlong(_In_ PVOID HwDeviceExtension, _In_ PULONG Register)
Definition: stubs.c:143
UCHAR Byte0
Definition: tools.h:16
UCHAR LogicalUnitNumber
Definition: scsi.h:1217
struct _SCSI_WMI_REQUEST_BLOCK SCSI_WMI_REQUEST_BLOCK
STORPORT_API BOOLEAN NTAPI StorPortDeviceReady(_In_ PVOID HwDeviceExtension, _In_ UCHAR PathId, _In_ UCHAR TargetId, _In_ UCHAR Lun)
Definition: storport.c:592
enum _GETSGSTATUS * PGETSGSTATUS
UCHAR Reserved2
Definition: cdrw_hw.h:1126
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
ULONG_PTR Lock
Definition: storport.h:2079
UCHAR VerifyProtect
Definition: scsi.h:1630
signed char * PCHAR
Definition: retypes.h:7
struct _CDB::_SEND_DVD_STRUCTURE * PSEND_DVD_STRUCTURE
PHW_ADAPTER_STATE HwAdapterState
Definition: srb.h:565
struct _CDB::_POSITION_TO_ELEMENT * PPOSITION_TO_ELEMENT
struct _CDB::_READ_ELEMENT_STATUS READ_ELEMENT_STATUS
struct _STOR_LOCK_HANDLE::@2143::@2144 LockQueue
GETSGSTATUS(NTAPI * PStorPortBuildScatterGatherList)(_In_ PVOID HwDeviceExtension, _In_ PVOID Mdl, _In_ PVOID CurrentVa, _In_ ULONG Length, _In_ PpostScaterGatherExecute ExecutionRoutine, _In_ PVOID Context, _In_ BOOLEAN WriteToDevice, _Inout_ PVOID ScatterGatherBuffer, _In_ ULONG ScatterGatherBufferLength)
Definition: storport.h:2251
union _CDB CDB
UCHAR LogicalUnitNumber
Definition: scsi.h:1111
struct _CDB::_MODE_SELECT10 MODE_SELECT10
CPPORT Port[4]
Definition: headless.c:34
UCHAR Reserved2[2]
Definition: cdrw_hw.h:672
_Must_inspect_result_ typedef _In_ PVOID Unused
Definition: iotypes.h:1129
UCHAR SenseKey
Definition: cdrw_hw.h:1167
UCHAR Reserved2[2]
Definition: cdrw_hw.h:447
#define IN
Definition: typedefs.h:38
UCHAR Descriptors[0]
Definition: scsi.h:2134
_In_opt_ PALLOCATE_FUNCTION _In_opt_ PFREE_FUNCTION _In_ ULONG _In_ SIZE_T _In_ ULONG _In_ USHORT Depth
Definition: exfuncs.h:656
struct _CDB::_POSITION_TO_ELEMENT POSITION_TO_ELEMENT
UCHAR Control
Definition: cdrw_hw.h:166
STORPORT_API PVOID NTAPI StorPortGetLogicalUnit(_In_ PVOID HwDeviceExtension, _In_ UCHAR PathId, _In_ UCHAR TargetId, _In_ UCHAR Lun)
Definition: storport.c:773
struct _READ_CAPACITY_DATA_EX * PREAD_CAPACITY_DATA_EX
UCHAR LogicalUnitNumber
Definition: scsi.h:1354
ULONG AsUlong[4]
Definition: scsi.h:1657
UCHAR LogicalUnitNumber
Definition: scsi.h:1027
enum _SCSI_ADAPTER_CONTROL_TYPE SCSI_ADAPTER_CONTROL_TYPE
struct _CDB::_CDB6GENERIC * PCDB6GENERIC
STORPORT_API VOID NTAPI StorPortWritePortUlong(_In_ PVOID HwDeviceExtension, _In_ PULONG Port, _In_ ULONG Value)
Definition: stubs.c:216
UCHAR Control
Definition: cdrw_hw.h:285
STORPORT_API VOID NTAPI StorPortReadPortBufferUchar(_In_ PVOID HwDeviceExtension, _In_ PUCHAR Port, _In_ PUCHAR Buffer, _In_ ULONG Count)
Definition: stubs.c:21
BOOLEAN BufferAccessScsiPortControlled
Definition: srb.h:90
UCHAR OperationCode
Definition: scsi.h:1624
UCHAR Reserved1
Definition: scsi.h:1601
UCHAR CommandSpecificInformation[4]
Definition: cdrw_hw.h:1174
PGROUP_AFFINITY MessageTargets
Definition: storport.h:2123
struct _PERF_CONFIGURATION_DATA * PPERF_CONFIGURATION_DATA
INTERFACE_TYPE AdapterInterfaceType
Definition: srb.h:55
struct _CDB::_LOAD_UNLOAD LOAD_UNLOAD
UCHAR DisablePageOut
Definition: scsi.h:1577
UCHAR TransferLength[4]
Definition: scsi.h:1580
struct _CDB::_READ_POSITION READ_POSITION
enum _STOR_PNP_ACTION * PSTOR_PNP_ACTION
UCHAR Reserved2[3]
Definition: cdrw_hw.h:163
_In_ NDIS_ERROR_CODE ErrorCode
Definition: ndis.h:4436
UCHAR LogicalUnitNumber
Definition: scsi.h:1227
UCHAR ProductRevisionLevel[4]
Definition: cdrw_hw.h:1134
UCHAR LogicalBlockAddress[4]
Definition: scsi.h:1158
UCHAR Reserved2
Definition: scsi.h:1628
UCHAR Reserved2
Definition: scsi.h:945
ULONG SrbFlags
Definition: srb.h:252
UCHAR LogicalUnitNumber
Definition: scsi.h:791
STORPORT_API PVOID NTAPI StorPortGetUncachedExtension(_In_ PVOID HwDeviceExtension, _In_ PPORT_CONFIGURATION_INFORMATION ConfigInfo, _In_ ULONG NumberOfBytes)
Definition: storport.c:880
PVOID SrbExtension
Definition: srb.h:259
UCHAR Immediate
Definition: scsi.h:1236
enum _INTERFACE_TYPE INTERFACE_TYPE
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR _In_ UCHAR _In_ UCHAR Lun
Definition: classpnp.h:1117
STOR_PNP_ACTION PnPAction
Definition: srb.h:411
STOR_PHYSICAL_ADDRESS RangeStart
Definition: storport.h:1977
UCHAR CMSF
Definition: scsi.h:975
struct _STOR_LOG_EVENT_DETAILS STOR_LOG_EVENT_DETAILS
SCSI_ADAPTER_CONTROL_STATUS(NTAPI * PHW_ADAPTER_CONTROL)(IN PVOID DeviceExtension, IN SCSI_ADAPTER_CONTROL_TYPE ControlType, IN PVOID Parameters)
Definition: storport.h:2201
STORPORT_API BOOLEAN NTAPI StorPortReady(_In_ PVOID HwDeviceExtension)
Definition: storport.c:1269
enum _SCSI_ADAPTER_CONTROL_STATUS SCSI_ADAPTER_CONTROL_STATUS
struct _CDB::_PERSISTENT_RESERVE_IN PERSISTENT_RESERVE_IN
UCHAR VerificationLength[3]
Definition: scsi.h:785
UCHAR TransferLength[3]
Definition: scsi.h:1267
_IRQL_requires_same_ _In_opt_ PVOID Argument1
Definition: cmtypes.h:694
Type
Definition: Type.h:6
STORPORT_API UCHAR NTAPI StorPortReadPortUchar(_In_ PVOID HwDeviceExtension, _In_ PUCHAR Port)
Definition: stubs.c:60
UCHAR Reserved4[3]
Definition: scsi.h:912
PVOID OriginalRequest
Definition: srb.h:258
UCHAR Control
Definition: scsi.h:1000
UCHAR Cdb[16]
Definition: srb.h:271
FORCEINLINE ULONG StorPortFreeMdl(_In_ PVOID HwDeviceExtension, _In_ PVOID Mdl)
Definition: storport.h:2979
UCHAR Port2
Definition: scsi.h:997
struct _CDB::_NEC_READ_CDDA NEC_READ_CDDA
struct _STOR_SCATTER_GATHER_LIST STOR_SCATTER_GATHER_LIST
struct _MODE_PARAMETER_HEADER10 * PMODE_PARAMETER_HEADER10
UCHAR Byte2
Definition: scsi.h:2664
UCHAR InterleaveLsb
Definition: scsi.h:794
#define __cdecl
Definition: accygwin.h:79
UCHAR ByteCompare
Definition: scsi.h:781
struct _CDB::_MEDIA_REMOVAL MEDIA_REMOVAL
enum _SCSI_ADAPTER_CONTROL_STATUS * PSCSI_ADAPTER_CONTROL_STATUS
PStorPortAllocatePool AllocatePool
Definition: storport.h:2289
enum _STORPORT_FUNCTION_CODE STORPORT_FUNCTION_CODE
VOID(NTAPI * PStorPortPutScatterGatherList)(_In_ PVOID HwDeviceExtension, _In_ PSTOR_SCATTER_GATHER_LIST ScatterGatherList, _In_ BOOLEAN WriteToDevice)
Definition: storport.h:2244
UCHAR PCRBit
Definition: scsi.h:1180
STORPORT_API ULONG NTAPI StorPortGetBusData(_In_ PVOID DeviceExtension, _In_ ULONG BusDataType, _In_ ULONG SystemIoBusNumber, _In_ ULONG SlotNumber, _Out_ _When_(Length !=0, _Out_writes_bytes_(Length)) PVOID Buffer, _In_ ULONG Length)
Definition: storport.c:657
FORCEINLINE ULONG StorPortLogSystemEvent(_In_ PVOID HwDeviceExtension, _Inout_ PSTOR_LOG_EVENT_DETAILS LogDetails, _Inout_ PULONG MaximumSize)
Definition: storport.h:3156
VOID(NTAPI * PStorPortFreePool)(_In_ PVOID PMemory, _In_ PVOID HwDeviceExtension, _In_opt_ PVOID PMdl)
Definition: storport.h:2264
struct _CDB::_READ_CD * PREAD_CD
enum _SCSI_NOTIFICATION_TYPE SCSI_NOTIFICATION_TYPE
STORPORT_API BOOLEAN NTAPI StorPortSetDeviceQueueDepth(_In_ PVOID HwDeviceExtension, _In_ UCHAR PathId, _In_ UCHAR TargetId, _In_ UCHAR Lun, _In_ ULONG Depth)
Definition: storport.c:1398
STORPORT_API VOID __cdecl StorPortDebugPrint(_In_ ULONG DebugPrintLevel, _In_ PCCHAR DebugMessage,...)
STORPORT_API VOID NTAPI StorPortCompleteRequest(_In_ PVOID HwDeviceExtension, _In_ UCHAR PathId, _In_ UCHAR TargetId, _In_ UCHAR Lun, _In_ UCHAR SrbStatus)
Definition: storport.c:504
UCHAR LogicalUnitNumber
Definition: scsi.h:1192
enum _STOR_POWER_ACTION STOR_POWER_ACTION
_STOR_PNP_ACTION
Definition: srb.h:379
UCHAR LogicalBlockByte2
Definition: scsi.h:1085
UCHAR StartingM
Definition: scsi.h:1062
struct _CDB::_READ_BUFFER_CAPACITY * PREAD_BUFFER_CAPACITY
UCHAR LogicalUnitNumber
Definition: scsi.h:819
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE BusType
Definition: halfuncs.h:156
UCHAR Streaming
Definition: scsi.h:1608
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR PathId
Definition: classpnp.h:1117
struct _VPD_IDENTIFICATION_PAGE * PVPD_IDENTIFICATION_PAGE
UCHAR LogicalBlock[8]
Definition: scsi.h:1631
_STOR_DEVICE_POWER_STATE
Definition: srb.h:335
_In_ PIRP Irp
Definition: csq.h:116
UCHAR WriteSpeed[2]
Definition: cdrw_hw.h:598
struct _CDB::_REPORT_KEY REPORT_KEY
UCHAR Byte3
Definition: scsi.h:2665
UCHAR Control
Definition: scsi.h:1259
struct _CDB::_ERASE ERASE
PVOID DataBuffer
Definition: srb.h:255
UCHAR ResponseDataFormat
Definition: cdrw_hw.h:1121
struct _CDB::_SEEK * PSEEK
UCHAR Control
Definition: cdrw_hw.h:664
PVOID OriginalRequest
Definition: srb.h:297
uint16_t * PWSTR
Definition: typedefs.h:54
#define _ANONYMOUS_UNION
Definition: ntbasedef.h:30
UCHAR AllocationLength[4]
Definition: scsi.h:700
struct _CDB::_SEND_VOLUME_TAG * PSEND_VOLUME_TAG
_SCSI_NOTIFICATION_TYPE
Definition: srb.h:522
UCHAR FReserved2
Definition: cdrw_hw.h:107
struct _CDB::_READ_TRACK_INFORMATION READ_TRACK_INFORMATION
STOR_SCATTER_GATHER_ELEMENT List[]
Definition: storport.h:2056
PStorPortPutScatterGatherList PutScatterGatherList
Definition: storport.h:2286
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR _In_ UCHAR TargetId
Definition: classpnp.h:1117
UCHAR OperationCode
Definition: cdrw_hw.h:312
UCHAR Reserved2
Definition: scsi.h:774
UCHAR BlockVerify
Definition: scsi.h:1627
UCHAR Reserved1
Definition: scsi.h:942
unsigned char * PUCHAR
Definition: retypes.h:3
struct _CDB::_GET_CONFIGURATION GET_CONFIGURATION
struct _CDB::_PERSISTENT_RESERVE_OUT * PPERSISTENT_RESERVE_OUT
UCHAR ParameterListLength[2]
Definition: scsi.h:1482
ULONG DataTransferLength
Definition: srb.h:253
struct _MODE_PARAMETER_HEADER MODE_PARAMETER_HEADER
UCHAR TriggerLBA[4]
Definition: cdrw_hw.h:741
FORCEINLINE ULONG StorPortAcquireMSISpinLock(_In_ PVOID HwDeviceExtension, _In_ ULONG MessageId, _In_ PULONG OldIrql)
Definition: storport.h:3091
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: storport.h:2178
UCHAR OperationCode
Definition: scsi.h:740
UCHAR SegmentNumber
Definition: cdrw_hw.h:1166
Definition: cdrw_hw.h:28
UCHAR Reserved1
Definition: scsi.h:1575
struct _ACCESS_RANGE ACCESS_RANGE
UCHAR TransportElementAddress[2]
Definition: scsi.h:1343
ULONG HwInitializationDataSize
Definition: srb.h:542
PHYSICAL_ADDRESS STOR_PHYSICAL_ADDRESS
Definition: storport.h:1973
UCHAR PlayLength[2]
Definition: scsi.h:946
struct _CDB::_RESERVE_TRACK_RZONE * PRESERVE_TRACK_RZONE
#define ReadBuffer(BaseIoAddress, Buffer, Count)
Definition: atapi.h:339
STORPORT_API ULONG NTAPI StorPortSetBusDataByOffset(_In_ PVOID DeviceExtension, _In_ ULONG BusDataType, _In_ ULONG SystemIoBusNumber, _In_ ULONG SlotNumber, _In_reads_bytes_(Length) PVOID Buffer, _In_ ULONG Offset, _In_ ULONG Length)
Definition: storport.c:1357
UCHAR StartingAddress[4]
Definition: scsi.h:1008
struct _CDB::_SYNCHRONIZE_CACHE10 SYNCHRONIZE_CACHE10
UCHAR Reserved2
Definition: scsi.h:991
UCHAR IncludeUserData
Definition: cdrw_hw.h:278
PVOID SystemArgument2
Definition: storport.h:2072
_Must_inspect_result_ _In_ PVOID _In_ struct _HW_INITIALIZATION_DATA _In_ PVOID HwContext
Definition: srb.h:664
struct _CDB::_CDB6FORMAT CDB6FORMAT
struct _CDB::_READ12 READ12
UCHAR ParameterListLength[2]
Definition: scsi.h:1386
UCHAR OperationCode
Definition: scsi.h:941
UCHAR StartingFeature[2]
Definition: scsi.h:1553
struct _CDB::_READ_POSITION * PREAD_POSITION
STORPORT_API VOID NTAPI StorPortWriteRegisterBufferUshort(_In_ PVOID HwDeviceExtension, _In_ PUSHORT Register, _In_ PUSHORT Buffer, _In_ ULONG Count)
Definition: stubs.c:266
UCHAR Reserved1
Definition: scsi.h:974
UCHAR CPBit
Definition: scsi.h:1153
UCHAR LogicalUnitNumber
Definition: scsi.h:1209
FORCEINLINE ULONG StorPortReleaseMSISpinLock(_In_ PVOID HwDeviceExtension, _In_ ULONG MessageId, _In_ ULONG OldIrql)
Definition: storport.h:3104
UCHAR Reserved2[7]
Definition: scsi.h:1019
enum _STOR_PNP_ACTION STOR_PNP_ACTION
PStorPortBuildScatterGatherList BuildScatterGatherList
Definition: storport.h:2287
UCHAR OperationCode
Definition: scsi.h:769
UCHAR SubChannelSelection
Definition: cdrw_hw.h:258
UCHAR Reserved
Definition: scsi.h:1183
struct _STORPORT_EXTENDED_FUNCTIONS STORPORT_EXTENDED_FUNCTIONS
UCHAR OperationCode
Definition: cdrw_hw.h:634
struct _CDB::_REPORT_LUNS REPORT_LUNS
struct _CDB::_PLXTR_READ_CDDA PLXTR_READ_CDDA
UCHAR EnableVitalProductData
Definition: scsi.h:770
ULONG DeviceExtensionSize
Definition: srb.h:566
enum _DMA_WIDTH DMA_WIDTH
struct _VPD_SERIAL_NUMBER_PAGE VPD_SERIAL_NUMBER_PAGE
FORCEINLINE VOID StorPortAcquireSpinLock(_In_ PVOID DeviceExtension, _In_ STOR_SPINLOCK SpinLock, _In_ PVOID LockContext, _Inout_ PSTOR_LOCK_HANDLE LockHandle)
Definition: storport.h:2904
UCHAR TransportElementAddress[2]
Definition: scsi.h:1332
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
struct _CDB::_MODE_SENSE10 MODE_SENSE10
_STOR_EVENT_ASSOCIATION_ENUM
Definition: storport.h:582
UCHAR CdbLength
Definition: srb.h:250
UCHAR Destination2ElementAddress[2]
Definition: scsi.h:1358
UCHAR DeviceTypeQualifier
Definition: scsi.h:2083
UCHAR Immediate
Definition: scsi.h:966
PHW_DMA_STARTED HwDmaStarted
Definition: srb.h:564
STOR_PHYSICAL_ADDRESS PhysicalAddress
Definition: storport.h:2047
ULONG LogicalBlockAddress
Definition: cdrw_hw.h:1471
struct _SCSI_PNP_REQUEST_BLOCK SCSI_PNP_REQUEST_BLOCK
struct _CDB::_READ_CD_MSF * PREAD_CD_MSF
BOOLEAN MultipleRequestPerLu
Definition: srb.h:576
STOR_SYNCHRONIZED_ACCESS * PSTOR_SYNCHRONIZED_ACCESS
Definition: storport.h:2225
UCHAR Reserved1
Definition: scsi.h:1181
UCHAR LogicalUnitNumber
Definition: scsi.h:1199
struct _CDB::_WRITE12 WRITE12
struct _LUN_LIST * PLUN_LIST
PHW_FIND_ADAPTER HwFindAdapter
Definition: srb.h:562
UCHAR LogicalUnitNumber
Definition: scsi.h:839
enum _GETSGSTATUS GETSGSTATUS
struct _CDB::_PLAY_AUDIO_MSF PLAY_AUDIO_MSF
UCHAR CommandQueue
Definition: cdrw_hw.h:1125
FORCEINLINE ULONG StorPortGetSystemAddress(_In_ PVOID HwDeviceExtension, _In_ PSCSI_REQUEST_BLOCK Srb, _Out_ PVOID *SystemAddress)
Definition: storport.h:3001
UCHAR TransferLength[4]
Definition: scsi.h:1594
UCHAR EndingF
Definition: scsi.h:990
enum _STOR_SPINLOCK STOR_SPINLOCK
UCHAR Immediate
Definition: cdrw_hw.h:80
UCHAR AllocationLength[2]
Definition: cdrw_hw.h:212
UCHAR Control
Definition: scsi.h:1621
UCHAR TransferBlocksLsb
Definition: scsi.h:810
UCHAR Immediate
Definition: scsi.h:782
USHORT DeviceIdLength
Definition: srb.h:581
struct _CDB::_READ_DVD_STRUCTURE * PREAD_DVD_STRUCTURE
struct _CDB::_SEND_KEY * PSEND_KEY
UCHAR PageCode
Definition: scsi.h:773
UCHAR ReadSpeed[2]
Definition: cdrw_hw.h:597
UCHAR OperationCode
Definition: scsi.h:1235
struct _VPD_SUPPORTED_PAGES_PAGE VPD_SUPPORTED_PAGES_PAGE
UCHAR Reserved1
Definition: scsi.h:772
UCHAR OperationCode
Definition: cdrw_hw.h:362
UCHAR ProductId[16]
Definition: cdrw_hw.h:1133
struct _CDB::_MECH_STATUS * PMECH_STATUS
ACCESS_RANGE(* AccessRanges)[]
Definition: srb.h:70
ULONG SpecificLuExtensionSize
Definition: srb.h:567
UCHAR LogicalBlockAddress[4]
Definition: scsi.h:1500
struct _VPD_IDENTIFICATION_PAGE VPD_IDENTIFICATION_PAGE
BOOLEAN(NTAPI * PHW_STARTIO)(_In_ PVOID DeviceExtension, _In_ PSCSI_REQUEST_BLOCK Srb)
Definition: storport.h:2157
struct _ACCESS_RANGE * PACCESS_RANGE
UCHAR Reserved2
Definition: scsi.h:1581
struct _SCSI_REQUEST_BLOCK * NextSrb
Definition: srb.h:257
struct _CDB::_WRITE_TAPE_MARKS * PWRITE_TAPE_MARKS
UCHAR QueueAction
Definition: srb.h:249
PDEVICE_OBJECT PhysicalDeviceObject
Definition: btrfs_drv.h:1114
struct _CDB::_CDB10 CDB10
UCHAR VendorId[8]
Definition: cdrw_hw.h:1132
UCHAR AllocationLength[2]
Definition: cdrw_hw.h:734
UCHAR CommandUniqueBits
Definition: scsi.h:742
ULONG LinkTimeoutValue
Definition: srb.h:299
PHW_RESET_BUS HwResetBus
Definition: srb.h:563
UCHAR IncludeUserData
Definition: cdrw_hw.h:254
enum _VPD_CODE_SET VPD_CODE_SET
UCHAR ForceUnitAccess
Definition: cdrw_hw.h:115
UCHAR LogicalUnitNumber
Definition: scsi.h:1145
UCHAR EnclosureServices
Definition: minitape.h:103
PUCHAR VirtualBase
Definition: storport.h:1984
ULONG TimeOutValue
Definition: srb.h:254
STORPORT_API VOID NTAPI StorPortWritePortUchar(_In_ PVOID HwDeviceExtension, _In_ PUCHAR Port, _In_ UCHAR Value)
Definition: stubs.c:204
_STOR_POWER_ACTION
Definition: srb.h:344
UCHAR Reserved2[2]
Definition: cdrw_hw.h:393
UCHAR LogicalBlock[8]
Definition: scsi.h:1651
UCHAR ReservedBit3
Definition: minitape.h:104
UCHAR Reserved1
Definition: scsi.h:1613
struct _CDB::_LOGSENSE * PLOGSENSE
UCHAR Reserved1[6]
Definition: cdrw_hw.h:599
UCHAR Reserved2[2]
Definition: cdrw_hw.h:434
struct _CDB::_LOAD_UNLOAD * PLOAD_UNLOAD
UCHAR Reserved2[3]
Definition: scsi.h:1009
UCHAR SrbStatus
Definition: srb.h:243
UCHAR VerificationLength[4]
Definition: scsi.h:1632
UNICODE_STRING Global
Definition: symlink.c:37
UCHAR Audio
Definition: scsi.h:994
FORCEINLINE VOID StorPortInitializeDpc(_In_ PVOID DeviceExtension, _Out_ PSTOR_DPC Dpc, _In_ PHW_DPC_ROUTINE HwDpcRoutine)
Definition: storport.h:2872
UCHAR VendorSpecific[20]
Definition: cdrw_hw.h:1135
UCHAR ParameterListLength[2]
Definition: scsi.h:1186
STORPORT_API STOR_PHYSICAL_ADDRESS NTAPI StorPortGetPhysicalAddress(_In_ PVOID HwDeviceExtension, _In_opt_ PSCSI_REQUEST_BLOCK Srb, _In_ PVOID VirtualAddress, _Out_ ULONG *Length)
Definition: storport.c:791
PVOID(NTAPI * PStorPortGetSystemAddress)(_In_ PSCSI_REQUEST_BLOCK Srb)
Definition: storport.h:2279
UCHAR Reserved1
Definition: cdrw_hw.h:114
UCHAR RelativeAddress
Definition: cdrw_hw.h:113
struct _INQUIRYDATA INQUIRYDATA
_STOR_DMA_WIDTH
Definition: storport.h:430
STORPORT_API BOOLEAN NTAPI StorPortPause(_In_ PVOID HwDeviceExtension, _In_ ULONG TimeOut)
Definition: storport.c:1215
UCHAR FileMark
Definition: cdrw_hw.h:1171
UCHAR OperationCode
Definition: scsi.h:1178
STORPORT_API VOID NTAPI StorPortWritePortBufferUchar(_In_ PVOID HwDeviceExtension, _In_ PUCHAR Port, _In_ PUCHAR Buffer, _In_ ULONG Count)
Definition: stubs.c:165
struct _READ_CAPACITY_DATA READ_CAPACITY_DATA
STORPORT_API USHORT NTAPI StorPortReadRegisterUshort(_In_ PVOID HwDeviceExtension, _In_ PUSHORT Register)
Definition: stubs.c:154
UCHAR Reserved1[2]
Definition: scsi.h:1453
struct _CDB::_SEND_OPC_INFORMATION SEND_OPC_INFORMATION
PHYSICAL_ADDRESS PhysicalBase
Definition: storport.h:1985
UCHAR Lun[0][8]
Definition: scsi.h:2595
UCHAR DisablePageOut
Definition: scsi.h:829
#define _In_opt_
Definition: no_sal2.h:213
struct _CDB::_PLAY_CD::@2096::_LBA LBA
STORPORT_API VOID NTAPI StorPortStallExecution(_In_ ULONG Delay)
Definition: storport.c:1417
UCHAR Type
Definition: scsi.h:1011
PVOID(NTAPI * PStorPortAllocatePool)(_In_ ULONG NumberOfBytes, _In_ ULONG Tag, _In_ PVOID HwDeviceExtension, _Out_ PVOID *PMdl)
Definition: storport.h:2271
BOOLEAN AutoRequestSense
Definition: srb.h:575
UCHAR DisablePageOut
Definition: scsi.h:1615
BOOLEAN TaggedQueuing
Definition: srb.h:574
struct _CDB::_CDB16 CDB16
UCHAR TransferLength[4]
Definition: scsi.h:1618
UCHAR Reserved1
Definition: scsi.h:906
UCHAR OperationCode
Definition: cdrw_hw.h:149
_In_ PKSERVICE_ROUTINE _In_opt_ PVOID _In_opt_ PKSPIN_LOCK SpinLock
Definition: iofuncs.h:798
struct _CDB::_PERSISTENT_RESERVE_IN * PPERSISTENT_RESERVE_IN
STOR_SYNCHRONIZATION_MODEL SynchronizationModel
Definition: storport.h:2042
UCHAR LogicalUnitNumber
Definition: scsi.h:1342
UCHAR Reserved2[4]
Definition: scsi.h:1185
UCHAR TrackNumber
Definition: cdrw_hw.h:211
struct _CDB::_SPACE_TAPE_MARKS::@2097::@2098 Fields
STORPORT_API VOID NTAPI StorPortFreeDeviceBase(_In_ PVOID HwDeviceExtension, _In_ PVOID MappedAddress)
Definition: storport.c:627
uint32_t ULONG_PTR
Definition: typedefs.h:63
FORCEINLINE ULONG StorPortGetMSIInfo(_In_ PVOID HwDeviceExtension, _In_ ULONG MessageId, _Out_ PMESSAGE_INTERRUPT_INFORMATION InterruptInfo)
Definition: storport.h:3117
BOOLEAN(NTAPI * PHW_INTERRUPT)(_In_ PVOID DeviceExtension)
Definition: storport.h:2163
UCHAR ForceUnitAccess
Definition: scsi.h:1602
STORPORT_API VOID NTAPI StorPortSynchronizeAccess(_In_ PVOID HwDeviceExtension, _In_ PSTOR_SYNCHRONIZED_ACCESS SynchronizedAccessRoutine, _In_opt_ PVOID Context)
Definition: storport.c:1430
UCHAR Control
Definition: scsi.h:702
UCHAR Reserved2
Definition: scsi.h:1045
UCHAR OperationCode
Definition: cdrw_hw.h:112
struct _CDB::_SEND_CUE_SHEET SEND_CUE_SHEET
UCHAR VendorUnique
Definition: scsi.h:1242
struct _STOR_SCATTER_GATHER_ELEMENT * PSTOR_SCATTER_GATHER_ELEMENT
BOOLEAN(NTAPI * PHW_INITIALIZE)(_In_ PVOID DeviceExtension)
Definition: storport.h:2146
UCHAR Reserved1
Definition: scsi.h:897
STORPORT_API VOID NTAPI StorPortFreeRegistryBuffer(_In_ PVOID HwDeviceExtension, _In_ PUCHAR Buffer)
Definition: storport.c:642
UCHAR Speed
Definition: scsi.h:999
struct _SCSI_REQUEST_BLOCK * NextSrb
Definition: srb.h:417
UCHAR KIRQL
Definition: env_spec_w32.h:591
UCHAR MediumChanger
Definition: minitape.h:100
struct _CDB::_SEND_KEY SEND_KEY
_In_ PUNICODE_STRING ValueName
Definition: cmfuncs.h:264
UCHAR Reserved[2]
Definition: cdrw_hw.h:1123
UCHAR Byte3
Definition: tools.h:19
UCHAR LogicalUnitNumber
Definition: scsi.h:743
UCHAR Lun
Definition: scsi.h:977
UCHAR BlockAddress[3]
Definition: scsi.h:1238
struct _MODE_PARAMETER_HEADER * PMODE_PARAMETER_HEADER
enum _VPD_ASSOCIATION VPD_ASSOCIATION
UCHAR LogicalBlock[8]
Definition: scsi.h:1617
STORPORT_API PSTOR_SCATTER_GATHER_LIST NTAPI StorPortGetScatterGatherList(_In_ PVOID DeviceExtension, _In_ PSCSI_REQUEST_BLOCK Srb)
Definition: storport.c:846
UCHAR Byte7
Definition: scsi.h:2669
enum _STOR_DEVICE_POWER_STATE STOR_DEVICE_POWER_STATE
UCHAR Lun
Definition: scsi.h:1042
UCHAR LogicalBlockByte2
Definition: scsi.h:806