ReactOS 0.4.15-dev-7660-g0086d05
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#ifdef _NTSCSI_
24 #error STORPORT.H must be included instead of SCSI.H
25#endif
26
27#ifdef _NTSRB_
28 #error STORPORT.H must be included instead of SRB.H
29#endif
30
31#ifndef _NTSTORPORT_
32#define _NTSTORPORT_
33
34#ifdef __cplusplus
35extern "C" {
36#endif
37
38//
39// Common definitions with SRB.H
40//
41
42/* NOTE: the current SCSI_MAXIMUM_TARGETS_PER_BUS is applicable
43 * only on scsiport miniports. For storport miniports, the max
44 * target supported is 255. */
45#if (NTDDI_VERSION >= NTDDI_WIN8)
46#define SCSI_MAXIMUM_BUSES_PER_ADAPTER 255
47#endif
48#define SCSI_MAXIMUM_TARGETS_PER_BUS 128
49#define SCSI_MAXIMUM_LUNS_PER_TARGET 255
50#define SCSI_MINIMUM_PHYSICAL_BREAKS 16
51#define SCSI_MAXIMUM_PHYSICAL_BREAKS 255
52
53/* These constants are for backward compatibility.
54 * They used to be the maximum supported. */
55#define SCSI_MAXIMUM_BUSES 8
56#define SCSI_MAXIMUM_TARGETS 8
57#define SCSI_MAXIMUM_LOGICAL_UNITS 8
58
59/* PORT_CONFIGURATION_INFORMATION.Dma64BitAddresses constants */
60#define SCSI_DMA64_MINIPORT_SUPPORTED 0x01
61#define SCSI_DMA64_SYSTEM_SUPPORTED 0x80
62#if (NTDDI_VERSION > NTDDI_WS03SP1)
63#define SCSI_DMA64_MINIPORT_FULL64BIT_SUPPORTED 0x02
64#endif
65
66#define SP_UNINITIALIZED_VALUE ((ULONG) ~0)
67#define SP_UNTAGGED ((UCHAR) ~0)
68
69// End of common definitions with SRB.H
70
71
72#if defined(_STORPORT_)
73#define STORPORT_API
74#else
75#define STORPORT_API DECLSPEC_IMPORT
76#endif
77
78#define DIRECT_ACCESS_DEVICE 0x00
79#define SEQUENTIAL_ACCESS_DEVICE 0x01
80#define PRINTER_DEVICE 0x02
81#define PROCESSOR_DEVICE 0x03
82#define WRITE_ONCE_READ_MULTIPLE_DEVICE 0x04
83#define READ_ONLY_DIRECT_ACCESS_DEVICE 0x05
84#define SCANNER_DEVICE 0x06
85#define OPTICAL_DEVICE 0x07
86#define MEDIUM_CHANGER 0x08
87#define COMMUNICATION_DEVICE 0x09
88#define ARRAY_CONTROLLER_DEVICE 0x0C
89#define SCSI_ENCLOSURE_DEVICE 0x0D
90#define REDUCED_BLOCK_DEVICE 0x0E
91#define OPTICAL_CARD_READER_WRITER_DEVICE 0x0F
92#define BRIDGE_CONTROLLER_DEVICE 0x10
93#define OBJECT_BASED_STORAGE_DEVICE 0x11
94#define LOGICAL_UNIT_NOT_PRESENT_DEVICE 0x7F
95
96#define DEVICE_CONNECTED 0x00
97
98#define CDB6GENERIC_LENGTH 6
99#define CDB10GENERIC_LENGTH 10
100#define CDB12GENERIC_LENGTH 12
101
102#define INQUIRYDATABUFFERSIZE 36
103#define SENSE_BUFFER_SIZE 18
104#define MAX_SENSE_BUFFER_SIZE 255
105
106#define FILE_DEVICE_SCSI 0x0000001b
107#define IOCTL_SCSI_EXECUTE_IN ((FILE_DEVICE_SCSI << 16) + 0x0011)
108#define IOCTL_SCSI_EXECUTE_OUT ((FILE_DEVICE_SCSI << 16) + 0x0012)
109#define IOCTL_SCSI_EXECUTE_NONE ((FILE_DEVICE_SCSI << 16) + 0x0013)
110
111#define MODE_PAGE_VENDOR_SPECIFIC 0x00
112#define MODE_PAGE_ERROR_RECOVERY 0x01
113#define MODE_PAGE_DISCONNECT 0x02
114#define MODE_PAGE_FORMAT_DEVICE 0x03
115#define MODE_PAGE_MRW 0x03
116#define MODE_PAGE_RIGID_GEOMETRY 0x04
117#define MODE_PAGE_FLEXIBILE 0x05
118#define MODE_PAGE_WRITE_PARAMETERS 0x05
119#define MODE_PAGE_VERIFY_ERROR 0x07
120#define MODE_PAGE_CACHING 0x08
121#define MODE_PAGE_PERIPHERAL 0x09
122#define MODE_PAGE_CONTROL 0x0A
123#define MODE_PAGE_MEDIUM_TYPES 0x0B
124#define MODE_PAGE_NOTCH_PARTITION 0x0C
125#define MODE_PAGE_CD_AUDIO_CONTROL 0x0E
126#define MODE_PAGE_DATA_COMPRESS 0x0F
127#define MODE_PAGE_DEVICE_CONFIG 0x10
128#define MODE_PAGE_XOR_CONTROL 0x10
129#define MODE_PAGE_MEDIUM_PARTITION 0x11
130#define MODE_PAGE_ENCLOSURE_SERVICES_MANAGEMENT 0x14
131#define MODE_PAGE_EXTENDED 0x15
132#define MODE_PAGE_EXTENDED_DEVICE_SPECIFIC 0x16
133#define MODE_PAGE_CDVD_FEATURE_SET 0x18
134#define MODE_PAGE_PROTOCOL_SPECIFIC_LUN 0x18
135#define MODE_PAGE_PROTOCOL_SPECIFIC_PORT 0x19
136#define MODE_PAGE_POWER_CONDITION 0x1A
137#define MODE_PAGE_LUN_MAPPING 0x1B
138#define MODE_PAGE_FAULT_REPORTING 0x1C
139#define MODE_PAGE_CDVD_INACTIVITY 0x1D
140#define MODE_PAGE_ELEMENT_ADDRESS 0x1D
141#define MODE_PAGE_TRANSPORT_GEOMETRY 0x1E
142#define MODE_PAGE_DEVICE_CAPABILITIES 0x1F
143#define MODE_PAGE_CAPABILITIES 0x2A
144#define MODE_SENSE_RETURN_ALL 0x3F
145
146#define MODE_SENSE_CURRENT_VALUES 0x00
147#define MODE_SENSE_CHANGEABLE_VALUES 0x40
148#define MODE_SENSE_DEFAULT_VAULES 0x80
149#define MODE_SENSE_SAVED_VALUES 0xc0
150
151#define SCSIOP_TEST_UNIT_READY 0x00
152#define SCSIOP_REZERO_UNIT 0x01
153#define SCSIOP_REWIND 0x01
154#define SCSIOP_REQUEST_BLOCK_ADDR 0x02
155#define SCSIOP_REQUEST_SENSE 0x03
156#define SCSIOP_FORMAT_UNIT 0x04
157#define SCSIOP_READ_BLOCK_LIMITS 0x05
158#define SCSIOP_REASSIGN_BLOCKS 0x07
159#define SCSIOP_INIT_ELEMENT_STATUS 0x07
160#define SCSIOP_READ6 0x08
161#define SCSIOP_RECEIVE 0x08
162#define SCSIOP_WRITE6 0x0A
163#define SCSIOP_PRINT 0x0A
164#define SCSIOP_SEND 0x0A
165#define SCSIOP_SEEK6 0x0B
166#define SCSIOP_TRACK_SELECT 0x0B
167#define SCSIOP_SLEW_PRINT 0x0B
168#define SCSIOP_SET_CAPACITY 0x0B
169#define SCSIOP_SEEK_BLOCK 0x0C
170#define SCSIOP_PARTITION 0x0D
171#define SCSIOP_READ_REVERSE 0x0F
172#define SCSIOP_WRITE_FILEMARKS 0x10
173#define SCSIOP_FLUSH_BUFFER 0x10
174#define SCSIOP_SPACE 0x11
175#define SCSIOP_INQUIRY 0x12
176#define SCSIOP_VERIFY6 0x13
177#define SCSIOP_RECOVER_BUF_DATA 0x14
178#define SCSIOP_MODE_SELECT 0x15
179#define SCSIOP_RESERVE_UNIT 0x16
180#define SCSIOP_RELEASE_UNIT 0x17
181#define SCSIOP_COPY 0x18
182#define SCSIOP_ERASE 0x19
183#define SCSIOP_MODE_SENSE 0x1A
184#define SCSIOP_START_STOP_UNIT 0x1B
185#define SCSIOP_STOP_PRINT 0x1B
186#define SCSIOP_LOAD_UNLOAD 0x1B
187#define SCSIOP_RECEIVE_DIAGNOSTIC 0x1C
188#define SCSIOP_SEND_DIAGNOSTIC 0x1D
189#define SCSIOP_MEDIUM_REMOVAL 0x1E
190#define SCSIOP_READ_FORMATTED_CAPACITY 0x23
191#define SCSIOP_READ_CAPACITY 0x25
192#define SCSIOP_READ 0x28
193#define SCSIOP_WRITE 0x2A
194#define SCSIOP_SEEK 0x2B
195#define SCSIOP_LOCATE 0x2B
196#define SCSIOP_POSITION_TO_ELEMENT 0x2B
197#define SCSIOP_WRITE_VERIFY 0x2E
198#define SCSIOP_VERIFY 0x2F
199#define SCSIOP_SEARCH_DATA_HIGH 0x30
200#define SCSIOP_SEARCH_DATA_EQUAL 0x31
201#define SCSIOP_SEARCH_DATA_LOW 0x32
202#define SCSIOP_SET_LIMITS 0x33
203#define SCSIOP_READ_POSITION 0x34
204#define SCSIOP_SYNCHRONIZE_CACHE 0x35
205#define SCSIOP_COMPARE 0x39
206#define SCSIOP_COPY_COMPARE 0x3A
207#define SCSIOP_WRITE_DATA_BUFF 0x3B
208#define SCSIOP_READ_DATA_BUFF 0x3C
209#define SCSIOP_WRITE_LONG 0x3F
210#define SCSIOP_CHANGE_DEFINITION 0x40
211#define SCSIOP_WRITE_SAME 0x41
212#define SCSIOP_READ_SUB_CHANNEL 0x42
213#define SCSIOP_READ_TOC 0x43
214#define SCSIOP_READ_HEADER 0x44
215#define SCSIOP_REPORT_DENSITY_SUPPORT 0x44
216#define SCSIOP_PLAY_AUDIO 0x45
217#define SCSIOP_GET_CONFIGURATION 0x46
218#define SCSIOP_PLAY_AUDIO_MSF 0x47
219#define SCSIOP_PLAY_TRACK_INDEX 0x48
220#define SCSIOP_PLAY_TRACK_RELATIVE 0x49
221#define SCSIOP_GET_EVENT_STATUS 0x4A
222#define SCSIOP_PAUSE_RESUME 0x4B
223#define SCSIOP_LOG_SELECT 0x4C
224#define SCSIOP_LOG_SENSE 0x4D
225#define SCSIOP_STOP_PLAY_SCAN 0x4E
226#define SCSIOP_XDWRITE 0x50
227#define SCSIOP_XPWRITE 0x51
228#define SCSIOP_READ_DISK_INFORMATION 0x51
229#define SCSIOP_READ_DISC_INFORMATION 0x51
230#define SCSIOP_READ_TRACK_INFORMATION 0x52
231#define SCSIOP_XDWRITE_READ 0x53
232#define SCSIOP_RESERVE_TRACK_RZONE 0x53
233#define SCSIOP_SEND_OPC_INFORMATION 0x54
234#define SCSIOP_MODE_SELECT10 0x55
235#define SCSIOP_RESERVE_UNIT10 0x56
236#define SCSIOP_RESERVE_ELEMENT 0x56
237#define SCSIOP_RELEASE_UNIT10 0x57
238#define SCSIOP_RELEASE_ELEMENT 0x57
239#define SCSIOP_REPAIR_TRACK 0x58
240#define SCSIOP_MODE_SENSE10 0x5A
241#define SCSIOP_CLOSE_TRACK_SESSION 0x5B
242#define SCSIOP_READ_BUFFER_CAPACITY 0x5C
243#define SCSIOP_SEND_CUE_SHEET 0x5D
244#define SCSIOP_PERSISTENT_RESERVE_IN 0x5E
245#define SCSIOP_PERSISTENT_RESERVE_OUT 0x5F
246#define SCSIOP_XDWRITE_EXTENDED16 0x80
247#define SCSIOP_WRITE_FILEMARKS16 0x80
248#define SCSIOP_REBUILD16 0x81
249#define SCSIOP_READ_REVERSE16 0x81
250#define SCSIOP_REGENERATE16 0x82
251#define SCSIOP_EXTENDED_COPY 0x83
252#define SCSIOP_RECEIVE_COPY_RESULTS 0x84
253#define SCSIOP_ATA_PASSTHROUGH16 0x85
254#define SCSIOP_ACCESS_CONTROL_IN 0x86
255#define SCSIOP_ACCESS_CONTROL_OUT 0x87
256#define SCSIOP_READ16 0x88
257#define SCSIOP_WRITE16 0x8A
258#define SCSIOP_READ_ATTRIBUTES 0x8C
259#define SCSIOP_WRITE_ATTRIBUTES 0x8D
260#define SCSIOP_WRITE_VERIFY16 0x8E
261#define SCSIOP_VERIFY16 0x8F
262#define SCSIOP_PREFETCH16 0x90
263#define SCSIOP_SYNCHRONIZE_CACHE16 0x91
264#define SCSIOP_SPACE16 0x91
265#define SCSIOP_LOCK_UNLOCK_CACHE16 0x92
266#define SCSIOP_LOCATE16 0x92
267#define SCSIOP_WRITE_SAME16 0x93
268#define SCSIOP_ERASE16 0x93
269#define SCSIOP_READ_CAPACITY16 0x9E
270#define SCSIOP_SERVICE_ACTION_IN16 0x9E
271#define SCSIOP_SERVICE_ACTION_OUT16 0x9F
272#define SCSIOP_REPORT_LUNS 0xA0
273#define SCSIOP_BLANK 0xA1
274#define SCSIOP_ATA_PASSTHROUGH12 0xA1
275#define SCSIOP_SEND_EVENT 0xA2
276#define SCSIOP_SEND_KEY 0xA3
277#define SCSIOP_MAINTENANCE_IN 0xA3
278#define SCSIOP_REPORT_KEY 0xA4
279#define SCSIOP_MAINTENANCE_OUT 0xA4
280#define SCSIOP_MOVE_MEDIUM 0xA5
281#define SCSIOP_LOAD_UNLOAD_SLOT 0xA6
282#define SCSIOP_EXCHANGE_MEDIUM 0xA6
283#define SCSIOP_SET_READ_AHEAD 0xA7
284#define SCSIOP_MOVE_MEDIUM_ATTACHED 0xA7
285#define SCSIOP_READ12 0xA8
286#define SCSIOP_GET_MESSAGE 0xA8
287#define SCSIOP_SERVICE_ACTION_OUT12 0xA9
288#define SCSIOP_WRITE12 0xAA
289#define SCSIOP_SEND_MESSAGE 0xAB
290#define SCSIOP_SERVICE_ACTION_IN12 0xAB
291#define SCSIOP_GET_PERFORMANCE 0xAC
292#define SCSIOP_READ_DVD_STRUCTURE 0xAD
293#define SCSIOP_WRITE_VERIFY12 0xAE
294#define SCSIOP_VERIFY12 0xAF
295#define SCSIOP_SEARCH_DATA_HIGH12 0xB0
296#define SCSIOP_SEARCH_DATA_EQUAL12 0xB1
297#define SCSIOP_SEARCH_DATA_LOW12 0xB2
298#define SCSIOP_SET_LIMITS12 0xB3
299#define SCSIOP_READ_ELEMENT_STATUS_ATTACHED 0xB4
300#define SCSIOP_REQUEST_VOL_ELEMENT 0xB5
301#define SCSIOP_SEND_VOLUME_TAG 0xB6
302#define SCSIOP_SET_STREAMING 0xB6
303#define SCSIOP_READ_DEFECT_DATA 0xB7
304#define SCSIOP_READ_ELEMENT_STATUS 0xB8
305#define SCSIOP_READ_CD_MSF 0xB9
306#define SCSIOP_SCAN_CD 0xBA
307#define SCSIOP_REDUNDANCY_GROUP_IN 0xBA
308#define SCSIOP_SET_CD_SPEED 0xBB
309#define SCSIOP_REDUNDANCY_GROUP_OUT 0xBB
310#define SCSIOP_PLAY_CD 0xBC
311#define SCSIOP_SPARE_IN 0xBC
312#define SCSIOP_MECHANISM_STATUS 0xBD
313#define SCSIOP_SPARE_OUT 0xBD
314#define SCSIOP_READ_CD 0xBE
315#define SCSIOP_VOLUME_SET_IN 0xBE
316#define SCSIOP_SEND_DVD_STRUCTURE 0xBF
317#define SCSIOP_VOLUME_SET_OUT 0xBF
318#define SCSIOP_INIT_ELEMENT_RANGE 0xE7
319
320#define SCSISTAT_GOOD 0x00
321#define SCSISTAT_CHECK_CONDITION 0x02
322#define SCSISTAT_CONDITION_MET 0x04
323#define SCSISTAT_BUSY 0x08
324#define SCSISTAT_INTERMEDIATE 0x10
325#define SCSISTAT_INTERMEDIATE_COND_MET 0x14
326#define SCSISTAT_RESERVATION_CONFLICT 0x18
327#define SCSISTAT_COMMAND_TERMINATED 0x22
328#define SCSISTAT_QUEUE_FULL 0x28
329
330#define SETBITON 1
331#define SETBITOFF 0
332
333#define SP_RETURN_NOT_FOUND 0
334#define SP_RETURN_FOUND 1
335#define SP_RETURN_ERROR 2
336#define SP_RETURN_BAD_CONFIG 3
337
338/* SCSI_REQUEST_BLOCK.Function constants */
339#define SRB_FUNCTION_EXECUTE_SCSI 0x00
340#define SRB_FUNCTION_CLAIM_DEVICE 0x01
341#define SRB_FUNCTION_IO_CONTROL 0x02
342#define SRB_FUNCTION_RECEIVE_EVENT 0x03
343#define SRB_FUNCTION_RELEASE_QUEUE 0x04
344#define SRB_FUNCTION_ATTACH_DEVICE 0x05
345#define SRB_FUNCTION_RELEASE_DEVICE 0x06
346#define SRB_FUNCTION_SHUTDOWN 0x07
347#define SRB_FUNCTION_FLUSH 0x08
348#define SRB_FUNCTION_ABORT_COMMAND 0x10
349#define SRB_FUNCTION_RELEASE_RECOVERY 0x11
350#define SRB_FUNCTION_RESET_BUS 0x12
351#define SRB_FUNCTION_RESET_DEVICE 0x13
352#define SRB_FUNCTION_TERMINATE_IO 0x14
353#define SRB_FUNCTION_FLUSH_QUEUE 0x15
354#define SRB_FUNCTION_REMOVE_DEVICE 0x16
355#define SRB_FUNCTION_WMI 0x17
356#define SRB_FUNCTION_LOCK_QUEUE 0x18
357#define SRB_FUNCTION_UNLOCK_QUEUE 0x19
358#define SRB_FUNCTION_RESET_LOGICAL_UNIT 0x20
359#define SRB_FUNCTION_SET_LINK_TIMEOUT 0x21
360#define SRB_FUNCTION_LINK_TIMEOUT_OCCURRED 0x22
361#define SRB_FUNCTION_LINK_TIMEOUT_COMPLETE 0x23
362#define SRB_FUNCTION_POWER 0x24
363#define SRB_FUNCTION_PNP 0x25
364#define SRB_FUNCTION_DUMP_POINTERS 0x26
365
366/* SCSI_REQUEST_BLOCK.SrbStatus constants */
367#define SRB_STATUS_PENDING 0x00
368#define SRB_STATUS_SUCCESS 0x01
369#define SRB_STATUS_ABORTED 0x02
370#define SRB_STATUS_ABORT_FAILED 0x03
371#define SRB_STATUS_ERROR 0x04
372#define SRB_STATUS_BUSY 0x05
373#define SRB_STATUS_INVALID_REQUEST 0x06
374#define SRB_STATUS_INVALID_PATH_ID 0x07
375#define SRB_STATUS_NO_DEVICE 0x08
376#define SRB_STATUS_TIMEOUT 0x09
377#define SRB_STATUS_SELECTION_TIMEOUT 0x0A
378#define SRB_STATUS_COMMAND_TIMEOUT 0x0B
379#define SRB_STATUS_MESSAGE_REJECTED 0x0D
380#define SRB_STATUS_BUS_RESET 0x0E
381#define SRB_STATUS_PARITY_ERROR 0x0F
382#define SRB_STATUS_REQUEST_SENSE_FAILED 0x10
383#define SRB_STATUS_NO_HBA 0x11
384#define SRB_STATUS_DATA_OVERRUN 0x12
385#define SRB_STATUS_UNEXPECTED_BUS_FREE 0x13
386#define SRB_STATUS_PHASE_SEQUENCE_FAILURE 0x14
387#define SRB_STATUS_BAD_SRB_BLOCK_LENGTH 0x15
388#define SRB_STATUS_REQUEST_FLUSHED 0x16
389#define SRB_STATUS_INVALID_LUN 0x20
390#define SRB_STATUS_INVALID_TARGET_ID 0x21
391#define SRB_STATUS_BAD_FUNCTION 0x22
392#define SRB_STATUS_ERROR_RECOVERY 0x23
393#define SRB_STATUS_NOT_POWERED 0x24
394#define SRB_STATUS_LINK_DOWN 0x25
395#define SRB_STATUS_INTERNAL_ERROR 0x30
396#define SRB_STATUS_QUEUE_FROZEN 0x40
397#define SRB_STATUS_AUTOSENSE_VALID 0x80
398#define SRB_STATUS(Status) (Status & ~(SRB_STATUS_AUTOSENSE_VALID | SRB_STATUS_QUEUE_FROZEN))
399
400/* SCSI_REQUEST_BLOCK.SrbFlags constants */
401#define SRB_FLAGS_QUEUE_ACTION_ENABLE 0x00000002
402#define SRB_FLAGS_DISABLE_DISCONNECT 0x00000004
403#define SRB_FLAGS_DISABLE_SYNCH_TRANSFER 0x00000008
404
405#define SRB_FLAGS_BYPASS_FROZEN_QUEUE 0x00000010
406#define SRB_FLAGS_DISABLE_AUTOSENSE 0x00000020
407#define SRB_FLAGS_DATA_IN 0x00000040
408#define SRB_FLAGS_DATA_OUT 0x00000080
409#define SRB_FLAGS_NO_DATA_TRANSFER 0x00000000
410#define SRB_FLAGS_UNSPECIFIED_DIRECTION (SRB_FLAGS_DATA_IN | SRB_FLAGS_DATA_OUT)
411
412#define SRB_FLAGS_NO_QUEUE_FREEZE 0x00000100
413#define SRB_FLAGS_ADAPTER_CACHE_ENABLE 0x00000200
414#define SRB_FLAGS_FREE_SENSE_BUFFER 0x00000400
415
416#define SRB_FLAGS_IS_ACTIVE 0x00010000
417#define SRB_FLAGS_ALLOCATED_FROM_ZONE 0x00020000
418#define SRB_FLAGS_SGLIST_FROM_POOL 0x00040000
419#define SRB_FLAGS_BYPASS_LOCKED_QUEUE 0x00080000
420
421#define SRB_FLAGS_NO_KEEP_AWAKE 0x00100000
422#define SRB_FLAGS_PORT_DRIVER_ALLOCSENSE 0x00200000
423
424#define SRB_FLAGS_PORT_DRIVER_SENSEHASPORT 0x00400000
425#define SRB_FLAGS_DONT_START_NEXT_PACKET 0x00800000
426
427#define SRB_FLAGS_PORT_DRIVER_RESERVED 0x0F000000
428#define SRB_FLAGS_CLASS_DRIVER_RESERVED 0xF0000000
429
430#define SRB_SIMPLE_TAG_REQUEST 0x20
431#define SRB_HEAD_OF_QUEUE_TAG_REQUEST 0x21
432#define SRB_ORDERED_QUEUE_TAG_REQUEST 0x22
433
434#define SRB_WMI_FLAGS_ADAPTER_REQUEST 0x01
435#define SRB_POWER_FLAGS_ADAPTER_REQUEST 0x01
436#define SRB_PNP_FLAGS_ADAPTER_REQUEST 0x01
437
438#define STOR_MAP_NO_BUFFERS (0)
439#define STOR_MAP_ALL_BUFFERS (1)
440#define STOR_MAP_NON_READ_WRITE_BUFFERS (2)
441
442#define VPD_SUPPORTED_PAGES 0x00
443#define VPD_SERIAL_NUMBER 0x80
444#define VPD_DEVICE_IDENTIFIERS 0x83
445#define VPD_MEDIA_SERIAL_NUMBER 0x84
446#define VPD_SOFTWARE_INTERFACE_IDENTIFIERS 0x84
447#define VPD_NETWORK_MANAGEMENT_ADDRESSES 0x85
448#define VPD_EXTENDED_INQUIRY_DATA 0x86
449#define VPD_MODE_PAGE_POLICY 0x87
450#define VPD_SCSI_PORTS 0x88
451
452#define SCSI_SENSE_NO_SENSE 0x00
453#define SCSI_SENSE_RECOVERED_ERROR 0x01
454#define SCSI_SENSE_NOT_READY 0x02
455#define SCSI_SENSE_MEDIUM_ERROR 0x03
456#define SCSI_SENSE_HARDWARE_ERROR 0x04
457#define SCSI_SENSE_ILLEGAL_REQUEST 0x05
458#define SCSI_SENSE_UNIT_ATTENTION 0x06
459#define SCSI_SENSE_DATA_PROTECT 0x07
460#define SCSI_SENSE_BLANK_CHECK 0x08
461#define SCSI_SENSE_UNIQUE 0x09
462#define SCSI_SENSE_COPY_ABORTED 0x0A
463#define SCSI_SENSE_ABORTED_COMMAND 0x0B
464#define SCSI_SENSE_EQUAL 0x0C
465#define SCSI_SENSE_VOL_OVERFLOW 0x0D
466#define SCSI_SENSE_MISCOMPARE 0x0E
467#define SCSI_SENSE_RESERVED 0x0F
468
470{
474
475typedef enum _STOR_DMA_WIDTH
476{
482
483typedef enum _STOR_SPINLOCK
484{
489
491{
500
502{
506
508{
531
533{
541
543{
553
555{
564
565typedef enum _VPD_CODE_SET
566{
572
574{
581
583{
594
596{
614#if (NTDDI_VERSION >= NTDDI_WIN7)
624#endif
626
628{
634
635typedef enum _GETSGSTATUS
636{
640
641typedef struct _SCSI_REQUEST_BLOCK
642{
649 UCHAR Lun;
662 union
663 {
667 };
668#if defined(_WIN64)
670#endif
671 UCHAR Cdb[16];
673
674typedef struct _SCSI_WMI_REQUEST_BLOCK
675{
682 UCHAR Lun;
685 UCHAR Reserved2[2];
695#if (NTDDI_VERSION >= NTDDI_WS03SP1) && defined(_WIN64)
696 ULONG Reserved6;
697#endif
698 UCHAR Reserved5[16];
700
701typedef struct _SCSI_POWER_REQUEST_BLOCK
702{
709 UCHAR Lun;
720#if defined(_WIN64)
722#endif
723 UCHAR Reserved5[16];
725
726typedef struct _STOR_DEVICE_CAPABILITIES
727{
729 ULONG DeviceD1:1;
730 ULONG DeviceD2:1;
735 ULONG UniqueID:1;
740
741typedef struct _SCSI_PNP_REQUEST_BLOCK
742{
749 UCHAR Lun;
760#if defined(_WIN64)
762#endif
763 UCHAR Reserved4[16];
765
766#include <pshpack1.h>
767typedef union _CDB
768{
769 struct _CDB6GENERIC
770 {
776 UCHAR Link:1;
777 UCHAR Flag:1;
778 UCHAR Reserved:4;
781 struct _CDB6READWRITE
782 {
791 struct _CDB6INQUIRY
792 {
801 struct _CDB6INQUIRY3
802 {
812 struct _CDB6VERIFY
813 {
815 UCHAR Fixed:1;
818 UCHAR Reserved:2;
823 struct _CDB6FORMAT
824 {
833 struct _CDB10
834 {
849 } CDB10, *PCDB10;
850 struct _CDB12
851 {
862 } CDB12, *PCDB12;
863 struct _CDB16
864 {
874 } CDB16, *PCDB16;
875 struct _PAUSE_RESUME
876 {
880 UCHAR Reserved2[6];
884 struct _READ_TOC
885 {
888 UCHAR Msf:1;
891 UCHAR Format2:4;
893 UCHAR Reserved3[3];
896 UCHAR Control:6;
897 UCHAR Format:2;
899 struct _READ_DISK_INFORMATION
900 {
903 UCHAR Lun:3;
904 UCHAR Reserved2[5];
908 struct _READ_TRACK_INFORMATION
909 {
911 UCHAR Track:1;
914 UCHAR Lun:3;
920 struct _RESERVE_TRACK_RZONE
921 {
923 UCHAR Reserved1[4];
927 struct _SEND_OPC_INFORMATION
928 {
930 UCHAR DoOpc:1;
932 UCHAR Exclude0:1;
933 UCHAR Exclude1:1;
935 UCHAR Reserved3[4];
939 struct _REPAIR_TRACK
940 {
944 UCHAR Reserved2[2];
946 UCHAR Reserved3[3];
949 struct _CLOSE_TRACK
950 {
954 UCHAR Track:1;
955 UCHAR Session:1;
959 UCHAR Reserved4[3];
962 struct _READ_BUFFER_CAPACITY
963 {
967 UCHAR Reserved2[5];
971 struct _SEND_CUE_SHEET
972 {
974 UCHAR Reserved[5];
978 struct _READ_HEADER
979 {
982 UCHAR Msf:1;
984 UCHAR Lun:3;
990 struct _PLAY_AUDIO
991 {
997 UCHAR PlayLength[2];
1000 struct _PLAY_AUDIO_MSF
1001 {
1003 UCHAR Reserved1:5;
1009 UCHAR EndingM;
1010 UCHAR EndingS;
1011 UCHAR EndingF;
1012 UCHAR Control;
1014 struct _BLANK_MEDIA
1015 {
1017 UCHAR BlankType:3;
1018 UCHAR Reserved1:1;
1019 UCHAR Immediate:1;
1020 UCHAR Reserved2:3;
1022 UCHAR Reserved3[5];
1023 UCHAR Control;
1025 struct _PLAY_CD
1026 {
1028 UCHAR Reserved1:1;
1029 UCHAR CMSF:1;
1031 UCHAR Lun:3;
1032 _ANONYMOUS_UNION union
1033 {
1034 struct _LBA
1035 {
1036 UCHAR StartingBlockAddress[4];
1037 UCHAR PlayLength[4];
1039 struct _MSF
1040 {
1042 UCHAR StartingM;
1043 UCHAR StartingS;
1044 UCHAR StartingF;
1045 UCHAR EndingM;
1046 UCHAR EndingS;
1047 UCHAR EndingF;
1051 UCHAR Audio:1;
1052 UCHAR Composite:1;
1053 UCHAR Port1:1;
1054 UCHAR Port2:1;
1055 UCHAR Reserved2:3;
1056 UCHAR Speed:1;
1057 UCHAR Control;
1058 } PLAY_CD, *PPLAY_CD;
1059 struct _SCAN_CD
1060 {
1063 UCHAR Reserved1:3;
1064 UCHAR Direct:1;
1065 UCHAR Lun:3;
1067 UCHAR Reserved2[3];
1068 UCHAR Reserved3:6;
1069 UCHAR Type:2;
1071 UCHAR Control;
1072 } SCAN_CD, *PSCAN_CD;
1073 struct _STOP_PLAY_SCAN
1074 {
1076 UCHAR Reserved1:5;
1077 UCHAR Lun:3;
1078 UCHAR Reserved2[7];
1079 UCHAR Control;
1081 struct _SUBCHANNEL
1082 {
1084 UCHAR Reserved0:1;
1085 UCHAR Msf:1;
1086 UCHAR Reserved1:3;
1088 UCHAR Reserved2:6;
1089 UCHAR SubQ:1;
1090 UCHAR Reserved3:1;
1091 UCHAR Format;
1092 UCHAR Reserved4[2];
1095 UCHAR Control;
1097 struct _READ_CD
1098 {
1101 UCHAR Reserved0:1;
1103 UCHAR Lun:3;
1104 UCHAR StartingLBA[4];
1106 UCHAR Reserved2:1;
1107 UCHAR ErrorFlags:2;
1108 UCHAR IncludeEDC:1;
1110 UCHAR HeaderCode:2;
1113 UCHAR Reserved3:5;
1114 UCHAR Control;
1115 } READ_CD, *PREAD_CD;
1116 struct _READ_CD_MSF
1117 {
1120 UCHAR Reserved1:1;
1122 UCHAR Lun:3;
1127 UCHAR EndingM;
1128 UCHAR EndingS;
1129 UCHAR EndingF;
1131 UCHAR Reserved4:1;
1132 UCHAR ErrorFlags:2;
1133 UCHAR IncludeEDC:1;
1135 UCHAR HeaderCode:2;
1138 UCHAR Reserved5:5;
1139 UCHAR Control;
1141 struct _PLXTR_READ_CDDA
1142 {
1144 UCHAR Reserved0:5;
1154 UCHAR SubCode;
1155 UCHAR Control;
1157 struct _NEC_READ_CDDA
1158 {
1168 UCHAR Control;
1170 struct _MODE_SENSE
1171 {
1173 UCHAR Reserved1:3;
1174 UCHAR Dbd:1;
1175 UCHAR Reserved2:1;
1177 UCHAR PageCode:6;
1178 UCHAR Pc:2;
1181 UCHAR Control;
1183 struct _MODE_SENSE10
1184 {
1186 UCHAR Reserved1:3;
1187 UCHAR Dbd:1;
1188 UCHAR Reserved2:1;
1190 UCHAR PageCode:6;
1191 UCHAR Pc:2;
1192 UCHAR Reserved3[4];
1194 UCHAR Control;
1196 struct _MODE_SELECT
1197 {
1199 UCHAR SPBit:1;
1200 UCHAR Reserved1:3;
1201 UCHAR PFBit:1;
1203 UCHAR Reserved2[2];
1205 UCHAR Control;
1207 struct _MODE_SELECT10
1208 {
1210 UCHAR SPBit:1;
1211 UCHAR Reserved1:3;
1212 UCHAR PFBit:1;
1214 UCHAR Reserved2[5];
1216 UCHAR Control;
1218 struct _LOCATE
1219 {
1221 UCHAR Immediate:1;
1222 UCHAR CPBit:1;
1223 UCHAR BTBit:1;
1224 UCHAR Reserved1:2;
1230 UCHAR Control;
1231 } LOCATE, *PLOCATE;
1232 struct _LOGSENSE
1233 {
1235 UCHAR SPBit:1;
1236 UCHAR PPCBit:1;
1237 UCHAR Reserved1:3;
1239 UCHAR PageCode:6;
1240 UCHAR PCBit:2;
1245 UCHAR Control;
1246 } LOGSENSE, *PLOGSENSE;
1247 struct _LOGSELECT
1248 {
1250 UCHAR SPBit:1;
1251 UCHAR PCRBit:1;
1252 UCHAR Reserved1:3;
1254 UCHAR Reserved:6;
1255 UCHAR PCBit:2;
1256 UCHAR Reserved2[4];
1258 UCHAR Control;
1260 struct _PRINT
1261 {
1263 UCHAR Reserved:5;
1266 UCHAR Control;
1267 } PRINT, *PPRINT;
1268 struct _SEEK
1269 {
1271 UCHAR Reserved1:5;
1274 UCHAR Reserved2[3];
1275 UCHAR Control;
1276 } SEEK, *PSEEK;
1277 struct _ERASE
1278 {
1280 UCHAR Long:1;
1281 UCHAR Immediate:1;
1282 UCHAR Reserved1:3;
1284 UCHAR Reserved2[3];
1285 UCHAR Control;
1286 } ERASE, *PERASE;
1287 struct _START_STOP
1288 {
1290 UCHAR Immediate:1;
1291 UCHAR Reserved1:4;
1293 UCHAR Reserved2[2];
1294 UCHAR Start:1;
1295 UCHAR LoadEject:1;
1296 UCHAR Reserved3:6;
1297 UCHAR Control;
1299 struct _MEDIA_REMOVAL
1300 {
1302 UCHAR Reserved1:5;
1304 UCHAR Reserved2[2];
1305 UCHAR Prevent:1;
1306 UCHAR Persistant:1;
1307 UCHAR Reserved3:6;
1308 UCHAR Control;
1310 struct _SEEK_BLOCK
1311 {
1313 UCHAR Immediate:1;
1314 UCHAR Reserved1:7;
1316 UCHAR Link:1;
1317 UCHAR Flag:1;
1318 UCHAR Reserved2:4;
1321 struct _REQUEST_BLOCK_ADDRESS
1322 {
1324 UCHAR Reserved1[3];
1326 UCHAR Link:1;
1327 UCHAR Flag:1;
1328 UCHAR Reserved2:4;
1331 struct _PARTITION
1332 {
1334 UCHAR Immediate:1;
1335 UCHAR Sel:1;
1337 UCHAR Reserved1[3];
1338 UCHAR Control;
1340 struct _WRITE_TAPE_MARKS
1341 {
1343 UCHAR Immediate:1;
1345 UCHAR Reserved:3;
1348 UCHAR Control;
1350 struct _SPACE_TAPE_MARKS
1351 {
1353 UCHAR Code:3;
1354 UCHAR Reserved:2;
1359 union
1360 {
1361 UCHAR value;
1362 struct
1363 {
1364 UCHAR Link:1;
1365 UCHAR Flag:1;
1366 UCHAR Reserved:4;
1371 struct _READ_POSITION
1372 {
1374 UCHAR BlockType:1;
1375 UCHAR Reserved1:4;
1376 UCHAR Lun:3;
1377 UCHAR Reserved2[7];
1378 UCHAR Control;
1380 struct _CDB6READWRITETAPE
1381 {
1384 UCHAR Reserved:3;
1388 UCHAR Link:1;
1389 UCHAR Flag:1;
1390 UCHAR Reserved1:4;
1393 struct _INIT_ELEMENT_STATUS
1394 {
1396 UCHAR Reserved1:5;
1398 UCHAR Reserved2[3];
1399 UCHAR Reserved3:7;
1400 UCHAR NoBarCode:1;
1402 struct _INITIALIZE_ELEMENT_RANGE
1403 {
1405 UCHAR Range:1;
1406 UCHAR Reserved1:4;
1409 UCHAR Reserved2[2];
1412 UCHAR Reserved4:7;
1413 UCHAR NoBarCode:1;
1415 struct _POSITION_TO_ELEMENT
1416 {
1418 UCHAR Reserved1:5;
1422 UCHAR Reserved2[2];
1423 UCHAR Flip:1;
1424 UCHAR Reserved3:7;
1425 UCHAR Control;
1427 struct _MOVE_MEDIUM
1428 {
1430 UCHAR Reserved1:5;
1435 UCHAR Reserved2[2];
1436 UCHAR Flip:1;
1437 UCHAR Reserved3:7;
1438 UCHAR Control;
1440 struct _EXCHANGE_MEDIUM
1441 {
1443 UCHAR Reserved1:5;
1449 UCHAR Flip1:1;
1450 UCHAR Flip2:1;
1451 UCHAR Reserved3:6;
1452 UCHAR Control;
1454 struct _READ_ELEMENT_STATUS
1455 {
1458 UCHAR VolTag:1;
1465 UCHAR Control;
1467 struct _SEND_VOLUME_TAG
1468 {
1471 UCHAR Reserved1:1;
1475 UCHAR ActionCode:5;
1476 UCHAR Reserved3:3;
1477 UCHAR Reserved4[2];
1480 UCHAR Control;
1482 struct _REQUEST_VOLUME_ELEMENT_ADDRESS
1483 {
1486 UCHAR VolTag:1;
1493 UCHAR Control;
1495 struct _LOAD_UNLOAD
1496 {
1498 UCHAR Immediate:1;
1499 UCHAR Reserved1:4;
1500 UCHAR Lun:3;
1501 UCHAR Reserved2[2];
1502 UCHAR Start:1;
1503 UCHAR LoadEject:1;
1504 UCHAR Reserved3:6;
1505 UCHAR Reserved4[3];
1506 UCHAR Slot;
1507 UCHAR Reserved5[3];
1509 struct _MECH_STATUS
1510 {
1512 UCHAR Reserved:5;
1513 UCHAR Lun:3;
1514 UCHAR Reserved1[6];
1516 UCHAR Reserved2[1];
1517 UCHAR Control;
1519 struct _SYNCHRONIZE_CACHE10
1520 {
1522 UCHAR RelAddr:1;
1523 UCHAR Immediate:1;
1524 UCHAR Reserved:3;
1525 UCHAR Lun:3;
1528 UCHAR BlockCount[2];
1529 UCHAR Control;
1531 struct _GET_EVENT_STATUS_NOTIFICATION
1532 {
1534 UCHAR Immediate:1;
1535 UCHAR Reserved:4;
1536 UCHAR Lun:3;
1537 UCHAR Reserved2[2];
1539 UCHAR Reserved3[2];
1541 UCHAR Control;
1543 struct _GET_PERFORMANCE
1544 {
1546 UCHAR Except:2;
1547 UCHAR Write:1;
1548 UCHAR Tolerance:2;
1549 UCHAR Reserved0:3;
1550 UCHAR StartingLBA[4];
1551 UCHAR Reserved1[2];
1553 UCHAR Type;
1554 UCHAR Control;
1556 struct _READ_DVD_STRUCTURE
1557 {
1559 UCHAR Reserved1:5;
1560 UCHAR Lun:3;
1563 UCHAR Format;
1565 UCHAR Reserved3:6;
1566 UCHAR AGID:2;
1567 UCHAR Control;
1569 struct _SET_STREAMING
1570 {
1572 UCHAR Reserved[8];
1574 UCHAR Control;
1575 } SET_STREAMING;
1576 struct _SEND_DVD_STRUCTURE
1577 {
1579 UCHAR Reserved1:5;
1580 UCHAR Lun:3;
1581 UCHAR Reserved2[5];
1582 UCHAR Format;
1585 UCHAR Control;
1587 struct _SEND_KEY
1588 {
1590 UCHAR Reserved1:5;
1591 UCHAR Lun:3;
1592 UCHAR Reserved2[6];
1594 UCHAR KeyFormat:6;
1595 UCHAR AGID:2;
1596 UCHAR Control;
1597 } SEND_KEY, *PSEND_KEY;
1598 struct _REPORT_KEY
1599 {
1601 UCHAR Reserved1:5;
1602 UCHAR Lun:3;
1604 UCHAR Reserved2[2];
1606 UCHAR KeyFormat:6;
1607 UCHAR AGID:2;
1608 UCHAR Control;
1610 struct _SET_READ_AHEAD
1611 {
1613 UCHAR Reserved1:5;
1614 UCHAR Lun:3;
1615 UCHAR TriggerLBA[4];
1618 UCHAR Control;
1620 struct _READ_FORMATTED_CAPACITIES
1621 {
1623 UCHAR Reserved1:5;
1624 UCHAR Lun:3;
1625 UCHAR Reserved2[5];
1627 UCHAR Control;
1629 struct _REPORT_LUNS
1630 {
1632 UCHAR Reserved1[5];
1634 UCHAR Reserved2[1];
1635 UCHAR Control;
1637 struct _PERSISTENT_RESERVE_IN
1638 {
1641 UCHAR Reserved1:3;
1642 UCHAR Reserved2[5];
1644 UCHAR Control;
1646 struct _PERSISTENT_RESERVE_OUT
1647 {
1650 UCHAR Reserved1:3;
1651 UCHAR Type:4;
1652 UCHAR Scope:4;
1653 UCHAR Reserved2[4];
1655 UCHAR Control;
1657 struct _GET_CONFIGURATION
1658 {
1661 UCHAR Reserved1:7;
1663 UCHAR Reserved2[3];
1665 UCHAR Control;
1667 struct _SET_CD_SPEED
1668 {
1670 _ANONYMOUS_UNION union
1671 {
1673 _ANONYMOUS_STRUCT struct
1674 {
1676 UCHAR Reserved3:6;
1679 UCHAR ReadSpeed[2];
1680 UCHAR WriteSpeed[2];
1681 UCHAR Reserved2[5];
1682 UCHAR Control;
1684 struct _READ12
1685 {
1688 UCHAR Reserved1:2;
1694 UCHAR Reserved2:7;
1695 UCHAR Streaming:1;
1696 UCHAR Control;
1697 } READ12;
1698 struct _WRITE12
1699 {
1702 UCHAR Reserved1:1;
1703 UCHAR EBP:1;
1709 UCHAR Reserved2:7;
1710 UCHAR Streaming:1;
1711 UCHAR Control;
1712 } WRITE12;
1713 struct _READ16
1714 {
1716 UCHAR Reserved1:3;
1722 UCHAR Reserved2:7;
1723 UCHAR Streaming:1;
1724 UCHAR Control;
1725 } READ16;
1726 struct _WRITE16
1727 {
1729 UCHAR Reserved1:3;
1735 UCHAR Reserved2:7;
1736 UCHAR Streaming:1;
1737 UCHAR Control;
1738 } WRITE16;
1739 struct _VERIFY16
1740 {
1742 UCHAR Reserved1:1;
1743 UCHAR ByteCheck:1;
1745 UCHAR Reserved2: 1;
1750 UCHAR Reserved3:7;
1751 UCHAR Streaming:1;
1752 UCHAR Control;
1753 } VERIFY16;
1754 struct _SYNCHRONIZE_CACHE16
1755 {
1757 UCHAR Reserved1:1;
1758 UCHAR Immediate:1;
1759 UCHAR Reserved2:6;
1761 UCHAR BlockCount[4];
1763 UCHAR Control;
1765 struct _READ_CAPACITY16
1766 {
1769 UCHAR Reserved1:3;
1772 UCHAR PMI:1;
1773 UCHAR Reserved2:7;
1774 UCHAR Control;
1776 ULONG AsUlong[4];
1777 UCHAR AsByte[16];
1779
1780typedef union _EIGHT_BYTE
1781{
1782 struct
1783 {
1784 UCHAR Byte0;
1785 UCHAR Byte1;
1786 UCHAR Byte2;
1787 UCHAR Byte3;
1788 UCHAR Byte4;
1789 UCHAR Byte5;
1790 UCHAR Byte6;
1791 UCHAR Byte7;
1792 };
1795
1796typedef union _FOUR_BYTE
1797{
1798 struct
1799 {
1800 UCHAR Byte0;
1801 UCHAR Byte1;
1802 UCHAR Byte2;
1803 UCHAR Byte3;
1804 };
1805 ULONG AsULong;
1807
1808typedef union _TWO_BYTE
1809{
1810 struct
1811 {
1812 UCHAR Byte0;
1813 UCHAR Byte1;
1814 };
1817#include <poppack.h>
1818
1819#if (NTDDI_VERSION < NTDDI_WINXP)
1820typedef struct _INQUIRYDATA
1821{
1822 UCHAR DeviceType:5;
1828 UCHAR HiSupport:1;
1829 UCHAR NormACA:1;
1830 UCHAR ReservedBit:1;
1831 UCHAR AERC:1;
1833 UCHAR Reserved[2];
1834 UCHAR SoftReset:1;
1836 UCHAR Reserved2:1;
1839 UCHAR Wide16Bit:1;
1840 UCHAR Wide32Bit:1;
1842 UCHAR VendorId[8];
1843 UCHAR ProductId[16];
1846 UCHAR Reserved3[40];
1848#else
1849#include <pshpack1.h>
1850typedef struct _INQUIRYDATA
1851{
1852 UCHAR DeviceType:5;
1856 union
1857 {
1859 struct
1860 {
1863 UCHAR ISOVersion:2;
1864 };
1865 };
1867 UCHAR HiSupport:1;
1868 UCHAR NormACA:1;
1870 UCHAR AERC:1;
1873 UCHAR Addr16:1;
1874 UCHAR Addr32:1;
1875 UCHAR AckReqQ:1;
1877 UCHAR MultiPort:1;
1881 UCHAR SoftReset:1;
1886 UCHAR Wide16Bit:1;
1887 UCHAR Wide32Bit:1;
1889 UCHAR VendorId[8];
1890 UCHAR ProductId[16];
1893 UCHAR Reserved3[40];
1895#include <poppack.h>
1896#endif
1897
1898typedef struct _VPD_MEDIA_SERIAL_NUMBER_PAGE
1899{
1900 UCHAR DeviceType:5;
1907
1908typedef struct _VPD_SERIAL_NUMBER_PAGE
1909{
1910 UCHAR DeviceType:5;
1917
1918typedef struct _VPD_IDENTIFICATION_DESCRIPTOR
1919{
1920 UCHAR CodeSet:4;
1921 UCHAR Reserved:4;
1924 UCHAR Reserved2:2;
1927 UCHAR Identifier[0];
1929
1930typedef struct _VPD_IDENTIFICATION_PAGE
1931{
1932 UCHAR DeviceType:5;
1937 UCHAR Descriptors[0];
1939
1940typedef struct _VPD_SUPPORTED_PAGES_PAGE
1941{
1942 UCHAR DeviceType:5;
1949
1950#include <pshpack1.h>
1951typedef struct _READ_CAPACITY_DATA
1952{
1956
1957typedef struct _READ_CAPACITY_DATA_EX
1958{
1962
1963typedef struct _MODE_PARAMETER_HEADER
1964{
1970
1971typedef struct _MODE_PARAMETER_HEADER10
1972{
1976 UCHAR Reserved[2];
1979
1980typedef struct _MODE_PARAMETER_BLOCK
1981{
1985 UCHAR BlockLength[3];
1987
1988typedef struct _LUN_LIST
1989{
1991 UCHAR Reserved[4];
1992#if !defined(__midl)
1993 UCHAR Lun[0][8];
1994#endif
1996
1997typedef struct _SENSE_DATA
1998{
1999 UCHAR ErrorCode:7;
2000 UCHAR Valid:1;
2002 UCHAR SenseKey:4;
2003 UCHAR Reserved:1;
2005 UCHAR EndOfMedia:1;
2006 UCHAR FileMark:1;
2007 UCHAR Information[4];
2015
2016#include <poppack.h>
2017
2019
2020typedef struct _ACCESS_RANGE
2021{
2026
2027typedef struct _MEMORY_REGION
2028{
2033
2035{
2036 ULONG Length;
2045 ULONG DmaPort;
2089
2091{
2096
2098{
2103
2104typedef struct _DPC_BUFFER
2105{
2109 struct
2110 {
2113 };
2120
2121typedef struct _STOR_DPC
2122{
2126
2127typedef struct _STOR_LOCK_HANDLE
2128{
2130 struct
2131 {
2132 struct
2133 {
2140
2142{
2158
2160{
2171
2173{
2179
2181{
2189
2190typedef
2193 _In_ PVOID DeviceExtension);
2194
2195typedef
2198 _In_ PVOID DeviceExtension,
2200
2201typedef
2204 _In_ PVOID DeviceExtension,
2206
2207typedef
2210 _In_ PVOID DeviceExtension);
2211
2212typedef
2214(NTAPI *PHW_TIMER)(
2215 _In_ PVOID DeviceExtension);
2216
2217typedef
2220 _In_ PVOID DeviceExtension);
2221
2222typedef
2225 IN PVOID DeviceExtension,
2228 IN PCHAR ArgumentString,
2230 OUT PBOOLEAN Again);
2231
2232typedef
2235 IN PVOID DeviceExtension,
2236 IN ULONG PathId);
2237
2238typedef
2241 IN PVOID DeviceExtension,
2244
2245typedef
2248 IN PVOID DeviceExtension,
2249 IN SCSI_ADAPTER_CONTROL_TYPE ControlType,
2251
2252typedef
2255 _In_ PVOID DeviceExtension);
2256
2257typedef
2261 _In_ PVOID HwDeviceExtension,
2264
2265typedef
2267(NTAPI STOR_SYNCHRONIZED_ACCESS)(
2268 _In_ PVOID HwDeviceExtension,
2270
2271typedef STOR_SYNCHRONIZED_ACCESS *PSTOR_SYNCHRONIZED_ACCESS;
2272
2273typedef
2277 _In_ PVOID *Irp,
2280
2281typedef
2284 _In_ PVOID HwDeviceExtension,
2285 _In_ ULONG MessageId,
2287
2288typedef
2291 _In_ PVOID HwDeviceExtension,
2292 _In_ PSTOR_SCATTER_GATHER_LIST ScatterGatherList,
2294
2295typedef
2298 _In_ PVOID HwDeviceExtension,
2299 _In_ PVOID Mdl,
2300 _In_ PVOID CurrentVa,
2305 _Inout_ PVOID ScatterGatherBuffer,
2306 _In_ ULONG ScatterGatherBufferLength);
2307
2308typedef
2312 _In_ PVOID HwDeviceExtension,
2313 _In_opt_ PVOID PMdl);
2314
2315typedef
2319 _In_ ULONG Tag,
2320 _In_ PVOID HwDeviceExtension,
2321 _Out_ PVOID *PMdl);
2322
2323typedef
2327
2329{
2338
2339typedef struct _HW_INITIALIZATION_DATA
2340{
2369
2370
2371
2372#define REVERSE_BYTES_QUAD(Destination, Source) { \
2373 PEIGHT_BYTE d = (PEIGHT_BYTE)(Destination); \
2374 PEIGHT_BYTE s = (PEIGHT_BYTE)(Source); \
2375 d->Byte7 = s->Byte0; \
2376 d->Byte6 = s->Byte1; \
2377 d->Byte5 = s->Byte2; \
2378 d->Byte4 = s->Byte3; \
2379 d->Byte3 = s->Byte4; \
2380 d->Byte2 = s->Byte5; \
2381 d->Byte1 = s->Byte6; \
2382 d->Byte0 = s->Byte7; \
2383}
2384
2385#define REVERSE_BYTES(Destination, Source) { \
2386 PFOUR_BYTE d = (PFOUR_BYTE)(Destination); \
2387 PFOUR_BYTE s = (PFOUR_BYTE)(Source); \
2388 d->Byte3 = s->Byte0; \
2389 d->Byte2 = s->Byte1; \
2390 d->Byte1 = s->Byte2; \
2391 d->Byte0 = s->Byte3; \
2392}
2393
2394#define REVERSE_BYTES_SHORT(Destination, Source) { \
2395 PTWO_BYTE d = (PTWO_BYTE)(Destination); \
2396 PTWO_BYTE s = (PTWO_BYTE)(Source); \
2397 d->Byte1 = s->Byte0; \
2398 d->Byte0 = s->Byte1; \
2399}
2400
2401#define StorPortCopyMemory(Destination,Source,Length) memcpy((Destination),(Source),(Length))
2402
2404PUCHAR
2405NTAPI
2407 _In_ PVOID HwDeviceExtension,
2409
2411BOOLEAN
2412NTAPI
2414 _In_ PVOID HwDeviceExtension,
2415 _In_ ULONG RequestsToComplete);
2416
2418VOID
2419NTAPI
2421 _In_ PVOID HwDeviceExtension,
2424 _In_ UCHAR Lun,
2425 _In_ UCHAR SrbStatus);
2426
2428ULONG64
2429NTAPI
2432
2435NTAPI
2437 _In_ ULONG64 UlongAddress);
2438
2440VOID
2441__cdecl
2443 _In_ ULONG DebugPrintLevel,
2444 _In_ PCCHAR DebugMessage,
2445 ...);
2446
2448BOOLEAN
2449NTAPI
2451 _In_ PVOID HwDeviceExtension,
2454 _In_ UCHAR Lun,
2455 _In_ ULONG RequestsToComplete);
2456
2458BOOLEAN
2459NTAPI
2461 _In_ PVOID HwDeviceExtension,
2464 _In_ UCHAR Lun);
2465
2467VOID
2468NTAPI
2470 _In_ PVOID HwDeviceExtension,
2471 _In_ PVOID MappedAddress);
2472
2474VOID
2475NTAPI
2477 _In_ PVOID HwDeviceExtension,
2479
2481ULONG
2482NTAPI
2484 _In_ PVOID DeviceExtension,
2485 _In_ ULONG BusDataType,
2486 _In_ ULONG SystemIoBusNumber,
2489 _In_ ULONG Length);
2490
2492PVOID
2493NTAPI
2495 _In_ PVOID HwDeviceExtension,
2497 _In_ ULONG SystemIoBusNumber,
2498 _In_ STOR_PHYSICAL_ADDRESS IoAddress,
2500 _In_ BOOLEAN InIoSpace);
2501
2503PVOID
2504NTAPI
2506 _In_ PVOID HwDeviceExtension,
2509 _In_ UCHAR Lun);
2510
2513NTAPI
2515 _In_ PVOID HwDeviceExtension,
2518 _Out_ ULONG *Length);
2519
2522NTAPI
2524 _In_ PVOID DeviceExtension,
2526
2529NTAPI
2531 _In_ PVOID DeviceExtension,
2534 _In_ UCHAR Lun,
2535 _In_ LONG QueueTag);
2536
2538PVOID
2539NTAPI
2541 _In_ PVOID HwDeviceExtension,
2544
2546PVOID
2547NTAPI
2549 _In_ PVOID HwDeviceExtension,
2551
2553ULONG
2554NTAPI
2560
2562VOID
2563NTAPI
2565 _In_ PVOID HwDeviceExtension,
2569 _In_ UCHAR Lun,
2571 _In_ ULONG UniqueId);
2572
2574VOID
2575NTAPI
2579 _In_ ULONG Length);
2580
2582VOID
2583__cdecl
2586 _In_ PVOID HwDeviceExtension,
2587 ...);
2588
2590VOID
2591NTAPI
2593 _Out_ PLARGE_INTEGER CurrentTime);
2594
2596BOOLEAN
2597NTAPI
2599 _In_ PVOID HwDeviceExtension,
2600 _In_ ULONG TimeOut);
2601
2603BOOLEAN
2604NTAPI
2606 _In_ PVOID HwDeviceExtension,
2609 _In_ UCHAR Lun,
2610 _In_ ULONG TimeOut);
2611
2613VOID
2614NTAPI
2616 _In_ PVOID HwDeviceExtension,
2619 _In_ ULONG Count);
2620
2622VOID
2623NTAPI
2625 _In_ PVOID HwDeviceExtension,
2628 _In_ ULONG Count);
2629
2631VOID
2632NTAPI
2634 _In_ PVOID HwDeviceExtension,
2637 _In_ ULONG Count);
2638
2640UCHAR
2641NTAPI
2643 _In_ PVOID HwDeviceExtension,
2644 _In_ PUCHAR Port);
2645
2647ULONG
2648NTAPI
2650 _In_ PVOID HwDeviceExtension,
2651 _In_ PULONG Port);
2652
2654USHORT
2655NTAPI
2657 _In_ PVOID HwDeviceExtension,
2658 _In_ PUSHORT Port);
2659
2661VOID
2662NTAPI
2664 _In_ PVOID HwDeviceExtension,
2667 _In_ ULONG Count);
2668
2670VOID
2671NTAPI
2673 _In_ PVOID HwDeviceExtension,
2676 _In_ ULONG Count);
2677
2679VOID
2680NTAPI
2682 _In_ PVOID HwDeviceExtension,
2685 _In_ ULONG Count);
2686
2688UCHAR
2689NTAPI
2691 _In_ PVOID HwDeviceExtension,
2693
2695ULONG
2696NTAPI
2698 _In_ PVOID HwDeviceExtension,
2700
2702USHORT
2703NTAPI
2705 _In_ PVOID HwDeviceExtension,
2707
2709BOOLEAN
2710NTAPI
2712 _In_ PVOID HwDeviceExtension);
2713
2715BOOLEAN
2716NTAPI
2718 _In_ PVOID HwDeviceExtension,
2721 _In_ ULONG Type,
2724
2726BOOLEAN
2727NTAPI
2729 _In_ PVOID HwDeviceExtension,
2732 _In_ ULONG Type,
2735
2737BOOLEAN
2738NTAPI
2740 _In_ PVOID HwDeviceExtension);
2741
2743BOOLEAN
2744NTAPI
2746 _In_ PVOID HwDeviceExtension,
2749 _In_ UCHAR Lun);
2750
2752ULONG
2753NTAPI
2755 _In_ PVOID DeviceExtension,
2756 _In_ ULONG BusDataType,
2757 _In_ ULONG SystemIoBusNumber,
2761 _In_ ULONG Length);
2762
2764BOOLEAN
2765NTAPI
2767 _In_ PVOID HwDeviceExtension,
2770 _In_ UCHAR Lun,
2771 _In_ ULONG Depth);
2772
2774VOID
2775NTAPI
2777 _In_ ULONG Delay);
2778
2780VOID
2781NTAPI
2783 _In_ PVOID HwDeviceExtension,
2784 _In_ PSTOR_SYNCHRONIZED_ACCESS SynchronizedAccessRoutine,
2786
2788BOOLEAN
2789NTAPI
2791 _In_ PVOID HwDeviceExtension,
2793 _In_ ULONG SystemIoBusNumber,
2794 _In_ STOR_PHYSICAL_ADDRESS IoAddress,
2796 _In_ BOOLEAN InIoSpace);
2797
2799VOID
2800NTAPI
2802 _In_ PVOID HwDeviceExtension,
2805 _In_ ULONG Count);
2806
2808VOID
2809NTAPI
2811 _In_ PVOID HwDeviceExtension,
2814 _In_ ULONG Count);
2815
2817VOID
2818NTAPI
2820 _In_ PVOID HwDeviceExtension,
2823 _In_ ULONG Count);
2824
2826VOID
2827NTAPI
2829 _In_ PVOID HwDeviceExtension,
2831 _In_ UCHAR Value);
2832
2834VOID
2835NTAPI
2837 _In_ PVOID HwDeviceExtension,
2839 _In_ ULONG Value);
2840
2842VOID
2843NTAPI
2845 _In_ PVOID HwDeviceExtension,
2847 _In_ USHORT Value);
2848
2850VOID
2851NTAPI
2853 _In_ PVOID HwDeviceExtension,
2856 _In_ ULONG Count);
2857
2859VOID
2860NTAPI
2862 _In_ PVOID HwDeviceExtension,
2865 _In_ ULONG Count);
2866
2868VOID
2869NTAPI
2871 _In_ PVOID HwDeviceExtension,
2874 _In_ ULONG Count);
2875
2877VOID
2878NTAPI
2880 _In_ PVOID HwDeviceExtension,
2882 _In_ UCHAR Value);
2883
2885VOID
2886NTAPI
2888 _In_ PVOID HwDeviceExtension,
2890 _In_ ULONG Value);
2891
2893VOID
2894NTAPI
2896 _In_ PVOID HwDeviceExtension,
2898 _In_ USHORT Value);
2899
2900
2902BOOLEAN
2904 _In_ PVOID DeviceExtension,
2905 _In_ PHW_PASSIVE_INITIALIZE_ROUTINE HwPassiveInitializeRoutine)
2906{
2907 LONG Succ;
2908 Succ = FALSE;
2910 DeviceExtension,
2911 HwPassiveInitializeRoutine,
2912 &Succ);
2913 return (BOOLEAN)Succ;
2914}
2915
2917VOID
2919 _In_ PVOID DeviceExtension,
2921 _In_ PHW_DPC_ROUTINE HwDpcRoutine)
2922{
2924 DeviceExtension,
2925 Dpc,
2926 HwDpcRoutine);
2927}
2928
2930BOOLEAN
2932 _In_ PVOID DeviceExtension,
2936{
2937 LONG Succ;
2938 Succ = FALSE;
2940 DeviceExtension,
2941 Dpc,
2944 &Succ);
2945 return (BOOLEAN)Succ;
2946}
2947
2949VOID
2951 _In_ PVOID DeviceExtension,
2953 _In_ PVOID LockContext,
2955{
2957 DeviceExtension,
2958 SpinLock,
2959 LockContext,
2960 LockHandle);
2961}
2962
2964VOID
2966 _In_ PVOID DeviceExtension,
2968{
2970 DeviceExtension,
2971 LockHandle);
2972}
2973
2975ULONG
2977 _In_ STORPORT_FUNCTION_CODE FunctionCode,
2978 _In_ PVOID HwDeviceExtension,
2979 ...);
2980
2982ULONG
2984 _In_ PVOID HwDeviceExtension,
2986 _In_ ULONG Tag,
2987 _Out_ PVOID *BufferPointer
2988 )
2989{
2991 HwDeviceExtension,
2993 Tag,
2994 BufferPointer);
2995}
2996
2998ULONG
3000 _In_ PVOID HwDeviceExtension,
3001 _In_ PVOID BufferPointer)
3002{
3004 HwDeviceExtension,
3005 BufferPointer);
3006}
3007
3009ULONG
3011 _In_ PVOID HwDeviceExtension,
3012 _In_ PVOID BufferPointer,
3014 _Out_ PVOID *Mdl)
3015{
3017 HwDeviceExtension,
3018 BufferPointer,
3020 Mdl);
3021}
3022
3024ULONG
3026 _In_ PVOID HwDeviceExtension,
3027 _In_ PVOID Mdl)
3028{
3030 HwDeviceExtension,
3031 Mdl);
3032}
3033
3035ULONG
3037 _In_ PVOID HwDeviceExtension,
3039{
3041 HwDeviceExtension,
3042 Mdl);
3043}
3044
3046ULONG
3048 _In_ PVOID HwDeviceExtension,
3050 _Out_ PVOID *SystemAddress)
3051{
3053 HwDeviceExtension,
3054 Srb,
3055 SystemAddress);
3056}
3057
3059ULONG
3061 _In_ PVOID HwDeviceExtension,
3063 _Out_ PVOID *Mdl)
3064{
3066 HwDeviceExtension,
3067 Srb,
3068 Mdl);
3069}
3070
3072ULONG
3074 _In_ PVOID HwDeviceExtension,
3075 _In_ PVOID Irp)
3076{
3078 HwDeviceExtension,
3079 Irp);
3080}
3081
3083ULONG
3085 _In_ PVOID HwDeviceExtension,
3086 _Out_ PVOID *AdapterDeviceObject,
3089{
3091 HwDeviceExtension,
3092 AdapterDeviceObject,
3095}
3096
3098ULONG
3100 _In_ PVOID HwDeviceExtension,
3101 _In_ PVOID Mdl,
3102 _In_ PVOID CurrentVa,
3107 _Inout_ PVOID ScatterGatherBuffer,
3108 _In_ ULONG ScatterGatherBufferLength)
3109{
3111 HwDeviceExtension,
3112 Mdl,
3113 CurrentVa,
3114 Length,
3116 Context,
3118 ScatterGatherBuffer,
3119 ScatterGatherBufferLength);
3120}
3121
3123ULONG
3125 _In_ PVOID HwDeviceExtension,
3126 _In_ PSTOR_SCATTER_GATHER_LIST ScatterGatherList,
3128{
3130 HwDeviceExtension,
3131 ScatterGatherList,
3133}
3134
3136ULONG
3138 _In_ PVOID HwDeviceExtension,
3139 _In_ ULONG MessageId,
3141{
3143 HwDeviceExtension,
3144 MessageId,
3145 OldIrql);
3146}
3147
3149ULONG
3151 _In_ PVOID HwDeviceExtension,
3152 _In_ ULONG MessageId,
3154{
3156 HwDeviceExtension,
3157 MessageId,
3158 OldIrql);
3159}
3160
3162ULONG
3164 _In_ PVOID HwDeviceExtension,
3165 _In_ ULONG MessageId,
3167{
3169 HwDeviceExtension,
3170 MessageId,
3171 InterruptInfo);
3172}
3173
3175ULONG
3177 _In_ PVOID HwDeviceExtension,
3179 _Inout_ PPERF_CONFIGURATION_DATA PerfConfigData)
3180{
3182 HwDeviceExtension,
3183 Query,
3184 PerfConfigData);
3185}
3186
3188ULONG
3190 _In_ PVOID HwDeviceExtension,
3192 _Inout_ PSTARTIO_PERFORMANCE_PARAMETERS StartIoPerfParams)
3193{
3195 HwDeviceExtension,
3196 Srb,
3197 StartIoPerfParams);
3198}
3199
3201ULONG
3203 _In_ PVOID HwDeviceExtension,
3206{
3208 HwDeviceExtension,
3209 LogDetails,
3210 MaximumSize);
3211}
3212
3213#if DBG
3214#define DebugPrint(x) StorPortDebugPrint x
3215#else
3216#define DebugPrint(x)
3217#endif
3218
3219#ifdef __cplusplus
3220}
3221#endif
3222
3223#endif /* _NTSTORPORT_ */
#define SaveState(State)
unsigned char BOOLEAN
Type
Definition: Type.h:7
#define __cdecl
Definition: accygwin.h:79
#define VOID
Definition: acefi.h:82
#define WriteBuffer(BaseIoAddress, Buffer, Count)
Definition: atapi.h:344
#define ReadBuffer(BaseIoAddress, Buffer, Count)
Definition: atapi.h:339
BOOL Query(LPCTSTR *ServiceArgs, DWORD ArgCount, BOOL bExtended)
Definition: query.c:292
@ Reserved2
Definition: bcd.h:202
@ Reserved1
Definition: bcd.h:201
PDEVICE_OBJECT PhysicalDeviceObject
Definition: btrfs_drv.h:1157
_In_ PSCSI_REQUEST_BLOCK Srb
Definition: cdrom.h:989
_In_ PSCSI_REQUEST_BLOCK _In_opt_ PVOID _In_ ULONG _In_ BOOLEAN WriteToDevice
Definition: cdrom.h:992
Definition: bufpool.h:45
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR _In_ UCHAR _In_ UCHAR Lun
Definition: classpnp.h:1315
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR PathId
Definition: classpnp.h:1313
_In_z_ PCCHAR _In_ PDEVICE_OBJECT LowerDeviceObject
Definition: classpnp.h:983
_In_ PVOID Argument2
Definition: classpnp.h:721
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR _In_ UCHAR TargetId
Definition: classpnp.h:1314
_In_ PIRP Irp
Definition: csq.h:116
#define FALSE
Definition: types.h:117
VOID(NTAPI * PHW_DMA_STARTED)(IN PVOID DeviceExtension)
Definition: srb.h:462
_SCSI_ADAPTER_CONTROL_TYPE
Definition: srb.h:176
enum _SCSI_NOTIFICATION_TYPE SCSI_NOTIFICATION_TYPE
_SCSI_ADAPTER_CONTROL_STATUS
Definition: srb.h:190
enum _SCSI_ADAPTER_CONTROL_TYPE SCSI_ADAPTER_CONTROL_TYPE
BOOLEAN(NTAPI * PHW_STARTIO)(IN PVOID DeviceExtension, IN PSCSI_REQUEST_BLOCK Srb)
Definition: srb.h:443
BOOLEAN(NTAPI * PHW_ADAPTER_STATE)(IN PVOID DeviceExtension, IN PVOID Context, IN BOOLEAN SaveState)
Definition: srb.h:486
BOOLEAN(NTAPI * PHW_RESET_BUS)(IN PVOID DeviceExtension, IN ULONG PathId)
Definition: srb.h:479
SCSI_ADAPTER_CONTROL_STATUS(NTAPI * PHW_ADAPTER_CONTROL)(IN PVOID DeviceExtension, IN SCSI_ADAPTER_CONTROL_TYPE ControlType, IN PVOID Parameters)
Definition: srb.h:494
_SCSI_NOTIFICATION_TYPE
Definition: srb.h:530
ULONG(NTAPI * PHW_FIND_ADAPTER)(IN PVOID DeviceExtension, IN PVOID HwContext, IN PVOID BusInformation, IN PCHAR ArgumentString, IN OUT PPORT_CONFIGURATION_INFORMATION ConfigInfo, OUT PBOOLEAN Again)
Definition: srb.h:468
BOOLEAN(NTAPI * PHW_INITIALIZE)(IN PVOID DeviceExtension)
Definition: srb.h:437
UCHAR KIRQL
Definition: env_spec_w32.h:591
_Must_inspect_result_ __in_opt PWDF_OBJECT_ATTRIBUTES __in PVOID __in __out WDFMEMORY * PMemory
CPPORT Port[4]
Definition: headless.c:35
enum _INTERFACE_TYPE INTERFACE_TYPE
#define Unused(x)
Definition: atlwin.h:28
UNICODE_STRING Global
Definition: symlink.c:37
unsigned __int64 ULONG64
Definition: imports.h:198
#define _In_reads_bytes_(size)
Definition: ms_sal.h:321
#define _Inout_
Definition: ms_sal.h:378
#define _Out_writes_bytes_(size)
Definition: ms_sal.h:350
#define _Out_
Definition: ms_sal.h:345
#define _When_(expr, annos)
Definition: ms_sal.h:254
#define _In_
Definition: ms_sal.h:308
#define _In_opt_
Definition: ms_sal.h:309
_In_ NDIS_ERROR_CODE ErrorCode
Definition: ndis.h:4436
_In_ ACCESS_MASK _In_opt_ POBJECT_ATTRIBUTES _In_opt_ PLARGE_INTEGER MaximumSize
Definition: mmfuncs.h:362
int Count
Definition: noreturn.cpp:7
#define _ANONYMOUS_UNION
Definition: ntbasedef.h:30
#define _ANONYMOUS_STRUCT
Definition: ntbasedef.h:56
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:102
#define BOOLEAN
Definition: pedump.c:73
long LONG
Definition: pedump.c:60
unsigned short USHORT
Definition: pedump.c:61
static WCHAR Address[46]
Definition: ping.c:68
enum _KINTERRUPT_MODE KINTERRUPT_MODE
enum _DMA_SPEED DMA_SPEED
enum _DMA_WIDTH DMA_WIDTH
_VPD_ASSOCIATION
Definition: scsi.h:2446
_VPD_IDENTIFIER_TYPE
Definition: scsi.h:2454
_VPD_CODE_SET
Definition: scsi.h:2439
_STOR_POWER_ACTION
Definition: srb.h:364
enum _STOR_PNP_ACTION STOR_PNP_ACTION
_STOR_PNP_ACTION
Definition: srb.h:399
_Must_inspect_result_ _In_ PVOID _In_ struct _HW_INITIALIZATION_DATA _In_ PVOID HwContext
Definition: srb.h:907
enum _STOR_DEVICE_POWER_STATE STOR_DEVICE_POWER_STATE
_Must_inspect_result_ _In_ PVOID _In_ struct _HW_INITIALIZATION_DATA * HwInitializationData
Definition: srb.h:906
enum _STOR_POWER_ACTION STOR_POWER_ACTION
_STOR_DEVICE_POWER_STATE
Definition: srb.h:355
VOID(NTAPI * PHW_DMA_STARTED)(_In_ PVOID DeviceExtension)
Definition: storport.h:2219
STORPORT_API BOOLEAN NTAPI StorPortSetDeviceQueueDepth(_In_ PVOID HwDeviceExtension, _In_ UCHAR PathId, _In_ UCHAR TargetId, _In_ UCHAR Lun, _In_ ULONG Depth)
Definition: storport.c:1398
FORCEINLINE VOID StorPortReleaseSpinLock(_In_ PVOID DeviceExtension, _Inout_ PSTOR_LOCK_HANDLE LockHandle)
Definition: storport.h:2965
BOOLEAN(NTAPI * PHW_BUILDIO)(_In_ PVOID DeviceExtension, _In_ PSCSI_REQUEST_BLOCK Srb)
Definition: storport.h:2197
union _TWO_BYTE TWO_BYTE
@ StorPowerActionWarmEject
Definition: storport.h:551
@ StorPowerActionShutdown
Definition: storport.h:548
@ StorPowerActionReserved
Definition: storport.h:545
@ StorPowerActionNone
Definition: storport.h:544
@ StorPowerActionShutdownReset
Definition: storport.h:549
@ StorPowerActionSleep
Definition: storport.h:546
@ StorPowerActionHibernate
Definition: storport.h:547
@ StorPowerActionShutdownOff
Definition: storport.h:550
struct _SCSI_REQUEST_BLOCK SCSI_REQUEST_BLOCK
struct _STARTIO_PERFORMANCE_PARAMETERS STARTIO_PERFORMANCE_PARAMETERS
VOID(NTAPI * PStorPortPutScatterGatherList)(_In_ PVOID HwDeviceExtension, _In_ PSTOR_SCATTER_GATHER_LIST ScatterGatherList, _In_ BOOLEAN WriteToDevice)
Definition: storport.h:2290
struct _ACCESS_RANGE ACCESS_RANGE
union _EIGHT_BYTE EIGHT_BYTE
enum _STOR_PNP_ACTION STOR_PNP_ACTION
struct _INQUIRYDATA * PINQUIRYDATA
struct _SCSI_PNP_REQUEST_BLOCK * PSCSI_PNP_REQUEST_BLOCK
struct _STOR_SCATTER_GATHER_LIST STOR_SCATTER_GATHER_LIST
FORCEINLINE ULONG StorPortReleaseMSISpinLock(_In_ PVOID HwDeviceExtension, _In_ ULONG MessageId, _In_ ULONG OldIrql)
Definition: storport.h:3150
struct _READ_CAPACITY_DATA_EX READ_CAPACITY_DATA_EX
STORPORT_API VOID __cdecl StorPortDebugPrint(_In_ ULONG DebugPrintLevel, _In_ PCCHAR DebugMessage,...)
FORCEINLINE ULONG StorPortGetSystemAddress(_In_ PVOID HwDeviceExtension, _In_ PSCSI_REQUEST_BLOCK Srb, _Out_ PVOID *SystemAddress)
Definition: storport.h:3047
STORPORT_API UCHAR NTAPI StorPortReadPortUchar(_In_ PVOID HwDeviceExtension, _In_ PUCHAR Port)
Definition: stubs.c:60
STORPORT_API VOID NTAPI StorPortWritePortUlong(_In_ PVOID HwDeviceExtension, _In_ PULONG Port, _In_ ULONG Value)
Definition: stubs.c:216
FORCEINLINE ULONG StorPortAllocateMdl(_In_ PVOID HwDeviceExtension, _In_ PVOID BufferPointer, _In_ ULONG NumberOfBytes, _Out_ PVOID *Mdl)
Definition: storport.h:3010
enum _STOR_PNP_ACTION * PSTOR_PNP_ACTION
@ ScsiRestartAdapter
Definition: storport.h:494
@ ScsiQuerySupportedControlTypes
Definition: storport.h:492
@ ScsiAdapterControlMax
Definition: storport.h:497
@ ScsiSetBootConfig
Definition: storport.h:495
@ ScsiStopAdapter
Definition: storport.h:493
@ MakeAdapterControlTypeSizeOfUlong
Definition: storport.h:498
@ ScsiSetRunningConfig
Definition: storport.h:496
struct _READ_CAPACITY_DATA * PREAD_CAPACITY_DATA
struct _STOR_SCATTER_GATHER_ELEMENT * PSTOR_SCATTER_GATHER_ELEMENT
BOOLEAN(NTAPI * PHW_STARTIO)(_In_ PVOID DeviceExtension, _In_ PSCSI_REQUEST_BLOCK Srb)
Definition: storport.h:2203
STORPORT_API VOID NTAPI StorPortReadPortBufferUshort(_In_ PVOID HwDeviceExtension, _In_ PUSHORT Port, _In_ PUSHORT Buffer, _In_ ULONG Count)
Definition: stubs.c:47
_GETSGSTATUS
Definition: storport.h:636
@ SG_BUFFER_TOO_SMALL
Definition: storport.h:638
@ SG_ALLOCATED
Definition: storport.h:637
STORPORT_API UCHAR NTAPI StorPortReadRegisterUchar(_In_ PVOID HwDeviceExtension, _In_ PUCHAR Register)
Definition: stubs.c:132
struct _STOR_LOG_EVENT_DETAILS * PSTOR_LOG_EVENT_DETAILS
STORPORT_API VOID NTAPI StorPortWritePortUshort(_In_ PVOID HwDeviceExtension, _In_ PUSHORT Port, _In_ USHORT Value)
Definition: stubs.c:228
FORCEINLINE ULONG StorPortGetMSIInfo(_In_ PVOID HwDeviceExtension, _In_ ULONG MessageId, _Out_ PMESSAGE_INTERRUPT_INFORMATION InterruptInfo)
Definition: storport.h:3163
STORPORT_API BOOLEAN NTAPI StorPortBusy(_In_ PVOID HwDeviceExtension, _In_ ULONG RequestsToComplete)
Definition: storport.c:488
struct _VPD_IDENTIFICATION_PAGE VPD_IDENTIFICATION_PAGE
FORCEINLINE ULONG StorPortGetStartIoPerfParams(_In_ PVOID HwDeviceExtension, _In_ PSCSI_REQUEST_BLOCK Srb, _Inout_ PSTARTIO_PERFORMANCE_PARAMETERS StartIoPerfParams)
Definition: storport.h:3189
PVOID(NTAPI * PStorPortAllocatePool)(_In_ ULONG NumberOfBytes, _In_ ULONG Tag, _In_ PVOID HwDeviceExtension, _Out_ PVOID *PMdl)
Definition: storport.h:2317
struct _VPD_SERIAL_NUMBER_PAGE VPD_SERIAL_NUMBER_PAGE
FORCEINLINE BOOLEAN StorPortIssueDpc(_In_ PVOID DeviceExtension, _In_ PSTOR_DPC Dpc, _In_ PVOID SystemArgument1, _In_ PVOID SystemArgument2)
Definition: storport.h:2931
@ StorRemoveDevice
Definition: storport.h:557
@ StorQueryCapabilities
Definition: storport.h:559
@ StorQueryResourceRequirements
Definition: storport.h:560
@ StorFilterResourceRequirements
Definition: storport.h:561
@ StorStopDevice
Definition: storport.h:558
@ StorStartDevice
Definition: storport.h:556
@ StorSurpriseRemoval
Definition: storport.h:562
FORCEINLINE ULONG StorPortAllocatePool(_In_ PVOID HwDeviceExtension, _In_ ULONG NumberOfBytes, _In_ ULONG Tag, _Out_ PVOID *BufferPointer)
Definition: storport.h:2983
struct _VPD_SERIAL_NUMBER_PAGE * PVPD_SERIAL_NUMBER_PAGE
struct _PORT_CONFIGURATION_INFORMATION * PPORT_CONFIGURATION_INFORMATION
STORPORT_API BOOLEAN NTAPI StorPortRegistryWrite(_In_ PVOID HwDeviceExtension, _In_ PUCHAR ValueName, _In_ ULONG Global, _In_ ULONG Type, _In_ PUCHAR Buffer, _In_ ULONG BufferLength)
Definition: storport.c:1304
enum _SCSI_NOTIFICATION_TYPE * PSCSI_NOTIFICATION_TYPE
struct _VPD_MEDIA_SERIAL_NUMBER_PAGE VPD_MEDIA_SERIAL_NUMBER_PAGE
struct _VPD_SUPPORTED_PAGES_PAGE VPD_SUPPORTED_PAGES_PAGE
enum _SCSI_NOTIFICATION_TYPE SCSI_NOTIFICATION_TYPE
enum _VPD_IDENTIFIER_TYPE VPD_IDENTIFIER_TYPE
enum _STOR_DEVICE_POWER_STATE * PSTOR_DEVICE_POWER_STATE
STORPORT_API BOOLEAN NTAPI StorPortDeviceBusy(_In_ PVOID HwDeviceExtension, _In_ UCHAR PathId, _In_ UCHAR TargetId, _In_ UCHAR Lun, _In_ ULONG RequestsToComplete)
Definition: storport.c:573
struct _LUN_LIST LUN_LIST
FORCEINLINE ULONG StorPortCompleteServiceIrp(_In_ PVOID HwDeviceExtension, _In_ PVOID Irp)
Definition: storport.h:3073
struct _PERF_CONFIGURATION_DATA PERF_CONFIGURATION_DATA
_STORPORT_FUNCTION_CODE
Definition: storport.h:596
@ ExtFunctionFreeContiguousMemorySpecifyCache
Definition: storport.h:623
@ ExtFunctionGetGroupAffinity
Definition: storport.h:617
@ ExtFunctionGetNodeAffinity
Definition: storport.h:619
@ ExtFunctionCompleteServiceIrp
Definition: storport.h:604
@ ExtFunctionAllocateMdl
Definition: storport.h:599
@ ExtFunctionAllocateContiguousMemorySpecifyCacheNode
Definition: storport.h:622
@ ExtFunctionGetOriginalMdl
Definition: storport.h:603
@ ExtFunctionFreePool
Definition: storport.h:598
@ ExtFunctionGetDeviceObjects
Definition: storport.h:605
@ ExtFunctionAcquireMSISpinLock
Definition: storport.h:608
@ ExtFunctionInitializePerformanceOptimizations
Definition: storport.h:611
@ ExtFunctionGetLogicalProcessorRelationship
Definition: storport.h:621
@ ExtFunctionGetMessageInterruptInformation
Definition: storport.h:610
@ ExtFunctionGetSystemAddress
Definition: storport.h:602
@ ExtFunctionGetStartIoPerformanceParameters
Definition: storport.h:612
@ ExtFunctionLogSystemEvent
Definition: storport.h:613
@ ExtFunctionBuildScatterGatherList
Definition: storport.h:606
@ ExtFunctionPutScatterGatherList
Definition: storport.h:607
@ ExtFunctionReleaseMSISpinLock
Definition: storport.h:609
@ ExtFunctionFreeMdl
Definition: storport.h:600
@ ExtFunctionGetActiveGroupCount
Definition: storport.h:616
@ ExtFunctionBuildMdlForNonPagedPool
Definition: storport.h:601
@ ExtFunctionGetCurrentProcessorNumber
Definition: storport.h:615
@ ExtFunctionGetHighestNodeNumber
Definition: storport.h:620
@ ExtFunctionAllocatePool
Definition: storport.h:597
@ ExtFunctionGetActiveNodeCount
Definition: storport.h:618
enum _STOR_EVENT_ASSOCIATION_ENUM STOR_EVENT_ASSOCIATION_ENUM
union _CDB CDB
FORCEINLINE ULONG StorPortGetDeviceObjects(_In_ PVOID HwDeviceExtension, _Out_ PVOID *AdapterDeviceObject, _Out_ PVOID *PhysicalDeviceObject, _Out_ PVOID *LowerDeviceObject)
Definition: storport.h:3084
@ ScsiAdapterControlSuccess
Definition: storport.h:503
@ ScsiAdapterControlUnsuccessful
Definition: storport.h:504
struct _STOR_LOCK_HANDLE STOR_LOCK_HANDLE
struct _HW_INITIALIZATION_DATA * PHW_INITIALIZATION_DATA
_STOR_SYNCHRONIZATION_MODEL
Definition: storport.h:470
@ StorSynchronizeFullDuplex
Definition: storport.h:472
@ StorSynchronizeHalfDuplex
Definition: storport.h:471
@ VpdAssocPort
Definition: storport.h:576
@ VpdAssocTarget
Definition: storport.h:577
@ VpdAssocReserved1
Definition: storport.h:578
@ VpdAssocDevice
Definition: storport.h:575
@ VpdAssocReserved2
Definition: storport.h:579
STORPORT_API PVOID NTAPI StorPortGetLogicalUnit(_In_ PVOID HwDeviceExtension, _In_ UCHAR PathId, _In_ UCHAR TargetId, _In_ UCHAR Lun)
Definition: storport.c:773
STORPORT_API ULONG NTAPI StorPortInitialize(_In_ PVOID Argument1, _In_ PVOID Argument2, _In_ PHW_INITIALIZATION_DATA HwInitializationData, _In_opt_ PVOID Unused)
struct _READ_CAPACITY_DATA READ_CAPACITY_DATA
struct _SCSI_WMI_REQUEST_BLOCK SCSI_WMI_REQUEST_BLOCK
STORPORT_API ULONG NTAPI StorPortReadRegisterUlong(_In_ PVOID HwDeviceExtension, _In_ PULONG Register)
Definition: stubs.c:143
enum _SCSI_ADAPTER_CONTROL_TYPE SCSI_ADAPTER_CONTROL_TYPE
BOOLEAN(NTAPI * PStorPortGetMessageInterruptInformation)(_In_ PVOID HwDeviceExtension, _In_ ULONG MessageId, _Out_ PMESSAGE_INTERRUPT_INFORMATION InterruptInfo)
Definition: storport.h:2283
FORCEINLINE ULONG StorPortBuildMdlForNonPagedPool(_In_ PVOID HwDeviceExtension, _Inout_ PVOID Mdl)
Definition: storport.h:3036
STORPORT_API VOID NTAPI StorPortReadPortBufferUlong(_In_ PVOID HwDeviceExtension, _In_ PULONG Port, _In_ PULONG Buffer, _In_ ULONG Count)
Definition: stubs.c:34
_STOR_EVENT_ASSOCIATION_ENUM
Definition: storport.h:628
@ StorEventTargetAssociation
Definition: storport.h:631
@ StorEventInvalidAssociation
Definition: storport.h:632
@ StorEventAdapterAssociation
Definition: storport.h:629
@ StorEventLunAssociation
Definition: storport.h:630
STORPORT_API VOID NTAPI StorPortWriteRegisterUlong(_In_ PVOID HwDeviceExtension, _In_ PULONG Register, _In_ ULONG Value)
Definition: stubs.c:291
enum _SCSI_ADAPTER_CONTROL_STATUS SCSI_ADAPTER_CONTROL_STATUS
enum _STOR_DEVICE_POWER_STATE STOR_DEVICE_POWER_STATE
STORPORT_API VOID NTAPI StorPortMoveMemory(_Out_writes_bytes_(Length) PVOID WriteBuffer, _In_reads_bytes_(Length) PVOID ReadBuffer, _In_ ULONG Length)
Definition: storport.c:1079
FORCEINLINE VOID StorPortAcquireSpinLock(_In_ PVOID DeviceExtension, _In_ STOR_SPINLOCK SpinLock, _In_ PVOID LockContext, _Inout_ PSTOR_LOCK_HANDLE LockHandle)
Definition: storport.h:2950
STORPORT_API VOID NTAPI StorPortSynchronizeAccess(_In_ PVOID HwDeviceExtension, _In_ PSTOR_SYNCHRONIZED_ACCESS SynchronizedAccessRoutine, _In_opt_ PVOID Context)
Definition: storport.c:1430
enum _VPD_CODE_SET VPD_CODE_SET
enum _GETSGSTATUS * PGETSGSTATUS
struct _VPD_SUPPORTED_PAGES_PAGE * PVPD_SUPPORTED_PAGES_PAGE
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
union _EIGHT_BYTE * PEIGHT_BYTE
struct _STOR_DEVICE_CAPABILITIES STOR_DEVICE_CAPABILITIES
struct _SCSI_PNP_REQUEST_BLOCK SCSI_PNP_REQUEST_BLOCK
struct _STOR_DPC STOR_DPC
struct _VPD_IDENTIFICATION_PAGE * PVPD_IDENTIFICATION_PAGE
_STOR_SPINLOCK
Definition: storport.h:484
@ StartIoLock
Definition: storport.h:486
@ InterruptLock
Definition: storport.h:487
@ DpcLock
Definition: storport.h:485
struct _MEMORY_REGION * PMEMORY_REGION
struct _MODE_PARAMETER_HEADER10 MODE_PARAMETER_HEADER10
struct _DPC_BUFFER DPC_BUFFER
enum _STORPORT_FUNCTION_CODE STORPORT_FUNCTION_CODE
_STOR_DMA_WIDTH
Definition: storport.h:476
@ Dma64BitScatterGather
Definition: storport.h:479
@ DmaUnknown
Definition: storport.h:477
@ Dma32Bit
Definition: storport.h:478
@ Dma64Bit
Definition: storport.h:480
union _FOUR_BYTE FOUR_BYTE
struct _STOR_DEVICE_CAPABILITIES * PSTOR_DEVICE_CAPABILITIES
struct _HW_INITIALIZATION_DATA HW_INITIALIZATION_DATA
struct _SCSI_POWER_REQUEST_BLOCK SCSI_POWER_REQUEST_BLOCK
struct _SENSE_DATA * PSENSE_DATA
STORPORT_API VOID NTAPI StorPortWriteRegisterUshort(_In_ PVOID HwDeviceExtension, _In_ PUSHORT Register, _In_ USHORT Value)
Definition: stubs.c:303
struct _STORPORT_EXTENDED_FUNCTIONS STORPORT_EXTENDED_FUNCTIONS
struct _SCSI_POWER_REQUEST_BLOCK * PSCSI_POWER_REQUEST_BLOCK
VOID(NTAPI * PHW_TIMER)(_In_ PVOID DeviceExtension)
Definition: storport.h:2214
STORPORT_API VOID NTAPI StorPortWritePortBufferUshort(_In_ PVOID HwDeviceExtension, _In_ PUSHORT Port, _In_ PUSHORT Buffer, _In_ ULONG Count)
Definition: stubs.c:191
struct _STOR_SCATTER_GATHER_ELEMENT STOR_SCATTER_GATHER_ELEMENT
struct _MODE_PARAMETER_HEADER MODE_PARAMETER_HEADER
FORCEINLINE ULONG StorPortInitializePerfOpts(_In_ PVOID HwDeviceExtension, _In_ BOOLEAN Query, _Inout_ PPERF_CONFIGURATION_DATA PerfConfigData)
Definition: storport.h:3176
BOOLEAN(NTAPI * PHW_INTERRUPT)(_In_ PVOID DeviceExtension)
Definition: storport.h:2209
STORPORT_API VOID NTAPI StorPortFreeRegistryBuffer(_In_ PVOID HwDeviceExtension, _In_ PUCHAR Buffer)
Definition: storport.c:642
struct _LUN_LIST * PLUN_LIST
struct _VPD_IDENTIFICATION_DESCRIPTOR * PVPD_IDENTIFICATION_DESCRIPTOR
STORPORT_API BOOLEAN NTAPI StorPortValidateRange(_In_ PVOID HwDeviceExtension, _In_ INTERFACE_TYPE BusType, _In_ ULONG SystemIoBusNumber, _In_ STOR_PHYSICAL_ADDRESS IoAddress, _In_ ULONG NumberOfBytes, _In_ BOOLEAN InIoSpace)
Definition: storport.c:1446
STORPORT_API PSTOR_SCATTER_GATHER_LIST NTAPI StorPortGetScatterGatherList(_In_ PVOID DeviceExtension, _In_ PSCSI_REQUEST_BLOCK Srb)
Definition: storport.c:846
STORPORT_API VOID NTAPI StorPortReadRegisterBufferUchar(_In_ PVOID HwDeviceExtension, _In_ PUCHAR Register, _In_ PUCHAR Buffer, _In_ ULONG Count)
Definition: stubs.c:93
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
union _TWO_BYTE * PTWO_BYTE
union _FOUR_BYTE * PFOUR_BYTE
STORPORT_API BOOLEAN NTAPI StorPortRegistryRead(_In_ PVOID HwDeviceExtension, _In_ PUCHAR ValueName, _In_ ULONG Global, _In_ ULONG Type, _In_ PUCHAR Buffer, _In_ PULONG BufferLength)
Definition: storport.c:1284
FORCEINLINE BOOLEAN StorPortEnablePassiveInitialization(_In_ PVOID DeviceExtension, _In_ PHW_PASSIVE_INITIALIZE_ROUTINE HwPassiveInitializeRoutine)
Definition: storport.h:2903
STORPORT_API ULONG NTAPI StorPortReadPortUlong(_In_ PVOID HwDeviceExtension, _In_ PULONG Port)
Definition: stubs.c:71
FORCEINLINE ULONG StorPortFreeMdl(_In_ PVOID HwDeviceExtension, _In_ PVOID Mdl)
Definition: storport.h:3025
struct _MODE_PARAMETER_HEADER10 * PMODE_PARAMETER_HEADER10
STORPORT_API BOOLEAN NTAPI StorPortPauseDevice(_In_ PVOID HwDeviceExtension, _In_ UCHAR PathId, _In_ UCHAR TargetId, _In_ UCHAR Lun, _In_ ULONG TimeOut)
Definition: storport.c:1231
STORPORT_API VOID NTAPI StorPortWritePortUchar(_In_ PVOID HwDeviceExtension, _In_ PUCHAR Port, _In_ UCHAR Value)
Definition: stubs.c:204
struct _STORPORT_EXTENDED_FUNCTIONS * PSTORPORT_EXTENDED_FUNCTIONS
VOID(NTAPI * PpostScaterGatherExecute)(_In_ PVOID *DeviceObject, _In_ PVOID *Irp, _In_ PSTOR_SCATTER_GATHER_LIST ScatterGather, _In_ PVOID Context)
Definition: storport.h:2275
BOOLEAN(NTAPI * PHW_ADAPTER_STATE)(IN PVOID DeviceExtension, IN PVOID Context, IN BOOLEAN SaveState)
Definition: storport.h:2240
FORCEINLINE ULONG StorPortBuildScatterGatherList(_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:3099
STORPORT_API PUCHAR NTAPI StorPortAllocateRegistryBuffer(_In_ PVOID HwDeviceExtension, _In_ PULONG Length)
Definition: storport.c:472
STOR_SYNCHRONIZED_ACCESS * PSTOR_SYNCHRONIZED_ACCESS
Definition: storport.h:2271
enum _STOR_SPINLOCK STOR_SPINLOCK
BOOLEAN(* PHW_PASSIVE_INITIALIZE_ROUTINE)(_In_ PVOID DeviceExtension)
Definition: storport.h:2254
STORPORT_API VOID NTAPI StorPortReadPortBufferUchar(_In_ PVOID HwDeviceExtension, _In_ PUCHAR Port, _In_ PUCHAR Buffer, _In_ ULONG Count)
Definition: stubs.c:21
STORPORT_API BOOLEAN NTAPI StorPortReady(_In_ PVOID HwDeviceExtension)
Definition: storport.c:1269
BOOLEAN(NTAPI * PHW_RESET_BUS)(IN PVOID DeviceExtension, IN ULONG PathId)
Definition: storport.h:2234
struct _SENSE_DATA SENSE_DATA
STORPORT_API ULONG64 NTAPI StorPortConvertPhysicalAddressToUlong64(_In_ STOR_PHYSICAL_ADDRESS Address)
struct _STOR_SCATTER_GATHER_LIST * PSTOR_SCATTER_GATHER_LIST
STORPORT_API ULONG StorPortExtendedFunction(_In_ STORPORT_FUNCTION_CODE FunctionCode, _In_ PVOID HwDeviceExtension,...)
Definition: storport.c:609
struct _READ_CAPACITY_DATA_EX * PREAD_CAPACITY_DATA_EX
FORCEINLINE ULONG StorPortLogSystemEvent(_In_ PVOID HwDeviceExtension, _Inout_ PSTOR_LOG_EVENT_DETAILS LogDetails, _Inout_ PULONG MaximumSize)
Definition: storport.h:3202
BOOLEAN(NTAPI * PHW_INITIALIZE)(_In_ PVOID DeviceExtension)
Definition: storport.h:2192
STORPORT_API VOID NTAPI StorPortWritePortBufferUchar(_In_ PVOID HwDeviceExtension, _In_ PUCHAR Port, _In_ PUCHAR Buffer, _In_ ULONG Count)
Definition: stubs.c:165
struct _MESSAGE_INTERRUPT_INFORMATION * PMESSAGE_INTERRUPT_INFORMATION
struct _SCSI_REQUEST_BLOCK * PSCSI_REQUEST_BLOCK
STORPORT_API VOID NTAPI StorPortCompleteRequest(_In_ PVOID HwDeviceExtension, _In_ UCHAR PathId, _In_ UCHAR TargetId, _In_ UCHAR Lun, _In_ UCHAR SrbStatus)
Definition: storport.c:504
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
STORPORT_API PVOID NTAPI StorPortGetDeviceBase(_In_ PVOID HwDeviceExtension, _In_ INTERFACE_TYPE BusType, _In_ ULONG SystemIoBusNumber, _In_ STOR_PHYSICAL_ADDRESS IoAddress, _In_ ULONG NumberOfBytes, _In_ BOOLEAN InIoSpace)
Definition: storport.c:701
VOID(* PHW_DPC_ROUTINE)(_In_ PSTOR_DPC Dpc, _In_ PVOID HwDeviceExtension, _In_ PVOID SystemArgument1, _In_ PVOID SystemArgument2)
Definition: storport.h:2259
struct _STOR_LOCK_HANDLE * PSTOR_LOCK_HANDLE
struct _MESSAGE_INTERRUPT_INFORMATION MESSAGE_INTERRUPT_INFORMATION
STORPORT_API VOID NTAPI StorPortQuerySystemTime(_Out_ PLARGE_INTEGER CurrentTime)
STORPORT_API USHORT NTAPI StorPortReadPortUshort(_In_ PVOID HwDeviceExtension, _In_ PUSHORT Port)
Definition: stubs.c:82
struct _VPD_MEDIA_SERIAL_NUMBER_PAGE * PVPD_MEDIA_SERIAL_NUMBER_PAGE
struct _STOR_LOG_EVENT_DETAILS STOR_LOG_EVENT_DETAILS
enum _STOR_DMA_WIDTH STOR_DMA_WIDTH
struct _PORT_CONFIGURATION_INFORMATION PORT_CONFIGURATION_INFORMATION
STORPORT_API BOOLEAN NTAPI StorPortDeviceReady(_In_ PVOID HwDeviceExtension, _In_ UCHAR PathId, _In_ UCHAR TargetId, _In_ UCHAR Lun)
Definition: storport.c:592
enum _STOR_POWER_ACTION * PSTOR_POWER_ACTION
STORPORT_API VOID NTAPI StorPortReadRegisterBufferUlong(_In_ PVOID HwDeviceExtension, _In_ PULONG Register, _In_ PULONG Buffer, _In_ ULONG Count)
Definition: stubs.c:106
STORPORT_API BOOLEAN NTAPI StorPortPause(_In_ PVOID HwDeviceExtension, _In_ ULONG TimeOut)
Definition: storport.c:1215
enum _STOR_POWER_ACTION STOR_POWER_ACTION
STORPORT_API PVOID NTAPI StorPortGetVirtualAddress(_In_ PVOID HwDeviceExtension, _In_ STOR_PHYSICAL_ADDRESS PhysicalAddress)
Definition: storport.c:932
FORCEINLINE ULONG StorPortGetOriginalMdl(_In_ PVOID HwDeviceExtension, _In_ PSCSI_REQUEST_BLOCK Srb, _Out_ PVOID *Mdl)
Definition: storport.h:3060
STORPORT_API VOID NTAPI StorPortWritePortBufferUlong(_In_ PVOID HwDeviceExtension, _In_ PULONG Port, _In_ PULONG Buffer, _In_ ULONG Count)
Definition: stubs.c:178
STORPORT_API VOID NTAPI StorPortWriteRegisterUchar(_In_ PVOID HwDeviceExtension, _In_ PUCHAR Register, _In_ UCHAR Value)
Definition: stubs.c:279
struct _SCSI_WMI_REQUEST_BLOCK * PSCSI_WMI_REQUEST_BLOCK
STORPORT_API PSCSI_REQUEST_BLOCK NTAPI StorPortGetSrb(_In_ PVOID DeviceExtension, _In_ UCHAR PathId, _In_ UCHAR TargetId, _In_ UCHAR Lun, _In_ LONG QueueTag)
Definition: storport.c:862
SCSI_ADAPTER_CONTROL_STATUS(NTAPI * PHW_ADAPTER_CONTROL)(IN PVOID DeviceExtension, IN SCSI_ADAPTER_CONTROL_TYPE ControlType, IN PVOID Parameters)
Definition: storport.h:2247
@ VpdIdentifierTypeSCSINameString
Definition: storport.h:592
@ VpdIdentifierTypeVendorId
Definition: storport.h:585
@ VpdIdentifierTypeMD5LogicalUnitId
Definition: storport.h:591
@ VpdIdentifierTypeTargetPortGroup
Definition: storport.h:589
@ VpdIdentifierTypeLogicalUnitGroup
Definition: storport.h:590
@ VpdIdentifierTypeFCPHName
Definition: storport.h:587
@ VpdIdentifierTypePortRelative
Definition: storport.h:588
@ VpdIdentifierTypeEUI64
Definition: storport.h:586
@ VpdIdentifierTypeVendorSpecific
Definition: storport.h:584
STORPORT_API USHORT NTAPI StorPortReadRegisterUshort(_In_ PVOID HwDeviceExtension, _In_ PUSHORT Register)
Definition: stubs.c:154
STORPORT_API VOID NTAPI StorPortStallExecution(_In_ ULONG Delay)
Definition: storport.c:1417
STORPORT_API VOID NTAPI StorPortReadRegisterBufferUshort(_In_ PVOID HwDeviceExtension, _In_ PUSHORT Register, _In_ PUSHORT Buffer, _In_ ULONG Count)
Definition: stubs.c:119
enum _VPD_ASSOCIATION * PVPD_ASSOCIATION
FORCEINLINE ULONG StorPortPutScatterGatherList(_In_ PVOID HwDeviceExtension, _In_ PSTOR_SCATTER_GATHER_LIST ScatterGatherList, _In_ BOOLEAN WriteToDevice)
Definition: storport.h:3124
STORPORT_API BOOLEAN NTAPI StorPortResume(_In_ PVOID HwDeviceExtension)
Definition: storport.c:1324
STORPORT_API VOID NTAPI StorPortWriteRegisterBufferUshort(_In_ PVOID HwDeviceExtension, _In_ PUSHORT Register, _In_ PUSHORT Buffer, _In_ ULONG Count)
Definition: stubs.c:266
struct _INQUIRYDATA INQUIRYDATA
enum _SCSI_ADAPTER_CONTROL_TYPE * PSCSI_ADAPTER_CONTROL_TYPE
struct _PERF_CONFIGURATION_DATA * PPERF_CONFIGURATION_DATA
PHYSICAL_ADDRESS STOR_PHYSICAL_ADDRESS
Definition: storport.h:2018
enum _STORPORT_FUNCTION_CODE * PSTORPORT_FUNCTION_CODE
union _CDB * PCDB
struct _MODE_PARAMETER_BLOCK * PMODE_PARAMETER_BLOCK
enum _VPD_CODE_SET * PVPD_CODE_SET
_In_ PVOID Context
Definition: storport.h:2269
STORPORT_API VOID NTAPI StorPortWriteRegisterBufferUlong(_In_ PVOID HwDeviceExtension, _In_ PULONG Register, _In_ PULONG Buffer, _In_ ULONG Count)
Definition: stubs.c:253
STORPORT_API VOID NTAPI StorPortFreeDeviceBase(_In_ PVOID HwDeviceExtension, _In_ PVOID MappedAddress)
Definition: storport.c:627
STORPORT_API BOOLEAN NTAPI StorPortResumeDevice(_In_ PVOID HwDeviceExtension, _In_ UCHAR PathId, _In_ UCHAR TargetId, _In_ UCHAR Lun)
Definition: storport.c:1339
@ InitializeDpc
Definition: storport.h:526
@ AcquireSpinLock
Definition: storport.h:528
@ ResetDetected
Definition: storport.h:512
@ _obsolete2
Definition: storport.h:514
@ WMIEvent
Definition: storport.h:517
@ QueryTickCount
Definition: storport.h:521
@ _obsolete1
Definition: storport.h:513
@ RequestTimerCall
Definition: storport.h:515
@ IssueDpc
Definition: storport.h:527
@ RequestComplete
Definition: storport.h:509
@ ReleaseSpinLock
Definition: storport.h:529
@ BufferOverrunDetected
Definition: storport.h:522
@ WMIReregister
Definition: storport.h:518
@ LinkUp
Definition: storport.h:519
@ NextRequest
Definition: storport.h:510
@ BusChangeDetected
Definition: storport.h:516
@ NextLuRequest
Definition: storport.h:511
@ TraceNotification
Definition: storport.h:523
@ LinkDown
Definition: storport.h:520
@ GetExtendedFunctionTable
Definition: storport.h:524
@ EnablePassiveInitialization
Definition: storport.h:525
FORCEINLINE ULONG StorPortAcquireMSISpinLock(_In_ PVOID HwDeviceExtension, _In_ ULONG MessageId, _In_ PULONG OldIrql)
Definition: storport.h:3137
enum _SCSI_ADAPTER_CONTROL_STATUS * PSCSI_ADAPTER_CONTROL_STATUS
enum _GETSGSTATUS GETSGSTATUS
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:2297
enum _VPD_ASSOCIATION VPD_ASSOCIATION
FORCEINLINE VOID StorPortInitializeDpc(_In_ PVOID DeviceExtension, _Out_ PSTOR_DPC Dpc, _In_ PHW_DPC_ROUTINE HwDpcRoutine)
Definition: storport.h:2918
struct _STARTIO_PERFORMANCE_PARAMETERS * PSTARTIO_PERFORMANCE_PARAMETERS
struct _MODE_PARAMETER_BLOCK MODE_PARAMETER_BLOCK
FORCEINLINE ULONG StorPortFreePool(_In_ PVOID HwDeviceExtension, _In_ PVOID BufferPointer)
Definition: storport.h:2999
STORPORT_API VOID NTAPI StorPortLogError(_In_ PVOID HwDeviceExtension, _In_opt_ PSCSI_REQUEST_BLOCK Srb, _In_ UCHAR PathId, _In_ UCHAR TargetId, _In_ UCHAR Lun, _In_ ULONG ErrorCode, _In_ ULONG UniqueId)
Definition: storport.c:1056
struct _MODE_PARAMETER_HEADER * PMODE_PARAMETER_HEADER
STORPORT_API VOID NTAPI StorPortWriteRegisterBufferUchar(_In_ PVOID HwDeviceExtension, _In_ PUCHAR Register, _In_ PUCHAR Buffer, _In_ ULONG Count)
Definition: stubs.c:240
struct _VPD_IDENTIFICATION_DESCRIPTOR VPD_IDENTIFICATION_DESCRIPTOR
VOID(NTAPI * PStorPortFreePool)(_In_ PVOID PMemory, _In_ PVOID HwDeviceExtension, _In_opt_ PVOID PMdl)
Definition: storport.h:2310
enum _STOR_SYNCHRONIZATION_MODEL STOR_SYNCHRONIZATION_MODEL
STORPORT_API STOR_PHYSICAL_ADDRESS NTAPI StorPortConvertUlong64ToPhysicalAddress(_In_ ULONG64 UlongAddress)
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:2224
PVOID(NTAPI * PStorPortGetSystemAddress)(_In_ PSCSI_REQUEST_BLOCK Srb)
Definition: storport.h:2325
struct _STOR_DPC * PSTOR_DPC
@ VpdCodeSetBinary
Definition: storport.h:568
@ VpdCodeSetReserved
Definition: storport.h:567