ReactOS  0.4.13-dev-551-gf37fb1f
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 
408 {
412 
413 typedef enum _STOR_DMA_WIDTH
414 {
420 
421 typedef enum _STOR_SPINLOCK
422 {
423  DpcLock = 1,
426 } STOR_SPINLOCK;
427 
429 {
438 
440 {
444 
446 {
469 
471 {
479 
480 typedef enum _STOR_POWER_ACTION
481 {
491 
492 typedef enum _STOR_PNP_ACTION
493 {
502 
503 typedef enum _VPD_CODE_SET
504 {
510 
511 typedef enum _VPD_ASSOCIATION
512 {
519 
521 {
532 
534 {
552 #if (NTDDI_VERSION >= NTDDI_WIN7)
562 #endif
564 
566 {
572 
573 typedef enum _GETSGSTATUS
574 {
578 
579 typedef struct _SCSI_REQUEST_BLOCK
580 {
581  USHORT Length;
582  UCHAR Function;
585  UCHAR PathId;
586  UCHAR TargetId;
587  UCHAR Lun;
588  UCHAR QueueTag;
592  ULONG SrbFlags;
600  union
601  {
605  };
606 #if defined(_WIN64)
607  ULONG Reserved;
608 #endif
609  UCHAR Cdb[16];
611 
612 typedef struct _SCSI_WMI_REQUEST_BLOCK
613 {
614  USHORT Length;
615  UCHAR Function;
618  UCHAR PathId;
619  UCHAR TargetId;
620  UCHAR Lun;
622  UCHAR WMIFlags;
623  UCHAR Reserved2[2];
624  ULONG SrbFlags;
628  PVOID DataPath;
633 #if (NTDDI_VERSION >= NTDDI_WS03SP1) && defined(_WIN64)
634  ULONG Reserved6;
635 #endif
636  UCHAR Reserved5[16];
638 
639 typedef struct _SCSI_POWER_REQUEST_BLOCK
640 {
641  USHORT Length;
642  UCHAR Function;
645  UCHAR PathId;
646  UCHAR TargetId;
647  UCHAR Lun;
649  ULONG SrbFlags;
658 #if defined(_WIN64)
659  ULONG Reserved;
660 #endif
661  UCHAR Reserved5[16];
663 
664 typedef struct _STOR_DEVICE_CAPABILITIES
665 {
666  USHORT Version;
667  ULONG DeviceD1:1;
668  ULONG DeviceD2:1;
671  ULONG Removable:1;
672  ULONG DockDevice:1;
673  ULONG UniqueID:1;
678 
679 typedef struct _SCSI_PNP_REQUEST_BLOCK
680 {
681  USHORT Length;
682  UCHAR Function;
685  UCHAR PathId;
686  UCHAR TargetId;
687  UCHAR Lun;
689  ULONG SrbFlags;
698 #if defined(_WIN64)
699  ULONG Reserved;
700 #endif
701  UCHAR Reserved4[16];
703 
704 #include <pshpack1.h>
705 typedef union _CDB
706 {
707  struct _CDB6GENERIC
708  {
710  UCHAR Immediate:1;
714  UCHAR Link:1;
715  UCHAR Flag:1;
716  UCHAR Reserved:4;
719  struct _CDB6READWRITE
720  {
727  UCHAR Control;
729  struct _CDB6INQUIRY
730  {
732  UCHAR Reserved1:5;
734  UCHAR PageCode;
737  UCHAR Control;
739  struct _CDB6INQUIRY3
740  {
744  UCHAR Reserved1:6;
745  UCHAR PageCode;
748  UCHAR Control;
750  struct _CDB6VERIFY
751  {
753  UCHAR Fixed:1;
754  UCHAR ByteCompare:1;
755  UCHAR Immediate:1;
756  UCHAR Reserved:2;
759  UCHAR Control;
761  struct _CDB6FORMAT
762  {
771  struct _CDB10
772  {
775  UCHAR Reserved1:2;
786  UCHAR Control;
787  } CDB10, *PCDB10;
788  struct _CDB12
789  {
792  UCHAR Reserved1:2;
796  UCHAR LogicalBlock[4];
799  UCHAR Control;
800  } CDB12, *PCDB12;
801  struct _CDB16
802  {
804  UCHAR Reserved1:3;
807  UCHAR Protection:3;
808  UCHAR LogicalBlock[8];
811  UCHAR Control;
812  } CDB16, *PCDB16;
813  struct _PAUSE_RESUME
814  {
816  UCHAR Reserved1:5;
818  UCHAR Reserved2[6];
819  UCHAR Action;
820  UCHAR Control;
822  struct _READ_TOC
823  {
825  UCHAR Reserved0:1;
826  UCHAR Msf:1;
827  UCHAR Reserved1:3;
829  UCHAR Format2:4;
830  UCHAR Reserved2:4;
831  UCHAR Reserved3[3];
834  UCHAR Control:6;
835  UCHAR Format:2;
836  } READ_TOC, *PREAD_TOC;
837  struct _READ_DISK_INFORMATION
838  {
840  UCHAR Reserved1:5;
841  UCHAR Lun:3;
842  UCHAR Reserved2[5];
844  UCHAR Control;
846  struct _READ_TRACK_INFORMATION
847  {
849  UCHAR Track:1;
850  UCHAR Reserved1:3;
851  UCHAR Reserved2:1;
852  UCHAR Lun:3;
853  UCHAR BlockAddress[4];
856  UCHAR Control;
858  struct _RESERVE_TRACK_RZONE
859  {
861  UCHAR Reserved1[4];
863  UCHAR Control;
865  struct _SEND_OPC_INFORMATION
866  {
868  UCHAR DoOpc:1;
869  UCHAR Reserved1:7;
870  UCHAR Exclude0:1;
871  UCHAR Exclude1:1;
872  UCHAR Reserved2:6;
873  UCHAR Reserved3[4];
877  struct _REPAIR_TRACK
878  {
880  UCHAR Immediate:1;
881  UCHAR Reserved1:7;
882  UCHAR Reserved2[2];
883  UCHAR TrackNumber[2];
884  UCHAR Reserved3[3];
885  UCHAR Control;
887  struct _CLOSE_TRACK
888  {
890  UCHAR Immediate:1;
891  UCHAR Reserved1:7;
892  UCHAR Track:1;
893  UCHAR Session:1;
894  UCHAR Reserved2:6;
896  UCHAR TrackNumber[2];
897  UCHAR Reserved4[3];
898  UCHAR Control;
900  struct _READ_BUFFER_CAPACITY
901  {
903  UCHAR BlockInfo:1;
904  UCHAR Reserved1:7;
905  UCHAR Reserved2[5];
907  UCHAR Control;
909  struct _SEND_CUE_SHEET
910  {
912  UCHAR Reserved[5];
913  UCHAR CueSheetSize[3];
914  UCHAR Control;
916  struct _READ_HEADER
917  {
919  UCHAR Reserved1:1;
920  UCHAR Msf:1;
921  UCHAR Reserved2:3;
922  UCHAR Lun:3;
926  UCHAR Control;
928  struct _PLAY_AUDIO
929  {
931  UCHAR Reserved1:5;
935  UCHAR PlayLength[2];
936  UCHAR Control;
938  struct _PLAY_AUDIO_MSF
939  {
941  UCHAR Reserved1:5;
947  UCHAR EndingM;
948  UCHAR EndingS;
949  UCHAR EndingF;
950  UCHAR Control;
952  struct _BLANK_MEDIA
953  {
955  UCHAR BlankType:3;
956  UCHAR Reserved1:1;
957  UCHAR Immediate:1;
958  UCHAR Reserved2:3;
960  UCHAR Reserved3[5];
961  UCHAR Control;
963  struct _PLAY_CD
964  {
966  UCHAR Reserved1:1;
967  UCHAR CMSF:1;
969  UCHAR Lun:3;
970  _ANONYMOUS_UNION union
971  {
972  struct _LBA
973  {
975  UCHAR PlayLength[4];
976  } LBA;
977  struct _MSF
978  {
983  UCHAR EndingM;
984  UCHAR EndingS;
985  UCHAR EndingF;
987  } MSF;
988  } DUMMYUNIONNAME;
989  UCHAR Audio:1;
990  UCHAR Composite:1;
991  UCHAR Port1:1;
992  UCHAR Port2:1;
993  UCHAR Reserved2:3;
994  UCHAR Speed:1;
995  UCHAR Control;
996  } PLAY_CD, *PPLAY_CD;
997  struct _SCAN_CD
998  {
1001  UCHAR Reserved1:3;
1002  UCHAR Direct:1;
1003  UCHAR Lun:3;
1005  UCHAR Reserved2[3];
1006  UCHAR Reserved3:6;
1007  UCHAR Type:2;
1008  UCHAR Reserved4;
1009  UCHAR Control;
1010  } SCAN_CD, *PSCAN_CD;
1011  struct _STOP_PLAY_SCAN
1012  {
1014  UCHAR Reserved1:5;
1015  UCHAR Lun:3;
1016  UCHAR Reserved2[7];
1017  UCHAR Control;
1019  struct _SUBCHANNEL
1020  {
1022  UCHAR Reserved0:1;
1023  UCHAR Msf:1;
1024  UCHAR Reserved1:3;
1026  UCHAR Reserved2:6;
1027  UCHAR SubQ:1;
1028  UCHAR Reserved3:1;
1029  UCHAR Format;
1030  UCHAR Reserved4[2];
1033  UCHAR Control;
1034  } SUBCHANNEL, *PSUBCHANNEL;
1035  struct _READ_CD
1036  {
1039  UCHAR Reserved0:1;
1041  UCHAR Lun:3;
1042  UCHAR StartingLBA[4];
1043  UCHAR TransferBlocks[3];
1044  UCHAR Reserved2:1;
1045  UCHAR ErrorFlags:2;
1046  UCHAR IncludeEDC:1;
1048  UCHAR HeaderCode:2;
1051  UCHAR Reserved3:5;
1052  UCHAR Control;
1053  } READ_CD, *PREAD_CD;
1054  struct _READ_CD_MSF
1055  {
1058  UCHAR Reserved1:1;
1060  UCHAR Lun:3;
1061  UCHAR Reserved2;
1062  UCHAR StartingM;
1063  UCHAR StartingS;
1064  UCHAR StartingF;
1065  UCHAR EndingM;
1066  UCHAR EndingS;
1067  UCHAR EndingF;
1068  UCHAR Reserved3;
1069  UCHAR Reserved4:1;
1070  UCHAR ErrorFlags:2;
1071  UCHAR IncludeEDC:1;
1073  UCHAR HeaderCode:2;
1076  UCHAR Reserved5:5;
1077  UCHAR Control;
1079  struct _PLXTR_READ_CDDA
1080  {
1082  UCHAR Reserved0:5;
1092  UCHAR SubCode;
1093  UCHAR Control;
1095  struct _NEC_READ_CDDA
1096  {
1098  UCHAR Reserved0;
1103  UCHAR Reserved1;
1106  UCHAR Control;
1108  struct _MODE_SENSE
1109  {
1111  UCHAR Reserved1:3;
1112  UCHAR Dbd:1;
1113  UCHAR Reserved2:1;
1115  UCHAR PageCode:6;
1116  UCHAR Pc:2;
1117  UCHAR Reserved3;
1119  UCHAR Control;
1120  } MODE_SENSE, *PMODE_SENSE;
1121  struct _MODE_SENSE10
1122  {
1124  UCHAR Reserved1:3;
1125  UCHAR Dbd:1;
1126  UCHAR Reserved2:1;
1128  UCHAR PageCode:6;
1129  UCHAR Pc:2;
1130  UCHAR Reserved3[4];
1132  UCHAR Control;
1134  struct _MODE_SELECT
1135  {
1137  UCHAR SPBit:1;
1138  UCHAR Reserved1:3;
1139  UCHAR PFBit:1;
1141  UCHAR Reserved2[2];
1143  UCHAR Control;
1145  struct _MODE_SELECT10
1146  {
1148  UCHAR SPBit:1;
1149  UCHAR Reserved1:3;
1150  UCHAR PFBit:1;
1152  UCHAR Reserved2[5];
1154  UCHAR Control;
1156  struct _LOCATE
1157  {
1159  UCHAR Immediate:1;
1160  UCHAR CPBit:1;
1161  UCHAR BTBit:1;
1162  UCHAR Reserved1:2;
1164  UCHAR Reserved3;
1166  UCHAR Reserved4;
1167  UCHAR Partition;
1168  UCHAR Control;
1169  } LOCATE, *PLOCATE;
1170  struct _LOGSENSE
1171  {
1173  UCHAR SPBit:1;
1174  UCHAR PPCBit:1;
1175  UCHAR Reserved1:3;
1177  UCHAR PageCode:6;
1178  UCHAR PCBit:2;
1179  UCHAR Reserved2;
1180  UCHAR Reserved3;
1183  UCHAR Control;
1184  } LOGSENSE, *PLOGSENSE;
1185  struct _LOGSELECT
1186  {
1188  UCHAR SPBit:1;
1189  UCHAR PCRBit:1;
1190  UCHAR Reserved1:3;
1192  UCHAR Reserved:6;
1193  UCHAR PCBit:2;
1194  UCHAR Reserved2[4];
1196  UCHAR Control;
1197  } LOGSELECT, *PLOGSELECT;
1198  struct _PRINT
1199  {
1201  UCHAR Reserved:5;
1203  UCHAR TransferLength[3];
1204  UCHAR Control;
1205  } PRINT, *PPRINT;
1206  struct _SEEK
1207  {
1209  UCHAR Reserved1:5;
1212  UCHAR Reserved2[3];
1213  UCHAR Control;
1214  } SEEK, *PSEEK;
1215  struct _ERASE
1216  {
1218  UCHAR Long:1;
1219  UCHAR Immediate:1;
1220  UCHAR Reserved1:3;
1222  UCHAR Reserved2[3];
1223  UCHAR Control;
1224  } ERASE, *PERASE;
1225  struct _START_STOP
1226  {
1228  UCHAR Immediate:1;
1229  UCHAR Reserved1:4;
1231  UCHAR Reserved2[2];
1232  UCHAR Start:1;
1233  UCHAR LoadEject:1;
1234  UCHAR Reserved3:6;
1235  UCHAR Control;
1236  } START_STOP, *PSTART_STOP;
1237  struct _MEDIA_REMOVAL
1238  {
1240  UCHAR Reserved1:5;
1242  UCHAR Reserved2[2];
1243  UCHAR Prevent:1;
1244  UCHAR Persistant:1;
1245  UCHAR Reserved3:6;
1246  UCHAR Control;
1248  struct _SEEK_BLOCK
1249  {
1251  UCHAR Immediate:1;
1252  UCHAR Reserved1:7;
1253  UCHAR BlockAddress[3];
1254  UCHAR Link:1;
1255  UCHAR Flag:1;
1256  UCHAR Reserved2:4;
1257  UCHAR VendorUnique:2;
1258  } SEEK_BLOCK, *PSEEK_BLOCK;
1259  struct _REQUEST_BLOCK_ADDRESS
1260  {
1262  UCHAR Reserved1[3];
1264  UCHAR Link:1;
1265  UCHAR Flag:1;
1266  UCHAR Reserved2:4;
1267  UCHAR VendorUnique:2;
1269  struct _PARTITION
1270  {
1272  UCHAR Immediate:1;
1273  UCHAR Sel:1;
1275  UCHAR Reserved1[3];
1276  UCHAR Control;
1277  } PARTITION, *PPARTITION;
1278  struct _WRITE_TAPE_MARKS
1279  {
1281  UCHAR Immediate:1;
1282  UCHAR WriteSetMarks:1;
1283  UCHAR Reserved:3;
1285  UCHAR TransferLength[3];
1286  UCHAR Control;
1288  struct _SPACE_TAPE_MARKS
1289  {
1291  UCHAR Code:3;
1292  UCHAR Reserved:2;
1295  UCHAR NumMarks;
1297  union
1298  {
1299  UCHAR value;
1300  struct
1301  {
1302  UCHAR Link:1;
1303  UCHAR Flag:1;
1304  UCHAR Reserved:4;
1305  UCHAR VendorUnique:2;
1306  } Fields;
1307  } Byte6;
1309  struct _READ_POSITION
1310  {
1311  UCHAR Operation;
1312  UCHAR BlockType:1;
1313  UCHAR Reserved1:4;
1314  UCHAR Lun:3;
1315  UCHAR Reserved2[7];
1316  UCHAR Control;
1318  struct _CDB6READWRITETAPE
1319  {
1322  UCHAR Reserved:3;
1326  UCHAR Link:1;
1327  UCHAR Flag:1;
1328  UCHAR Reserved1:4;
1329  UCHAR VendorUnique:2;
1331  struct _INIT_ELEMENT_STATUS
1332  {
1334  UCHAR Reserved1:5;
1336  UCHAR Reserved2[3];
1337  UCHAR Reserved3:7;
1338  UCHAR NoBarCode:1;
1340  struct _INITIALIZE_ELEMENT_RANGE
1341  {
1343  UCHAR Range:1;
1344  UCHAR Reserved1:4;
1347  UCHAR Reserved2[2];
1349  UCHAR Reserved3;
1350  UCHAR Reserved4:7;
1351  UCHAR NoBarCode:1;
1353  struct _POSITION_TO_ELEMENT
1354  {
1356  UCHAR Reserved1:5;
1360  UCHAR Reserved2[2];
1361  UCHAR Flip:1;
1362  UCHAR Reserved3:7;
1363  UCHAR Control;
1365  struct _MOVE_MEDIUM
1366  {
1368  UCHAR Reserved1:5;
1373  UCHAR Reserved2[2];
1374  UCHAR Flip:1;
1375  UCHAR Reserved3:7;
1376  UCHAR Control;
1378  struct _EXCHANGE_MEDIUM
1379  {
1381  UCHAR Reserved1:5;
1387  UCHAR Flip1:1;
1388  UCHAR Flip2:1;
1389  UCHAR Reserved3:6;
1390  UCHAR Control;
1392  struct _READ_ELEMENT_STATUS
1393  {
1395  UCHAR ElementType:4;
1396  UCHAR VolTag:1;
1400  UCHAR Reserved1;
1402  UCHAR Reserved2;
1403  UCHAR Control;
1405  struct _SEND_VOLUME_TAG
1406  {
1408  UCHAR ElementType:4;
1409  UCHAR Reserved1:1;
1412  UCHAR Reserved2;
1413  UCHAR ActionCode:5;
1414  UCHAR Reserved3:3;
1415  UCHAR Reserved4[2];
1417  UCHAR Reserved5;
1418  UCHAR Control;
1420  struct _REQUEST_VOLUME_ELEMENT_ADDRESS
1421  {
1423  UCHAR ElementType:4;
1424  UCHAR VolTag:1;
1427  UCHAR NumberElements[2];
1428  UCHAR Reserved1;
1430  UCHAR Reserved2;
1431  UCHAR Control;
1433  struct _LOAD_UNLOAD
1434  {
1436  UCHAR Immediate:1;
1437  UCHAR Reserved1:4;
1438  UCHAR Lun:3;
1439  UCHAR Reserved2[2];
1440  UCHAR Start:1;
1441  UCHAR LoadEject:1;
1442  UCHAR Reserved3:6;
1443  UCHAR Reserved4[3];
1444  UCHAR Slot;
1445  UCHAR Reserved5[3];
1447  struct _MECH_STATUS
1448  {
1450  UCHAR Reserved:5;
1451  UCHAR Lun:3;
1452  UCHAR Reserved1[6];
1454  UCHAR Reserved2[1];
1455  UCHAR Control;
1457  struct _SYNCHRONIZE_CACHE10
1458  {
1460  UCHAR RelAddr:1;
1461  UCHAR Immediate:1;
1462  UCHAR Reserved:3;
1463  UCHAR Lun:3;
1465  UCHAR Reserved2;
1466  UCHAR BlockCount[2];
1467  UCHAR Control;
1469  struct _GET_EVENT_STATUS_NOTIFICATION
1470  {
1472  UCHAR Immediate:1;
1473  UCHAR Reserved:4;
1474  UCHAR Lun:3;
1475  UCHAR Reserved2[2];
1477  UCHAR Reserved3[2];
1479  UCHAR Control;
1481  struct _GET_PERFORMANCE
1482  {
1484  UCHAR Except:2;
1485  UCHAR Write:1;
1486  UCHAR Tolerance:2;
1487  UCHAR Reserved0:3;
1488  UCHAR StartingLBA[4];
1489  UCHAR Reserved1[2];
1491  UCHAR Type;
1492  UCHAR Control;
1493  } GET_PERFORMANCE;
1494  struct _READ_DVD_STRUCTURE
1495  {
1497  UCHAR Reserved1:5;
1498  UCHAR Lun:3;
1499  UCHAR RMDBlockNumber[4];
1501  UCHAR Format;
1503  UCHAR Reserved3:6;
1504  UCHAR AGID:2;
1505  UCHAR Control;
1507  struct _SET_STREAMING
1508  {
1510  UCHAR Reserved[8];
1512  UCHAR Control;
1513  } SET_STREAMING;
1514  struct _SEND_DVD_STRUCTURE
1515  {
1517  UCHAR Reserved1:5;
1518  UCHAR Lun:3;
1519  UCHAR Reserved2[5];
1520  UCHAR Format;
1522  UCHAR Reserved3;
1523  UCHAR Control;
1525  struct _SEND_KEY
1526  {
1528  UCHAR Reserved1:5;
1529  UCHAR Lun:3;
1530  UCHAR Reserved2[6];
1532  UCHAR KeyFormat:6;
1533  UCHAR AGID:2;
1534  UCHAR Control;
1535  } SEND_KEY, *PSEND_KEY;
1536  struct _REPORT_KEY
1537  {
1539  UCHAR Reserved1:5;
1540  UCHAR Lun:3;
1542  UCHAR Reserved2[2];
1544  UCHAR KeyFormat:6;
1545  UCHAR AGID:2;
1546  UCHAR Control;
1547  } REPORT_KEY, *PREPORT_KEY;
1548  struct _SET_READ_AHEAD
1549  {
1551  UCHAR Reserved1:5;
1552  UCHAR Lun:3;
1553  UCHAR TriggerLBA[4];
1554  UCHAR ReadAheadLBA[4];
1555  UCHAR Reserved2;
1556  UCHAR Control;
1558  struct _READ_FORMATTED_CAPACITIES
1559  {
1561  UCHAR Reserved1:5;
1562  UCHAR Lun:3;
1563  UCHAR Reserved2[5];
1565  UCHAR Control;
1567  struct _REPORT_LUNS
1568  {
1570  UCHAR Reserved1[5];
1572  UCHAR Reserved2[1];
1573  UCHAR Control;
1575  struct _PERSISTENT_RESERVE_IN
1576  {
1578  UCHAR ServiceAction:5;
1579  UCHAR Reserved1:3;
1580  UCHAR Reserved2[5];
1582  UCHAR Control;
1584  struct _PERSISTENT_RESERVE_OUT
1585  {
1587  UCHAR ServiceAction:5;
1588  UCHAR Reserved1:3;
1589  UCHAR Type:4;
1590  UCHAR Scope:4;
1591  UCHAR Reserved2[4];
1593  UCHAR Control;
1595  struct _GET_CONFIGURATION
1596  {
1598  UCHAR RequestType:1;
1599  UCHAR Reserved1:7;
1601  UCHAR Reserved2[3];
1603  UCHAR Control;
1605  struct _SET_CD_SPEED
1606  {
1608  _ANONYMOUS_UNION union
1609  {
1610  UCHAR Reserved1;
1611  _ANONYMOUS_STRUCT struct
1612  {
1614  UCHAR Reserved3:6;
1615  } DUMMYSTRUCTNAME;
1616  } DUMMYUNIONNAME;
1617  UCHAR ReadSpeed[2];
1618  UCHAR WriteSpeed[2];
1619  UCHAR Reserved2[5];
1620  UCHAR Control;
1622  struct _READ12
1623  {
1626  UCHAR Reserved1:2;
1630  UCHAR LogicalBlock[4];
1631  UCHAR TransferLength[4];
1632  UCHAR Reserved2:7;
1633  UCHAR Streaming:1;
1634  UCHAR Control;
1635  } READ12;
1636  struct _WRITE12
1637  {
1640  UCHAR Reserved1:1;
1641  UCHAR EBP:1;
1645  UCHAR LogicalBlock[4];
1646  UCHAR TransferLength[4];
1647  UCHAR Reserved2:7;
1648  UCHAR Streaming:1;
1649  UCHAR Control;
1650  } WRITE12;
1651  struct _READ16
1652  {
1654  UCHAR Reserved1:3;
1657  UCHAR ReadProtect:3;
1658  UCHAR LogicalBlock[8];
1659  UCHAR TransferLength[4];
1660  UCHAR Reserved2:7;
1661  UCHAR Streaming:1;
1662  UCHAR Control;
1663  } READ16;
1664  struct _WRITE16
1665  {
1667  UCHAR Reserved1:3;
1670  UCHAR WriteProtect:3;
1671  UCHAR LogicalBlock[8];
1672  UCHAR TransferLength[4];
1673  UCHAR Reserved2:7;
1674  UCHAR Streaming:1;
1675  UCHAR Control;
1676  } WRITE16;
1677  struct _VERIFY16
1678  {
1680  UCHAR Reserved1:1;
1681  UCHAR ByteCheck:1;
1682  UCHAR BlockVerify:1;
1683  UCHAR Reserved2: 1;
1685  UCHAR VerifyProtect:3;
1686  UCHAR LogicalBlock[8];
1688  UCHAR Reserved3:7;
1689  UCHAR Streaming:1;
1690  UCHAR Control;
1691  } VERIFY16;
1692  struct _SYNCHRONIZE_CACHE16
1693  {
1695  UCHAR Reserved1:1;
1696  UCHAR Immediate:1;
1697  UCHAR Reserved2:6;
1698  UCHAR LogicalBlock[8];
1699  UCHAR BlockCount[4];
1700  UCHAR Reserved3;
1701  UCHAR Control;
1703  struct _READ_CAPACITY16
1704  {
1706  UCHAR ServiceAction:5;
1707  UCHAR Reserved1:3;
1708  UCHAR LogicalBlock[8];
1709  UCHAR BlockCount[4];
1710  UCHAR PMI:1;
1711  UCHAR Reserved2:7;
1712  UCHAR Control;
1713  } READ_CAPACITY16;
1714  ULONG AsUlong[4];
1715  UCHAR AsByte[16];
1716 } CDB, *PCDB;
1717 
1718 typedef union _EIGHT_BYTE
1719 {
1720  struct
1721  {
1722  UCHAR Byte0;
1723  UCHAR Byte1;
1724  UCHAR Byte2;
1725  UCHAR Byte3;
1726  UCHAR Byte4;
1727  UCHAR Byte5;
1728  UCHAR Byte6;
1729  UCHAR Byte7;
1730  };
1733 
1734 typedef union _FOUR_BYTE
1735 {
1736  struct
1737  {
1738  UCHAR Byte0;
1739  UCHAR Byte1;
1740  UCHAR Byte2;
1741  UCHAR Byte3;
1742  };
1743  ULONG AsULong;
1744 } FOUR_BYTE, *PFOUR_BYTE;
1745 
1746 typedef union _TWO_BYTE
1747 {
1748  struct
1749  {
1750  UCHAR Byte0;
1751  UCHAR Byte1;
1752  };
1753  USHORT AsUShort;
1754 } TWO_BYTE, *PTWO_BYTE;
1755 #include <poppack.h>
1756 
1757 #if (NTDDI_VERSION < NTDDI_WINXP)
1758 typedef struct _INQUIRYDATA
1759 {
1760  UCHAR DeviceType:5;
1764  UCHAR Versions;
1766  UCHAR HiSupport:1;
1767  UCHAR NormACA:1;
1768  UCHAR ReservedBit:1;
1769  UCHAR AERC:1;
1771  UCHAR Reserved[2];
1772  UCHAR SoftReset:1;
1773  UCHAR CommandQueue:1;
1774  UCHAR Reserved2:1;
1776  UCHAR Synchronous:1;
1777  UCHAR Wide16Bit:1;
1778  UCHAR Wide32Bit:1;
1780  UCHAR VendorId[8];
1781  UCHAR ProductId[16];
1783  UCHAR VendorSpecific[20];
1784  UCHAR Reserved3[40];
1786 #else
1787 #include <pshpack1.h>
1788 typedef struct _INQUIRYDATA
1789 {
1790  UCHAR DeviceType:5;
1794  union
1795  {
1796  UCHAR Versions;
1797  struct
1798  {
1799  UCHAR ANSIVersion:3;
1800  UCHAR ECMAVersion:3;
1801  UCHAR ISOVersion:2;
1802  };
1803  };
1805  UCHAR HiSupport:1;
1806  UCHAR NormACA:1;
1807  UCHAR TerminateTask:1;
1808  UCHAR AERC:1;
1810  UCHAR Reserved;
1811  UCHAR Addr16:1;
1812  UCHAR Addr32:1;
1813  UCHAR AckReqQ:1;
1814  UCHAR MediumChanger:1;
1815  UCHAR MultiPort:1;
1816  UCHAR ReservedBit2:1;
1818  UCHAR ReservedBit3:1;
1819  UCHAR SoftReset:1;
1820  UCHAR CommandQueue:1;
1823  UCHAR Synchronous:1;
1824  UCHAR Wide16Bit:1;
1825  UCHAR Wide32Bit:1;
1827  UCHAR VendorId[8];
1828  UCHAR ProductId[16];
1830  UCHAR VendorSpecific[20];
1831  UCHAR Reserved3[40];
1833 #include <poppack.h>
1834 #endif
1835 
1836 typedef struct _VPD_MEDIA_SERIAL_NUMBER_PAGE
1837 {
1838  UCHAR DeviceType:5;
1840  UCHAR PageCode;
1841  UCHAR Reserved;
1842  UCHAR PageLength;
1843  UCHAR SerialNumber[0];
1845 
1846 typedef struct _VPD_SERIAL_NUMBER_PAGE
1847 {
1848  UCHAR DeviceType:5;
1850  UCHAR PageCode;
1851  UCHAR Reserved;
1852  UCHAR PageLength;
1853  UCHAR SerialNumber[0];
1855 
1856 typedef struct _VPD_IDENTIFICATION_DESCRIPTOR
1857 {
1858  UCHAR CodeSet:4;
1859  UCHAR Reserved:4;
1861  UCHAR Association:2;
1862  UCHAR Reserved2:2;
1863  UCHAR Reserved3;
1865  UCHAR Identifier[0];
1867 
1868 typedef struct _VPD_IDENTIFICATION_PAGE
1869 {
1870  UCHAR DeviceType:5;
1872  UCHAR PageCode;
1873  UCHAR Reserved;
1874  UCHAR PageLength;
1875  UCHAR Descriptors[0];
1877 
1878 typedef struct _VPD_SUPPORTED_PAGES_PAGE
1879 {
1880  UCHAR DeviceType:5;
1882  UCHAR PageCode;
1883  UCHAR Reserved;
1884  UCHAR PageLength;
1887 
1888 #include <pshpack1.h>
1889 typedef struct _READ_CAPACITY_DATA
1890 {
1894 
1895 typedef struct _READ_CAPACITY_DATA_EX
1896 {
1900 
1901 typedef struct _MODE_PARAMETER_HEADER
1902 {
1904  UCHAR MediumType;
1908 
1909 typedef struct _MODE_PARAMETER_HEADER10
1910 {
1911  UCHAR ModeDataLength[2];
1912  UCHAR MediumType;
1914  UCHAR Reserved[2];
1917 
1918 typedef struct _MODE_PARAMETER_BLOCK
1919 {
1921  UCHAR NumberOfBlocks[3];
1922  UCHAR Reserved;
1923  UCHAR BlockLength[3];
1925 
1926 typedef struct _LUN_LIST
1927 {
1928  UCHAR LunListLength[4];
1929  UCHAR Reserved[4];
1930 #if !defined(__midl)
1931  UCHAR Lun[0][8];
1932 #endif
1933 } LUN_LIST, *PLUN_LIST;
1934 #include <poppack.h>
1935 
1937 
1938 typedef struct _ACCESS_RANGE
1939 {
1944 
1945 typedef struct _MEMORY_REGION
1946 {
1951 
1952 typedef struct _PORT_CONFIGURATION_INFORMATION
1953 {
1954  ULONG Length;
1962  ULONG DmaChannel;
1963  ULONG DmaPort;
1969  PVOID Reserved;
1971  CCHAR InitiatorBusId[8];
1973  BOOLEAN Master;
1989  UCHAR ReservedUchars[2];
1990  ULONG SlotNumber;
1995  ULONG DmaPort2;
2007 
2009 {
2014 
2016 {
2021 
2022 typedef struct _DPC_BUFFER
2023 {
2027  struct
2028  {
2031  };
2037 } DPC_BUFFER;
2038 
2039 typedef struct _STOR_DPC
2040 {
2043 } STOR_DPC, *PSTOR_DPC;
2044 
2045 typedef struct _STOR_LOCK_HANDLE
2046 {
2048  struct
2049  {
2050  struct
2051  {
2054  } LockQueue;
2056  } Context;
2058 
2060 {
2076 
2078 {
2088 
2090 {
2096 
2098 {
2106 
2107 typedef
2108 BOOLEAN
2110  _In_ PVOID DeviceExtension);
2111 
2112 typedef
2113 BOOLEAN
2115  _In_ PVOID DeviceExtension,
2117 
2118 typedef
2119 BOOLEAN
2121  _In_ PVOID DeviceExtension,
2123 
2124 typedef
2125 BOOLEAN
2127  _In_ PVOID DeviceExtension);
2128 
2129 typedef
2130 VOID
2132  _In_ PVOID DeviceExtension);
2133 
2134 typedef
2135 VOID
2137  _In_ PVOID DeviceExtension);
2138 
2139 typedef
2140 ULONG
2142  IN PVOID DeviceExtension,
2143  IN PVOID HwContext,
2144  IN PVOID BusInformation,
2145  IN PCHAR ArgumentString,
2147  OUT PBOOLEAN Again);
2148 
2149 typedef
2150 BOOLEAN
2152  IN PVOID DeviceExtension,
2153  IN ULONG PathId);
2154 
2155 typedef
2156 BOOLEAN
2158  IN PVOID DeviceExtension,
2159  IN PVOID Context,
2160  IN BOOLEAN SaveState);
2161 
2162 typedef
2165  IN PVOID DeviceExtension,
2166  IN SCSI_ADAPTER_CONTROL_TYPE ControlType,
2167  IN PVOID Parameters);
2168 
2169 typedef
2170 BOOLEAN
2172  _In_ PVOID DeviceExtension);
2173 
2174 typedef
2175 VOID
2177  _In_ PSTOR_DPC Dpc,
2178  _In_ PVOID HwDeviceExtension,
2181 
2182 typedef
2183 BOOLEAN
2184 (NTAPI STOR_SYNCHRONIZED_ACCESS)(
2185  _In_ PVOID HwDeviceExtension,
2187 
2188 typedef STOR_SYNCHRONIZED_ACCESS *PSTOR_SYNCHRONIZED_ACCESS;
2189 
2190 typedef
2191 VOID
2194  _In_ PVOID *Irp,
2196  _In_ PVOID Context);
2197 
2198 typedef
2199 BOOLEAN
2201  _In_ PVOID HwDeviceExtension,
2202  _In_ ULONG MessageId,
2203  _Out_ PMESSAGE_INTERRUPT_INFORMATION InterruptInfo);
2204 
2205 typedef
2206 VOID
2208  _In_ PVOID HwDeviceExtension,
2209  _In_ PSTOR_SCATTER_GATHER_LIST ScatterGatherList,
2210  _In_ BOOLEAN WriteToDevice);
2211 
2212 typedef
2215  _In_ PVOID HwDeviceExtension,
2216  _In_ PVOID Mdl,
2217  _In_ PVOID CurrentVa,
2218  _In_ ULONG Length,
2220  _In_ PVOID Context,
2221  _In_ BOOLEAN WriteToDevice,
2222  _Inout_ PVOID ScatterGatherBuffer,
2223  _In_ ULONG ScatterGatherBufferLength);
2224 
2225 typedef
2226 VOID
2228  _In_ PVOID PMemory,
2229  _In_ PVOID HwDeviceExtension,
2230  _In_opt_ PVOID PMdl);
2231 
2232 typedef
2233 PVOID
2236  _In_ ULONG Tag,
2237  _In_ PVOID HwDeviceExtension,
2238  _Out_ PVOID *PMdl);
2239 
2240 typedef
2241 PVOID
2244 
2246 {
2255 
2256 typedef struct _HW_INITIALIZATION_DATA
2257 {
2271  PVOID Reserved;
2279  PVOID VendorId;
2282  PVOID DeviceId;
2286 
2287 
2288 
2289 #define REVERSE_BYTES_QUAD(Destination, Source) { \
2290  PEIGHT_BYTE d = (PEIGHT_BYTE)(Destination); \
2291  PEIGHT_BYTE s = (PEIGHT_BYTE)(Source); \
2292  d->Byte7 = s->Byte0; \
2293  d->Byte6 = s->Byte1; \
2294  d->Byte5 = s->Byte2; \
2295  d->Byte4 = s->Byte3; \
2296  d->Byte3 = s->Byte4; \
2297  d->Byte2 = s->Byte5; \
2298  d->Byte1 = s->Byte6; \
2299  d->Byte0 = s->Byte7; \
2300 }
2301 
2302 #define REVERSE_BYTES(Destination, Source) { \
2303  PFOUR_BYTE d = (PFOUR_BYTE)(Destination); \
2304  PFOUR_BYTE s = (PFOUR_BYTE)(Source); \
2305  d->Byte3 = s->Byte0; \
2306  d->Byte2 = s->Byte1; \
2307  d->Byte1 = s->Byte2; \
2308  d->Byte0 = s->Byte3; \
2309 }
2310 
2311 #define REVERSE_BYTES_SHORT(Destination, Source) { \
2312  PTWO_BYTE d = (PTWO_BYTE)(Destination); \
2313  PTWO_BYTE s = (PTWO_BYTE)(Source); \
2314  d->Byte1 = s->Byte0; \
2315  d->Byte0 = s->Byte1; \
2316 }
2317 
2318 #define StorPortCopyMemory(Destination,Source,Length) memcpy((Destination),(Source),(Length))
2319 
2321 PUCHAR
2322 NTAPI
2324  _In_ PVOID HwDeviceExtension,
2325  _In_ PULONG Length);
2326 
2328 BOOLEAN
2329 NTAPI
2330 StorPortBusy(
2331  _In_ PVOID HwDeviceExtension,
2332  _In_ ULONG RequestsToComplete);
2333 
2335 VOID
2336 NTAPI
2338  _In_ PVOID HwDeviceExtension,
2339  _In_ UCHAR PathId,
2341  _In_ UCHAR Lun,
2342  _In_ UCHAR SrbStatus);
2343 
2345 ULONG64
2346 NTAPI
2349 
2352 NTAPI
2354  _In_ ULONG64 UlongAddress);
2355 
2357 VOID
2358 __cdecl
2360  _In_ ULONG DebugPrintLevel,
2361  _In_ PCCHAR DebugMessage,
2362  ...);
2363 
2365 BOOLEAN
2366 NTAPI
2368  _In_ PVOID HwDeviceExtension,
2369  _In_ UCHAR PathId,
2371  _In_ UCHAR Lun,
2372  _In_ ULONG RequestsToComplete);
2373 
2375 BOOLEAN
2376 NTAPI
2378  _In_ PVOID HwDeviceExtension,
2379  _In_ UCHAR PathId,
2381  _In_ UCHAR Lun);
2382 
2384 VOID
2385 NTAPI
2387  _In_ PVOID HwDeviceExtension,
2388  _In_ PVOID MappedAddress);
2389 
2391 VOID
2392 NTAPI
2394  _In_ PVOID HwDeviceExtension,
2395  _In_ PUCHAR Buffer);
2396 
2398 ULONG
2399 NTAPI
2401  _In_ PVOID DeviceExtension,
2402  _In_ ULONG BusDataType,
2403  _In_ ULONG SystemIoBusNumber,
2406  _In_ ULONG Length);
2407 
2409 PVOID
2410 NTAPI
2412  _In_ PVOID HwDeviceExtension,
2414  _In_ ULONG SystemIoBusNumber,
2415  _In_ STOR_PHYSICAL_ADDRESS IoAddress,
2417  _In_ BOOLEAN InIoSpace);
2418 
2420 PVOID
2421 NTAPI
2423  _In_ PVOID HwDeviceExtension,
2424  _In_ UCHAR PathId,
2426  _In_ UCHAR Lun);
2427 
2430 NTAPI
2432  _In_ PVOID HwDeviceExtension,
2435  _Out_ ULONG *Length);
2436 
2439 NTAPI
2441  _In_ PVOID DeviceExtension,
2443 
2446 NTAPI
2448  _In_ PVOID DeviceExtension,
2449  _In_ UCHAR PathId,
2451  _In_ UCHAR Lun,
2452  _In_ LONG QueueTag);
2453 
2455 PVOID
2456 NTAPI
2458  _In_ PVOID HwDeviceExtension,
2461 
2463 PVOID
2464 NTAPI
2466  _In_ PVOID HwDeviceExtension,
2468 
2470 ULONG
2471 NTAPI
2477 
2479 VOID
2480 NTAPI
2482  _In_ PVOID HwDeviceExtension,
2484  _In_ UCHAR PathId,
2486  _In_ UCHAR Lun,
2488  _In_ ULONG UniqueId);
2489 
2491 VOID
2492 NTAPI
2496  _In_ ULONG Length);
2497 
2499 VOID
2500 __cdecl
2502  _In_ SCSI_NOTIFICATION_TYPE NotificationType,
2503  _In_ PVOID HwDeviceExtension,
2504  ...);
2505 
2507 VOID
2508 NTAPI
2510  _Out_ PLARGE_INTEGER CurrentTime);
2511 
2513 BOOLEAN
2514 NTAPI
2516  _In_ PVOID HwDeviceExtension,
2517  _In_ ULONG TimeOut);
2518 
2520 BOOLEAN
2521 NTAPI
2523  _In_ PVOID HwDeviceExtension,
2524  _In_ UCHAR PathId,
2526  _In_ UCHAR Lun,
2527  _In_ ULONG TimeOut);
2528 
2530 VOID
2531 NTAPI
2533  _In_ PVOID HwDeviceExtension,
2534  _In_ PUCHAR Port,
2535  _In_ PUCHAR Buffer,
2536  _In_ ULONG Count);
2537 
2539 VOID
2540 NTAPI
2542  _In_ PVOID HwDeviceExtension,
2543  _In_ PULONG Port,
2544  _In_ PULONG Buffer,
2545  _In_ ULONG Count);
2546 
2548 VOID
2549 NTAPI
2551  _In_ PVOID HwDeviceExtension,
2552  _In_ PUSHORT Port,
2554  _In_ ULONG Count);
2555 
2557 UCHAR
2558 NTAPI
2560  _In_ PVOID HwDeviceExtension,
2561  _In_ PUCHAR Port);
2562 
2564 ULONG
2565 NTAPI
2567  _In_ PVOID HwDeviceExtension,
2568  _In_ PULONG Port);
2569 
2571 USHORT
2572 NTAPI
2574  _In_ PVOID HwDeviceExtension,
2575  _In_ PUSHORT Port);
2576 
2578 VOID
2579 NTAPI
2581  _In_ PVOID HwDeviceExtension,
2582  _In_ PUCHAR Register,
2583  _In_ PUCHAR Buffer,
2584  _In_ ULONG Count);
2585 
2587 VOID
2588 NTAPI
2590  _In_ PVOID HwDeviceExtension,
2591  _In_ PULONG Register,
2592  _In_ PULONG Buffer,
2593  _In_ ULONG Count);
2594 
2596 VOID
2597 NTAPI
2599  _In_ PVOID HwDeviceExtension,
2600  _In_ PUSHORT Register,
2602  _In_ ULONG Count);
2603 
2605 UCHAR
2606 NTAPI
2608  _In_ PVOID HwDeviceExtension,
2609  _In_ PUCHAR Register);
2610 
2612 ULONG
2613 NTAPI
2615  _In_ PVOID HwDeviceExtension,
2616  _In_ PULONG Register);
2617 
2619 USHORT
2620 NTAPI
2622  _In_ PVOID HwDeviceExtension,
2623  _In_ PUSHORT Register);
2624 
2626 BOOLEAN
2627 NTAPI
2629  _In_ PVOID HwDeviceExtension);
2630 
2632 BOOLEAN
2633 NTAPI
2635  _In_ PVOID HwDeviceExtension,
2637  _In_ ULONG Global,
2638  _In_ ULONG Type,
2639  _In_ PUCHAR Buffer,
2641 
2643 BOOLEAN
2644 NTAPI
2646  _In_ PVOID HwDeviceExtension,
2648  _In_ ULONG Global,
2649  _In_ ULONG Type,
2650  _In_ PUCHAR Buffer,
2652 
2654 BOOLEAN
2655 NTAPI
2657  _In_ PVOID HwDeviceExtension);
2658 
2660 BOOLEAN
2661 NTAPI
2663  _In_ PVOID HwDeviceExtension,
2664  _In_ UCHAR PathId,
2666  _In_ UCHAR Lun);
2667 
2669 ULONG
2670 NTAPI
2672  _In_ PVOID DeviceExtension,
2673  _In_ ULONG BusDataType,
2674  _In_ ULONG SystemIoBusNumber,
2677  _In_ ULONG Offset,
2678  _In_ ULONG Length);
2679 
2681 BOOLEAN
2682 NTAPI
2684  _In_ PVOID HwDeviceExtension,
2685  _In_ UCHAR PathId,
2687  _In_ UCHAR Lun,
2688  _In_ ULONG Depth);
2689 
2691 VOID
2692 NTAPI
2694  _In_ ULONG Delay);
2695 
2697 VOID
2698 NTAPI
2700  _In_ PVOID HwDeviceExtension,
2701  _In_ PSTOR_SYNCHRONIZED_ACCESS SynchronizedAccessRoutine,
2703 
2705 BOOLEAN
2706 NTAPI
2708  _In_ PVOID HwDeviceExtension,
2710  _In_ ULONG SystemIoBusNumber,
2711  _In_ STOR_PHYSICAL_ADDRESS IoAddress,
2713  _In_ BOOLEAN InIoSpace);
2714 
2716 VOID
2717 NTAPI
2719  _In_ PVOID HwDeviceExtension,
2720  _In_ PUCHAR Port,
2721  _In_ PUCHAR Buffer,
2722  _In_ ULONG Count);
2723 
2725 VOID
2726 NTAPI
2728  _In_ PVOID HwDeviceExtension,
2729  _In_ PULONG Port,
2730  _In_ PULONG Buffer,
2731  _In_ ULONG Count);
2732 
2734 VOID
2735 NTAPI
2737  _In_ PVOID HwDeviceExtension,
2738  _In_ PUSHORT Port,
2740  _In_ ULONG Count);
2741 
2743 VOID
2744 NTAPI
2746  _In_ PVOID HwDeviceExtension,
2747  _In_ PUCHAR Port,
2748  _In_ UCHAR Value);
2749 
2751 VOID
2752 NTAPI
2754  _In_ PVOID HwDeviceExtension,
2755  _In_ PULONG Port,
2756  _In_ ULONG Value);
2757 
2759 VOID
2760 NTAPI
2762  _In_ PVOID HwDeviceExtension,
2763  _In_ PUSHORT Port,
2764  _In_ USHORT Value);
2765 
2767 VOID
2768 NTAPI
2770  _In_ PVOID HwDeviceExtension,
2771  _In_ PUCHAR Register,
2772  _In_ PUCHAR Buffer,
2773  _In_ ULONG Count);
2774 
2776 VOID
2777 NTAPI
2779  _In_ PVOID HwDeviceExtension,
2780  _In_ PULONG Register,
2781  _In_ PULONG Buffer,
2782  _In_ ULONG Count);
2783 
2785 VOID
2786 NTAPI
2788  _In_ PVOID HwDeviceExtension,
2789  _In_ PUSHORT Register,
2791  _In_ ULONG Count);
2792 
2794 VOID
2795 NTAPI
2797  _In_ PVOID HwDeviceExtension,
2798  _In_ PUCHAR Register,
2799  _In_ UCHAR Value);
2800 
2802 VOID
2803 NTAPI
2805  _In_ PVOID HwDeviceExtension,
2806  _In_ PULONG Register,
2807  _In_ ULONG Value);
2808 
2810 VOID
2811 NTAPI
2813  _In_ PVOID HwDeviceExtension,
2814  _In_ PUSHORT Register,
2815  _In_ USHORT Value);
2816 
2817 
2819 BOOLEAN
2821  _In_ PVOID DeviceExtension,
2822  _In_ PHW_PASSIVE_INITIALIZE_ROUTINE HwPassiveInitializeRoutine)
2823 {
2824  LONG Succ;
2825  Succ = FALSE;
2827  DeviceExtension,
2828  HwPassiveInitializeRoutine,
2829  &Succ);
2830  return (BOOLEAN)Succ;
2831 }
2832 
2834 VOID
2836  _In_ PVOID DeviceExtension,
2838  _In_ PHW_DPC_ROUTINE HwDpcRoutine)
2839 {
2841  DeviceExtension,
2842  Dpc,
2843  HwDpcRoutine);
2844 }
2845 
2847 BOOLEAN
2849  _In_ PVOID DeviceExtension,
2850  _In_ PSTOR_DPC Dpc,
2853 {
2854  LONG Succ;
2855  Succ = FALSE;
2857  DeviceExtension,
2858  Dpc,
2861  &Succ);
2862  return (BOOLEAN)Succ;
2863 }
2864 
2866 VOID
2868  _In_ PVOID DeviceExtension,
2870  _In_ PVOID LockContext,
2872 {
2874  DeviceExtension,
2875  SpinLock,
2876  LockContext,
2877  LockHandle);
2878 }
2879 
2881 VOID
2883  _In_ PVOID DeviceExtension,
2885 {
2887  DeviceExtension,
2888  LockHandle);
2889 }
2890 
2892 ULONG
2894  _In_ STORPORT_FUNCTION_CODE FunctionCode,
2895  _In_ PVOID HwDeviceExtension,
2896  ...);
2897 
2899 ULONG
2901  _In_ PVOID HwDeviceExtension,
2903  _In_ ULONG Tag,
2904  _Out_ PVOID *BufferPointer
2905  )
2906 {
2908  HwDeviceExtension,
2909  NumberOfBytes,
2910  Tag,
2911  BufferPointer);
2912 }
2913 
2915 ULONG
2917  _In_ PVOID HwDeviceExtension,
2918  _In_ PVOID BufferPointer)
2919 {
2921  HwDeviceExtension,
2922  BufferPointer);
2923 }
2924 
2926 ULONG
2928  _In_ PVOID HwDeviceExtension,
2929  _In_ PVOID BufferPointer,
2931  _Out_ PVOID *Mdl)
2932 {
2934  HwDeviceExtension,
2935  BufferPointer,
2936  NumberOfBytes,
2937  Mdl);
2938 }
2939 
2941 ULONG
2943  _In_ PVOID HwDeviceExtension,
2944  _In_ PVOID Mdl)
2945 {
2947  HwDeviceExtension,
2948  Mdl);
2949 }
2950 
2952 ULONG
2954  _In_ PVOID HwDeviceExtension,
2955  _Inout_ PVOID Mdl)
2956 {
2958  HwDeviceExtension,
2959  Mdl);
2960 }
2961 
2963 ULONG
2965  _In_ PVOID HwDeviceExtension,
2967  _Out_ PVOID *SystemAddress)
2968 {
2970  HwDeviceExtension,
2971  Srb,
2972  SystemAddress);
2973 }
2974 
2976 ULONG
2978  _In_ PVOID HwDeviceExtension,
2980  _Out_ PVOID *Mdl)
2981 {
2983  HwDeviceExtension,
2984  Srb,
2985  Mdl);
2986 }
2987 
2989 ULONG
2991  _In_ PVOID HwDeviceExtension,
2992  _In_ PVOID Irp)
2993 {
2995  HwDeviceExtension,
2996  Irp);
2997 }
2998 
3000 ULONG
3002  _In_ PVOID HwDeviceExtension,
3003  _Out_ PVOID *AdapterDeviceObject,
3006 {
3008  HwDeviceExtension,
3009  AdapterDeviceObject,
3012 }
3013 
3015 ULONG
3017  _In_ PVOID HwDeviceExtension,
3018  _In_ PVOID Mdl,
3019  _In_ PVOID CurrentVa,
3020  _In_ ULONG Length,
3022  _In_ PVOID Context,
3023  _In_ BOOLEAN WriteToDevice,
3024  _Inout_ PVOID ScatterGatherBuffer,
3025  _In_ ULONG ScatterGatherBufferLength)
3026 {
3028  HwDeviceExtension,
3029  Mdl,
3030  CurrentVa,
3031  Length,
3033  Context,
3034  WriteToDevice,
3035  ScatterGatherBuffer,
3036  ScatterGatherBufferLength);
3037 }
3038 
3040 ULONG
3042  _In_ PVOID HwDeviceExtension,
3043  _In_ PSTOR_SCATTER_GATHER_LIST ScatterGatherList,
3044  _In_ BOOLEAN WriteToDevice)
3045 {
3047  HwDeviceExtension,
3048  ScatterGatherList,
3049  WriteToDevice);
3050 }
3051 
3053 ULONG
3055  _In_ PVOID HwDeviceExtension,
3056  _In_ ULONG MessageId,
3058 {
3060  HwDeviceExtension,
3061  MessageId,
3062  OldIrql);
3063 }
3064 
3066 ULONG
3068  _In_ PVOID HwDeviceExtension,
3069  _In_ ULONG MessageId,
3070  _In_ ULONG OldIrql)
3071 {
3073  HwDeviceExtension,
3074  MessageId,
3075  OldIrql);
3076 }
3077 
3079 ULONG
3081  _In_ PVOID HwDeviceExtension,
3082  _In_ ULONG MessageId,
3083  _Out_ PMESSAGE_INTERRUPT_INFORMATION InterruptInfo)
3084 {
3086  HwDeviceExtension,
3087  MessageId,
3088  InterruptInfo);
3089 }
3090 
3092 ULONG
3094  _In_ PVOID HwDeviceExtension,
3095  _In_ BOOLEAN Query,
3096  _Inout_ PPERF_CONFIGURATION_DATA PerfConfigData)
3097 {
3099  HwDeviceExtension,
3100  Query,
3101  PerfConfigData);
3102 }
3103 
3105 ULONG
3107  _In_ PVOID HwDeviceExtension,
3109  _Inout_ PSTARTIO_PERFORMANCE_PARAMETERS StartIoPerfParams)
3110 {
3112  HwDeviceExtension,
3113  Srb,
3114  StartIoPerfParams);
3115 }
3116 
3118 ULONG
3120  _In_ PVOID HwDeviceExtension,
3121  _Inout_ PSTOR_LOG_EVENT_DETAILS LogDetails,
3123 {
3125  HwDeviceExtension,
3126  LogDetails,
3127  MaximumSize);
3128 }
3129 
3130 #if DBG
3131 #define DebugPrint(x) StorPortDebugPrint x
3132 #else
3133 #define DebugPrint(x)
3134 #endif
3135 
3136 #ifdef __cplusplus
3137 }
3138 #endif
3139 
3140 #endif /* _NTSTORPORT_ */
UCHAR AllocationLength
Definition: scsi.h:775
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:591
enum _GETSGSTATUS * PGETSGSTATUS
UCHAR Reserved2
Definition: cdrw_hw.h:1126
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2327
ULONG_PTR Lock
Definition: storport.h:2042
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
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:2214
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:1128
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:772
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
PGROUP_AFFINITY MessageTargets
Definition: storport.h:2086
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:879
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:1940
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:2164
STORPORT_API BOOLEAN NTAPI StorPortReady(_In_ PVOID HwDeviceExtension)
Definition: storport.c:1268
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:2942
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:2252
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:2207
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:656
FORCEINLINE ULONG StorPortLogSystemEvent(_In_ PVOID HwDeviceExtension, _Inout_ PSTOR_LOG_EVENT_DETAILS LogDetails, _Inout_ PULONG MaximumSize)
Definition: storport.h:3119
VOID(NTAPI * PStorPortFreePool)(_In_ PVOID PMemory, _In_ PVOID HwDeviceExtension, _In_opt_ PVOID PMdl)
Definition: storport.h:2227
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:1397
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:503
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:2019
PStorPortPutScatterGatherList PutScatterGatherList
Definition: storport.h:2249
_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:3054
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:2141
struct _CDB::_SPACE_TAPE_MARKS::@2095::@2096 Fields
UCHAR OperationCode
Definition: scsi.h:740
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:1936
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:1356
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:2035
_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:3067
UCHAR Reserved2[7]
Definition: scsi.h:1019
enum _STOR_PNP_ACTION STOR_PNP_ACTION
PStorPortBuildScatterGatherList BuildScatterGatherList
Definition: storport.h:2250
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:2867
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:565
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:2010
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:2188
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:2964
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:2120
struct _CDB::_PLAY_CD::@2094::_MSF MSF
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
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:1947
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:2835
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:790
PVOID(NTAPI * PStorPortGetSystemAddress)(_In_ PSCSI_REQUEST_BLOCK Srb)
Definition: storport.h:2242
UCHAR Reserved1
Definition: cdrw_hw.h:114
UCHAR RelativeAddress
Definition: cdrw_hw.h:113
struct _INQUIRYDATA INQUIRYDATA
_STOR_DMA_WIDTH
Definition: storport.h:413
STORPORT_API BOOLEAN NTAPI StorPortPause(_In_ PVOID HwDeviceExtension, _In_ ULONG TimeOut)
Definition: storport.c:1214
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:1948
UCHAR Lun[0][8]
Definition: scsi.h:2595
UCHAR DisablePageOut
Definition: scsi.h:829
#define _In_opt_
Definition: no_sal2.h:213
STORPORT_API VOID NTAPI StorPortStallExecution(_In_ ULONG Delay)
Definition: storport.c:1416
UCHAR Type
Definition: scsi.h:1011
PVOID(NTAPI * PStorPortAllocatePool)(_In_ ULONG NumberOfBytes, _In_ ULONG Tag, _In_ PVOID HwDeviceExtension, _Out_ PVOID *PMdl)
Definition: storport.h:2234
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:2005
UCHAR LogicalUnitNumber
Definition: scsi.h:1342
UCHAR Reserved2[4]
Definition: scsi.h:1185
UCHAR TrackNumber
Definition: cdrw_hw.h:211
STORPORT_API VOID NTAPI StorPortFreeDeviceBase(_In_ PVOID HwDeviceExtension, _In_ PVOID MappedAddress)
Definition: storport.c:626
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:3080
BOOLEAN(NTAPI * PHW_INTERRUPT)(_In_ PVOID DeviceExtension)
Definition: storport.h:2126
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:1429
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:2109
UCHAR Reserved1
Definition: scsi.h:897
STORPORT_API VOID NTAPI StorPortFreeRegistryBuffer(_In_ PVOID HwDeviceExtension, _In_ PUCHAR Buffer)
Definition: storport.c:641
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:845
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
UCHAR OperationCode
Definition: cdrw_hw.h:431
union _CDB * PCDB
UCHAR OperationCode
Definition: scsi.h:1600
UCHAR Reserved2
Definition: scsi.h:1607
UCHAR DestinationElementAddress[2]
Definition: scsi.h:1333
UCHAR NormACA
Definition: minitape.h:92
UCHAR Reserved2
Definition: cdrw_hw.h:119
BOOLEAN NeedPhysicalAddresses
Definition: srb.h:573
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
STORPORT_API VOID NTAPI StorPortReadRegisterBufferUlong(_In_ PVOID HwDeviceExtension, _In_ PULONG Register, _In_ PULONG Buffer, _In_ ULONG Count)
Definition: stubs.c:106
struct _CDB::_LOGSELECT * PLOGSELECT
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
_STOR_SYNCHRONIZATION_MODEL
Definition: storport.h:407
UCHAR ForceUnitAccess
Definition: scsi.h:1576
UCHAR RelativeAddress
Definition: scsi.h:1039