ReactOS  0.4.14-dev-52-g6116262
srb.h
Go to the documentation of this file.
1 /*
2  * scsi.h
3  *
4  * Interface between SCSI miniport drivers and the SCSI port driver.
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 _NTSRB_
24 #define _NTSRB_
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 #define SCSI_MAXIMUM_LOGICAL_UNITS 8
31 #define SCSI_MAXIMUM_TARGETS_PER_BUS 128
32 #define SCSI_MAXIMUM_LUNS_PER_TARGET 255
33 #define SCSI_MAXIMUM_BUSES 8
34 #define SCSI_MINIMUM_PHYSICAL_BREAKS 16
35 #define SCSI_MAXIMUM_PHYSICAL_BREAKS 255
36 #define SCSI_MAXIMUM_TARGETS 8
37 
38 /* PORT_CONFIGURATION_INFORMATION.Dma64BitAddresses constants */
39 #define SCSI_DMA64_MINIPORT_SUPPORTED 0x01
40 #define SCSI_DMA64_SYSTEM_SUPPORTED 0x80
41 #if (NTDDI_VERSION > NTDDI_WS03SP1)
42 #define SCSI_DMA64_MINIPORT_FULL64BIT_SUPPORTED 0x02
43 #endif
44 
45 #define SP_UNINITIALIZED_VALUE ((ULONG) ~0)
46 #define SP_UNTAGGED ((UCHAR) ~0)
47 
48 /* Asynchronous events */
49 #define SRBEV_BUS_RESET 0x0001
50 #define SRBEV_SCSI_ASYNC_NOTIFICATION 0x0002
51 
52 #define MAXIMUM_CDB_SIZE 12
53 
54 #if DBG
55 #define DebugPrint(x) ScsiDebugPrint x
56 #else
57 #define DebugPrint(x)
58 #endif
59 
60 #define SCSI_COMBINE_BUS_TARGET(Bus, Target)( \
61  ((((UCHAR) (Target)) & ~(0x20 - 1)) << 8) | \
62  (((UCHAR) (Bus)) << 5) | \
63  (((UCHAR) (Target)) & (0x20 - 1)))
64 
65 #define SCSI_DECODE_BUS_TARGET(Value, Bus, Target)( \
66  Bus = (UCHAR) ((Value) >> 5), \
67  Target = (UCHAR) ((((Value) >> 8) & ~(0x20 - 1)) | ((Value) & (0x20 - 1))))
68 
69 /* SCSI_REQUEST_BLOCK.Function constants */
70 #define SRB_FUNCTION_EXECUTE_SCSI 0x00
71 #define SRB_FUNCTION_CLAIM_DEVICE 0x01
72 #define SRB_FUNCTION_IO_CONTROL 0x02
73 #define SRB_FUNCTION_RECEIVE_EVENT 0x03
74 #define SRB_FUNCTION_RELEASE_QUEUE 0x04
75 #define SRB_FUNCTION_ATTACH_DEVICE 0x05
76 #define SRB_FUNCTION_RELEASE_DEVICE 0x06
77 #define SRB_FUNCTION_SHUTDOWN 0x07
78 #define SRB_FUNCTION_FLUSH 0x08
79 #define SRB_FUNCTION_ABORT_COMMAND 0x10
80 #define SRB_FUNCTION_RELEASE_RECOVERY 0x11
81 #define SRB_FUNCTION_RESET_BUS 0x12
82 #define SRB_FUNCTION_RESET_DEVICE 0x13
83 #define SRB_FUNCTION_TERMINATE_IO 0x14
84 #define SRB_FUNCTION_FLUSH_QUEUE 0x15
85 #define SRB_FUNCTION_REMOVE_DEVICE 0x16
86 #define SRB_FUNCTION_WMI 0x17
87 #define SRB_FUNCTION_LOCK_QUEUE 0x18
88 #define SRB_FUNCTION_UNLOCK_QUEUE 0x19
89 #define SRB_FUNCTION_RESET_LOGICAL_UNIT 0x20
90 #define SRB_FUNCTION_SET_LINK_TIMEOUT 0x21
91 #define SRB_FUNCTION_LINK_TIMEOUT_OCCURRED 0x22
92 #define SRB_FUNCTION_LINK_TIMEOUT_COMPLETE 0x23
93 #define SRB_FUNCTION_POWER 0x24
94 #define SRB_FUNCTION_PNP 0x25
95 #define SRB_FUNCTION_DUMP_POINTERS 0x26
96 
97 /* SCSI_REQUEST_BLOCK.SrbStatus constants */
98 #define SRB_STATUS_PENDING 0x00
99 #define SRB_STATUS_SUCCESS 0x01
100 #define SRB_STATUS_ABORTED 0x02
101 #define SRB_STATUS_ABORT_FAILED 0x03
102 #define SRB_STATUS_ERROR 0x04
103 #define SRB_STATUS_BUSY 0x05
104 #define SRB_STATUS_INVALID_REQUEST 0x06
105 #define SRB_STATUS_INVALID_PATH_ID 0x07
106 #define SRB_STATUS_NO_DEVICE 0x08
107 #define SRB_STATUS_TIMEOUT 0x09
108 #define SRB_STATUS_SELECTION_TIMEOUT 0x0A
109 #define SRB_STATUS_COMMAND_TIMEOUT 0x0B
110 #define SRB_STATUS_MESSAGE_REJECTED 0x0D
111 #define SRB_STATUS_BUS_RESET 0x0E
112 #define SRB_STATUS_PARITY_ERROR 0x0F
113 #define SRB_STATUS_REQUEST_SENSE_FAILED 0x10
114 #define SRB_STATUS_NO_HBA 0x11
115 #define SRB_STATUS_DATA_OVERRUN 0x12
116 #define SRB_STATUS_UNEXPECTED_BUS_FREE 0x13
117 #define SRB_STATUS_PHASE_SEQUENCE_FAILURE 0x14
118 #define SRB_STATUS_BAD_SRB_BLOCK_LENGTH 0x15
119 #define SRB_STATUS_REQUEST_FLUSHED 0x16
120 #define SRB_STATUS_INVALID_LUN 0x20
121 #define SRB_STATUS_INVALID_TARGET_ID 0x21
122 #define SRB_STATUS_BAD_FUNCTION 0x22
123 #define SRB_STATUS_ERROR_RECOVERY 0x23
124 #define SRB_STATUS_NOT_POWERED 0x24
125 #define SRB_STATUS_LINK_DOWN 0x25
126 #define SRB_STATUS_INTERNAL_ERROR 0x30
127 
128 #define SRB_STATUS_QUEUE_FROZEN 0x40
129 #define SRB_STATUS_AUTOSENSE_VALID 0x80
130 
131 #define SRB_STATUS(Status) \
132  (Status & ~(SRB_STATUS_AUTOSENSE_VALID | SRB_STATUS_QUEUE_FROZEN))
133 
134 /* SCSI_REQUEST_BLOCK.SrbFlags constants */
135 #define SRB_FLAGS_QUEUE_ACTION_ENABLE 0x00000002
136 #define SRB_FLAGS_DISABLE_DISCONNECT 0x00000004
137 #define SRB_FLAGS_DISABLE_SYNCH_TRANSFER 0x00000008
138 #define SRB_FLAGS_BYPASS_FROZEN_QUEUE 0x00000010
139 #define SRB_FLAGS_DISABLE_AUTOSENSE 0x00000020
140 #define SRB_FLAGS_DATA_IN 0x00000040
141 #define SRB_FLAGS_DATA_OUT 0x00000080
142 #define SRB_FLAGS_NO_DATA_TRANSFER 0x00000000
143 #define SRB_FLAGS_UNSPECIFIED_DIRECTION (SRB_FLAGS_DATA_IN | SRB_FLAGS_DATA_OUT)
144 #define SRB_FLAGS_NO_QUEUE_FREEZE 0x00000100
145 #define SRB_FLAGS_ADAPTER_CACHE_ENABLE 0x00000200
146 #define SRB_FLAGS_FREE_SENSE_BUFFER 0x00000400
147 #define SRB_FLAGS_IS_ACTIVE 0x00010000
148 #define SRB_FLAGS_ALLOCATED_FROM_ZONE 0x00020000
149 #define SRB_FLAGS_SGLIST_FROM_POOL 0x00040000
150 #define SRB_FLAGS_BYPASS_LOCKED_QUEUE 0x00080000
151 #define SRB_FLAGS_NO_KEEP_AWAKE 0x00100000
152 #define SRB_FLAGS_PORT_DRIVER_ALLOCSENSE 0x00200000
153 #define SRB_FLAGS_PORT_DRIVER_SENSEHASPORT 0x00400000
154 #define SRB_FLAGS_DONT_START_NEXT_PACKET 0x00800000
155 #define SRB_FLAGS_PORT_DRIVER_RESERVED 0x0F000000
156 #define SRB_FLAGS_CLASS_DRIVER_RESERVED 0xF0000000
157 
158 #if DBG
159 #define SCSI_PORT_SIGNATURE 0x54524f50
160 #endif
161 
162 #define SRB_SIMPLE_TAG_REQUEST 0x20
163 #define SRB_HEAD_OF_QUEUE_TAG_REQUEST 0x21
164 #define SRB_ORDERED_QUEUE_TAG_REQUEST 0x22
165 
166 #define SRB_WMI_FLAGS_ADAPTER_REQUEST 0x0001
167 #define SRB_POWER_FLAGS_ADAPTER_REQUEST 0x0001
168 #define SRB_PNP_FLAGS_ADAPTER_REQUEST 0x0001
169 
170 #define SP_BUS_PARITY_ERROR 0x0001
171 #define SP_UNEXPECTED_DISCONNECT 0x0002
172 #define SP_INVALID_RESELECTION 0x0003
173 #define SP_BUS_TIME_OUT 0x0004
174 #define SP_PROTOCOL_ERROR 0x0005
175 #define SP_INTERNAL_ADAPTER_ERROR 0x0006
176 #define SP_REQUEST_TIMEOUT 0x0007
177 #define SP_IRQ_NOT_RESPONDING 0x0008
178 #define SP_BAD_FW_WARNING 0x0009
179 #define SP_BAD_FW_ERROR 0x000a
180 #define SP_LOST_WMI_MINIPORT_REQUEST 0x000b
181 
182 #define SP_VER_TRACE_SUPPORT 0x0010
183 
184 #define SP_RETURN_NOT_FOUND 0
185 #define SP_RETURN_FOUND 1
186 #define SP_RETURN_ERROR 2
187 #define SP_RETURN_BAD_CONFIG 3
188 
190 
191 typedef struct _ACCESS_RANGE {
196 
197 typedef struct _PORT_CONFIGURATION_INFORMATION {
198  ULONG Length;
207  ULONG DmaPort;
213  PVOID Reserved;
217  BOOLEAN Master;
239  ULONG DmaPort2;
250 
251 #define CONFIG_INFO_VERSION_2 sizeof(PORT_CONFIGURATION_INFORMATION)
252 
253 #ifdef __GNUC__
254 __extension__ /* enums limited to range of integer */
255 #endif
265 
270 
271 typedef struct _SCSI_SUPPORTED_CONTROL_TYPE_LIST {
275 
276 typedef struct _SCSI_REQUEST_BLOCK {
277  USHORT Length;
278  UCHAR Function;
281  UCHAR PathId;
282  UCHAR TargetId;
283  UCHAR Lun;
284  UCHAR QueueTag;
288  ULONG SrbFlags;
296  _ANONYMOUS_UNION union {
300  } DUMMYUNIONNAME;
301 #if defined(_WIN64)
302  ULONG Reserved;
303 #endif
304  UCHAR Cdb[16];
306 
307 #define SCSI_REQUEST_BLOCK_SIZE sizeof(SCSI_REQUEST_BLOCK)
308 
309 typedef struct _SCSI_WMI_REQUEST_BLOCK {
310  USHORT Length;
311  UCHAR Function;
314  UCHAR PathId;
315  UCHAR TargetId;
316  UCHAR Lun;
318  UCHAR WMIFlags;
319  UCHAR Reserved2[2];
320  ULONG SrbFlags;
324  PVOID DataPath;
329 #if (NTDDI_VERSION >= NTDDI_WS03SP1) && defined(_WIN64)
330  ULONG Reserved6;
331 #endif
332  UCHAR Reserved5[16];
334 
343 
344 typedef enum _STOR_POWER_ACTION {
354 
373 #if defined(_WIN64)
374  ULONG Reserved;
375 #endif
378 
379 typedef enum _STOR_PNP_ACTION {
388 
402 
403 typedef struct _SCSI_PNP_REQUEST_BLOCK {
421 #if defined(_WIN64)
422  ULONG Reserved;
423 #endif
426 
427 typedef
429 BOOLEAN
431  _In_ PVOID DeviceExtension);
432 
433 typedef
435 BOOLEAN
437  _In_ PVOID DeviceExtension,
439 
440 typedef
442 BOOLEAN
444  _In_ PVOID DeviceExtension);
445 
446 typedef VOID
448  _In_ PVOID DeviceExtension);
449 
450 typedef VOID
452  _In_ PVOID DeviceExtension);
453 
454 typedef
456 ULONG
458  _In_ PVOID DeviceExtension,
460  _In_ PVOID BusInformation,
461  _In_ PCHAR ArgumentString,
463  _Out_ PBOOLEAN Again);
464 
465 typedef
467 BOOLEAN
469  _In_ PVOID DeviceExtension,
470  _In_ ULONG PathId);
471 
472 typedef
474 BOOLEAN
476  _In_ PVOID DeviceExtension,
479 
480 typedef
484  _In_ PVOID DeviceExtension,
485  _In_ SCSI_ADAPTER_CONTROL_TYPE ControlType,
487 
505 
506 typedef struct _HW_INITIALIZATION_DATA {
520  PVOID Reserved;
528  PVOID VendorId;
529  _ANONYMOUS_UNION union {
532  } DUMMYUNIONNAME;
534  PVOID DeviceId;
537 
538 #if defined(_NTDDK_)
539 #define SCSIPORTAPI
540 #else
541 #define SCSIPORTAPI DECLSPEC_IMPORT
542 #endif
543 
545 VOID
546 NTAPI
548  _In_ PVOID HwDeviceExtension,
549  _In_ UCHAR PathId,
551  _In_ UCHAR Lun,
552  _In_ UCHAR SrbStatus);
553 
556 ULONG
557 NTAPI
560 
561 #define ScsiPortConvertPhysicalAddressToUlong(Address) ((Address).LowPart)
562 #define ScsiPortConvertPhysicalAddressToULongPtr(Address) ((ULONG_PTR)((Address).QuadPart))
563 
567 NTAPI
569  _In_ ULONG_PTR UlongAddress);
570 
572 VOID
573 NTAPI
575  _In_ PVOID DeviceExtension);
576 
578 VOID
579 NTAPI
581  _In_ PVOID HwDeviceExtension,
582  _In_ PVOID MappedAddress);
583 
586 ULONG
587 NTAPI
589  _In_ PVOID DeviceExtension,
590  _In_ ULONG BusDataType,
591  _In_ ULONG SystemIoBusNumber,
594  _In_ ULONG Length);
595 
598 PVOID
599 NTAPI
601  _In_ PVOID HwDeviceExtension,
603  _In_ ULONG SystemIoBusNumber,
604  _In_ SCSI_PHYSICAL_ADDRESS IoAddress,
606  _In_ BOOLEAN InIoSpace);
607 
610 PVOID
611 NTAPI
613  _In_ PVOID HwDeviceExtension,
614  _In_ UCHAR PathId,
616  _In_ UCHAR Lun);
617 
621 NTAPI
623  _In_ PVOID HwDeviceExtension,
626  _Out_ ULONG *Length);
627 
631 NTAPI
633  _In_ PVOID DeviceExtension,
634  _In_ UCHAR PathId,
636  _In_ UCHAR Lun,
637  _In_ LONG QueueTag);
638 
641 PVOID
642 NTAPI
644  _In_ PVOID HwDeviceExtension,
647 
650 PVOID
651 NTAPI
653  _In_ PVOID HwDeviceExtension,
655 
659 ULONG
660 NTAPI
666 
668 VOID
669 NTAPI
671  _In_ PVOID HwDeviceExtension,
673  _In_ PVOID LogicalAddress,
674  _In_ ULONG Length);
675 
677 VOID
678 NTAPI
680  _In_ PVOID HwDeviceExtension,
682  _In_ UCHAR PathId,
684  _In_ UCHAR Lun,
686  _In_ ULONG UniqueId);
687 
689 VOID
690 __cdecl
692  _In_ SCSI_NOTIFICATION_TYPE NotificationType,
693  _In_ PVOID HwDeviceExtension,
694  ...);
695 
697 VOID
698 NTAPI
700  _Out_ PLARGE_INTEGER CurrentTime);
701 
704 ULONG
705 NTAPI
707  _In_ PVOID DeviceExtension,
708  _In_ ULONG BusDataType,
709  _In_ ULONG SystemIoBusNumber,
712  _In_ ULONG Offset,
713  _In_ ULONG Length);
714 
716 VOID
717 NTAPI
719  _In_ ULONG Delay);
720 
723 BOOLEAN
724 NTAPI
726  _In_ PVOID HwDeviceExtension,
728  _In_ ULONG SystemIoBusNumber,
729  _In_ SCSI_PHYSICAL_ADDRESS IoAddress,
731  _In_ BOOLEAN InIoSpace);
732 
734 VOID
735 __cdecl
737  ULONG DebugPrintLevel,
738  PCCHAR DebugMessage,
739  ...);
740 
741 #if defined(_M_AMD64)
742 
743 #define ScsiPortReadPortUchar READ_PORT_UCHAR
744 #define ScsiPortReadPortUshort READ_PORT_USHORT
745 #define ScsiPortReadPortUlong READ_PORT_ULONG
746 
747 #define ScsiPortReadPortBufferUchar READ_PORT_BUFFER_UCHAR
748 #define ScsiPortReadPortBufferUshort READ_PORT_BUFFER_USHORT
749 #define ScsiPortReadPortBufferUlong READ_PORT_BUFFER_ULONG
750 
751 #define ScsiPortReadRegisterUchar READ_REGISTER_UCHAR
752 #define ScsiPortReadRegisterUshort READ_REGISTER_USHORT
753 #define ScsiPortReadRegisterUlong READ_REGISTER_ULONG
754 
755 #define ScsiPortReadRegisterBufferUchar READ_REGISTER_BUFFER_UCHAR
756 #define ScsiPortReadRegisterBufferUshort READ_REGISTER_BUFFER_USHORT
757 #define ScsiPortReadRegisterBufferUlong READ_REGISTER_BUFFER_ULONG
758 
759 #define ScsiPortWritePortUchar WRITE_PORT_UCHAR
760 #define ScsiPortWritePortUshort WRITE_PORT_USHORT
761 #define ScsiPortWritePortUlong WRITE_PORT_ULONG
762 
763 #define ScsiPortWritePortBufferUchar WRITE_PORT_BUFFER_UCHAR
764 #define ScsiPortWritePortBufferUshort WRITE_PORT_BUFFER_USHORT
765 #define ScsiPortWritePortBufferUlong WRITE_PORT_BUFFER_ULONG
766 
767 #define ScsiPortWriteRegisterUchar WRITE_REGISTER_UCHAR
768 #define ScsiPortWriteRegisterUshort WRITE_REGISTER_USHORT
769 #define ScsiPortWriteRegisterUlong WRITE_REGISTER_ULONG
770 
771 #define ScsiPortWriteRegisterBufferUchar WRITE_REGISTER_BUFFER_UCHAR
772 #define ScsiPortWriteRegisterBufferUshort WRITE_REGISTER_BUFFER_USHORT
773 #define ScsiPortWriteRegisterBufferUlong WRITE_REGISTER_BUFFER_ULONG
774 
775 #define ScsiPortMoveMemory memmove
776 
777 #else
778 
781 UCHAR
782 NTAPI
784  _In_ PUCHAR Port);
785 
788 ULONG
789 NTAPI
791  _In_ PULONG Port);
792 
795 USHORT
796 NTAPI
798  _In_ PUSHORT Port);
799 
801 VOID
802 NTAPI
804  _In_ PUCHAR Port,
806  _In_ ULONG Count);
807 
809 VOID
810 NTAPI
812  _In_ PULONG Port,
814  _In_ ULONG Count);
815 
817 VOID
818 NTAPI
820  _In_ PUSHORT Port,
822  _In_ ULONG Count);
823 
826 UCHAR
827 NTAPI
829  _In_ PUCHAR Register);
830 
833 ULONG
834 NTAPI
836  _In_ PULONG Register);
837 
840 USHORT
841 NTAPI
843  _In_ PUSHORT Register);
844 
846 VOID
847 NTAPI
849  _In_ PUCHAR Register,
851  _In_ ULONG Count);
852 
854 VOID
855 NTAPI
857  _In_ PULONG Register,
859  _In_ ULONG Count);
860 
862 VOID
863 NTAPI
865  _In_ PUSHORT Register,
867  _In_ ULONG Count);
868 
870 VOID
871 NTAPI
873  _In_ PUCHAR Port,
874  _In_ UCHAR Value);
875 
877 VOID
878 NTAPI
880  _In_ PULONG Port,
881  _In_ ULONG Value);
882 
884 VOID
885 NTAPI
887  _In_ PUSHORT Port,
888  _In_ USHORT Value);
889 
891 VOID
892 NTAPI
894  _In_ PUCHAR Port,
896  _In_ ULONG Count);
897 
899 VOID
900 NTAPI
902  _In_ PULONG Port,
904  _In_ ULONG Count);
905 
907 VOID
908 NTAPI
910  _In_ PUSHORT Port,
912  _In_ ULONG Count);
913 
915 VOID
916 NTAPI
918  _In_ PUCHAR Register,
919  _In_ UCHAR Value);
920 
922 VOID
923 NTAPI
925  _In_ PULONG Register,
926  _In_ ULONG Value);
927 
929 VOID
930 NTAPI
932  _In_ PUSHORT Register,
933  _In_ USHORT Value);
934 
936 VOID
937 NTAPI
939  _In_ PUCHAR Register,
941  _In_ ULONG Count);
942 
944 VOID
945 NTAPI
947  _In_ PULONG Register,
949  _In_ ULONG Count);
950 
952 VOID
953 NTAPI
955  _In_ PUSHORT Register,
957  _In_ ULONG Count);
958 
960 VOID
961 NTAPI
965  _In_ ULONG Length);
966 
967 #endif /* defined(_M_AMD64) */
968 
969 #ifdef __cplusplus
970 }
971 #endif
972 
973 #endif /* _NTSRB_ */
SCSIPORT_API UCHAR NTAPI ScsiPortReadRegisterUchar(IN PUCHAR Register)
Definition: scsiport.c:1433
struct _SCSI_POWER_REQUEST_BLOCK SCSI_POWER_REQUEST_BLOCK
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
signed char * PCHAR
Definition: retypes.h:7
PHW_ADAPTER_STATE HwAdapterState
Definition: srb.h:565
SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterBufferUshort(IN PUSHORT Register, IN PUSHORT Buffer, IN ULONG Count)
Definition: scsiport.c:1580
_Must_inspect_result_ _In_ PVOID Argument2
Definition: srb.h:663
CPPORT Port[4]
Definition: headless.c:34
SCSIPORT_API VOID NTAPI ScsiPortLogError(IN PVOID HwDeviceExtension, IN PSCSI_REQUEST_BLOCK Srb OPTIONAL, IN UCHAR PathId, IN UCHAR TargetId, IN UCHAR Lun, IN ULONG ErrorCode, IN ULONG UniqueId)
Definition: scsiport.c:1283
SCSIPORT_API VOID NTAPI ScsiPortWritePortUlong(IN PULONG Port, IN ULONG Value)
Definition: scsiport.c:1540
#define _Must_inspect_result_
Definition: no_sal2.h:314
struct _ACCESS_RANGE ACCESS_RANGE
BOOLEAN BufferAccessScsiPortControlled
Definition: srb.h:90
struct _STOR_DEVICE_CAPABILITIES * PSTOR_DEVICE_CAPABILITIES
INTERFACE_TYPE AdapterInterfaceType
Definition: srb.h:55
struct _SCSI_WMI_REQUEST_BLOCK SCSI_WMI_REQUEST_BLOCK
_In_ NDIS_ERROR_CODE ErrorCode
Definition: ndis.h:4436
ULONG SrbFlags
Definition: srb.h:252
PVOID SrbExtension
Definition: srb.h:259
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
_IRQL_requires_same_ _In_opt_ PVOID Argument1
Definition: cmtypes.h:694
PVOID OriginalRequest
Definition: srb.h:258
UCHAR Cdb[16]
Definition: srb.h:271
SCSIPORT_API ULONG NTAPI ScsiPortInitialize(IN PVOID Argument1, IN PVOID Argument2, IN struct _HW_INITIALIZATION_DATA *HwInitializationData, IN PVOID HwContext)
Definition: scsiport.c:1008
enum _SCSI_ADAPTER_CONTROL_TYPE * PSCSI_ADAPTER_CONTROL_TYPE
enum _SCSI_ADAPTER_CONTROL_STATUS SCSI_ADAPTER_CONTROL_STATUS
#define __cdecl
Definition: accygwin.h:79
enum _SCSI_NOTIFICATION_TYPE SCSI_NOTIFICATION_TYPE
USHORT PortVersionFlags
Definition: srb.h:531
SCSIPORT_API PVOID NTAPI ScsiPortGetVirtualAddress(IN PVOID HwDeviceExtension, IN SCSI_PHYSICAL_ADDRESS PhysicalAddress)
Definition: scsiport.c:806
struct _SCSI_REQUEST_BLOCK * PSCSI_REQUEST_BLOCK
_STOR_PNP_ACTION
Definition: srb.h:379
SCSIPORT_API ULONG NTAPI ScsiPortGetBusData(IN PVOID DeviceExtension, IN ULONG BusDataType, IN ULONG SystemIoBusNumber, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Length)
Definition: scsiport.c:549
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE BusType
Definition: halfuncs.h:156
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR PathId
Definition: classpnp.h:1117
BOOLEAN(NTAPI * PHW_RESET_BUS)(IN PVOID DeviceExtension, IN ULONG PathId)
Definition: srb.h:471
_STOR_DEVICE_POWER_STATE
Definition: srb.h:335
SCSIPORT_API PVOID NTAPI ScsiPortGetLogicalUnit(IN PVOID HwDeviceExtension, IN UCHAR PathId, IN UCHAR TargetId, IN UCHAR Lun)
Definition: scsiport.c:594
enum _SCSI_NOTIFICATION_TYPE * PSCSI_NOTIFICATION_TYPE
PVOID DataBuffer
Definition: srb.h:255
PVOID OriginalRequest
Definition: srb.h:297
#define _ANONYMOUS_UNION
Definition: ntbasedef.h:30
_SCSI_NOTIFICATION_TYPE
Definition: srb.h:522
_In_ ULONG _In_ BOOLEAN _In_ ULONG _In_ UCHAR _In_ UCHAR TargetId
Definition: classpnp.h:1117
unsigned char * PUCHAR
Definition: retypes.h:3
ULONG DataTransferLength
Definition: srb.h:253
SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterUchar(IN PUCHAR Register, IN UCHAR Value)
Definition: scsiport.c:1591
SCSIPORT_API VOID NTAPI ScsiPortWritePortBufferUchar(IN PUCHAR Port, IN PUCHAR Buffer, IN ULONG Count)
Definition: scsiport.c:1501
ULONG HwInitializationDataSize
Definition: srb.h:542
#define ReadBuffer(BaseIoAddress, Buffer, Count)
Definition: atapi.h:339
_Must_inspect_result_ _In_ PVOID _In_ struct _HW_INITIALIZATION_DATA _In_ PVOID HwContext
Definition: srb.h:664
struct _HW_INITIALIZATION_DATA HW_INITIALIZATION_DATA
enum _STOR_PNP_ACTION STOR_PNP_ACTION
ULONG DeviceExtensionSize
Definition: srb.h:566
enum _DMA_WIDTH DMA_WIDTH
SCSIPORT_API VOID NTAPI ScsiPortReadRegisterBufferUshort(IN PUSHORT Register, IN PUSHORT Buffer, IN ULONG Count)
Definition: scsiport.c:1422
_Inout_ __drv_aliasesMem PSLIST_ENTRY _Inout_ PSLIST_ENTRY _In_ ULONG Count
Definition: exfuncs.h:1015
SCSIPORT_API SCSI_PHYSICAL_ADDRESS NTAPI ScsiPortGetPhysicalAddress(IN PVOID HwDeviceExtension, IN PSCSI_REQUEST_BLOCK Srb, IN PVOID VirtualAddress, OUT ULONG *Length)
Definition: scsiport.c:607
UCHAR CdbLength
Definition: srb.h:250
PHW_DMA_STARTED HwDmaStarted
Definition: srb.h:564
BOOLEAN MultipleRequestPerLu
Definition: srb.h:576
PHW_FIND_ADAPTER HwFindAdapter
Definition: srb.h:562
SCSIPORT_API VOID NTAPI ScsiPortMoveMemory(IN PVOID WriteBuffer, IN PVOID ReadBuffer, IN ULONG Length)
Definition: scsiport.c:1298
USHORT DeviceIdLength
Definition: srb.h:581
SCSIPORT_API VOID NTAPI ScsiPortWritePortUshort(IN PUSHORT Port, IN USHORT Value)
Definition: scsiport.c:1549
ACCESS_RANGE(* AccessRanges)[]
Definition: srb.h:70
ULONG SpecificLuExtensionSize
Definition: srb.h:567
struct _SCSI_REQUEST_BLOCK * NextSrb
Definition: srb.h:257
UCHAR QueueAction
Definition: srb.h:249
ULONG LinkTimeoutValue
Definition: srb.h:299
PHW_RESET_BUS HwResetBus
Definition: srb.h:563
SCSIPORT_API VOID NTAPI ScsiPortReadPortBufferUlong(IN PULONG Port, IN PULONG Buffer, IN ULONG Count)
Definition: stubs.c:74
SCSIPORT_API PSCSI_REQUEST_BLOCK NTAPI ScsiPortGetSrb(IN PVOID DeviceExtension, IN UCHAR PathId, IN UCHAR TargetId, IN UCHAR Lun, IN LONG QueueTag)
Definition: scsiport.c:643
ULONG TimeOutValue
Definition: srb.h:254
_STOR_POWER_ACTION
Definition: srb.h:344
SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterUlong(IN PULONG Register, IN ULONG Value)
Definition: scsiport.c:1600
_Field_size_bytes_(DataTransferLength) PVOID DataBuffer
UCHAR SrbStatus
Definition: srb.h:243
#define _In_opt_
Definition: no_sal2.h:213
BOOLEAN(NTAPI * PHW_ADAPTER_STATE)(IN PVOID DeviceExtension, IN PVOID Context, IN BOOLEAN SaveState)
Definition: srb.h:478
SCSIPORT_API ULONG NTAPI ScsiPortReadPortUlong(IN PULONG Port)
Definition: scsiport.c:1384
BOOLEAN AutoRequestSense
Definition: srb.h:575
BOOLEAN TaggedQueuing
Definition: srb.h:574
OUT BOOLEAN SupportedTypeList[0]
Definition: srb.h:213
uint32_t ULONG_PTR
Definition: typedefs.h:63
SCSIPORT_API BOOLEAN NTAPI ScsiPortValidateRange(IN PVOID HwDeviceExtension, IN INTERFACE_TYPE BusType, IN ULONG SystemIoBusNumber, IN SCSI_PHYSICAL_ADDRESS IoAddress, IN ULONG NumberOfBytes, IN BOOLEAN InIoSpace)
Definition: scsiport.c:1481
struct _SCSI_REQUEST_BLOCK * NextSrb
Definition: srb.h:417
enum _STOR_DEVICE_POWER_STATE STOR_DEVICE_POWER_STATE
struct _SCSI_PNP_REQUEST_BLOCK * PSCSI_PNP_REQUEST_BLOCK
SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterBufferUlong(IN PULONG Register, IN PULONG Buffer, IN ULONG Count)
Definition: scsiport.c:1569
SCSIPORT_API SCSI_PHYSICAL_ADDRESS NTAPI ScsiPortConvertUlongToPhysicalAddress(ULONG UlongAddress)
BOOLEAN NeedPhysicalAddresses
Definition: srb.h:573
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
BOOLEAN(NTAPI * PHW_INITIALIZE)(IN PVOID DeviceExtension)
Definition: srb.h:429
long LONG
Definition: pedump.c:60
UCHAR WMISubFunction
Definition: srb.h:284
PHW_INTERRUPT HwInterrupt
Definition: srb.h:561
SCSIPORT_API ULONG NTAPI ScsiPortReadRegisterUlong(IN PULONG Register)
Definition: scsiport.c:1441
UCHAR ScsiStatus
Definition: srb.h:244
USHORT VendorIdLength
Definition: srb.h:578
enum _STOR_DEVICE_POWER_STATE * PSTOR_DEVICE_POWER_STATE
SCSIPORT_API VOID NTAPI ScsiPortWritePortUchar(IN PUCHAR Port, IN UCHAR Value)
Definition: scsiport.c:1531
ULONG DataTransferLength
Definition: srb.h:292
USHORT ReservedUshort
Definition: srb.h:580
unsigned char BOOLEAN
PHW_STARTIO HwStartIo
Definition: srb.h:560
UCHAR Reserved4[16]
Definition: srb.h:424
enum _KINTERRUPT_MODE KINTERRUPT_MODE
static WCHAR Address[46]
Definition: ping.c:68
SCSIPORT_API VOID NTAPI ScsiPortReadPortBufferUshort(IN PUSHORT Port, IN PUSHORT Buffer, IN ULONG Count)
Definition: stubs.c:64
#define _Out_
Definition: no_sal2.h:323
struct _SCSI_PNP_REQUEST_BLOCK SCSI_PNP_REQUEST_BLOCK
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
SCSIPORT_API USHORT NTAPI ScsiPortReadPortUshort(IN PUSHORT Port)
Definition: scsiport.c:1392
enum _STOR_POWER_ACTION STOR_POWER_ACTION
KINTERRUPT_MODE InterruptMode2
Definition: srb.h:97
Definition: bufpool.h:45
UCHAR QueueTag
Definition: srb.h:248
UCHAR TargetId
Definition: srb.h:246
UCHAR Reserved2[2]
Definition: srb.h:290
KINTERRUPT_MODE InterruptMode
Definition: srb.h:60
SCSIPORT_API VOID NTAPI ScsiPortReadRegisterBufferUchar(IN PUCHAR Register, IN PUCHAR Buffer, IN ULONG Count)
Definition: scsiport.c:1400
Definition: srb.h:499
SCSIPORT_API VOID NTAPI ScsiPortCompleteRequest(IN PVOID HwDeviceExtension, IN UCHAR PathId, IN UCHAR TargetId, IN UCHAR Lun, IN UCHAR SrbStatus)
Definition: scsiport.c:498
struct _SCSI_WMI_REQUEST_BLOCK * PSCSI_WMI_REQUEST_BLOCK
BOOLEAN ReceiveEvent
Definition: srb.h:577
ULONG DataTransferLength
Definition: srb.h:365
struct _SCSI_SUPPORTED_CONTROL_TYPE_LIST * PSCSI_SUPPORTED_CONTROL_TYPE_LIST
SCSI_ADAPTER_CONTROL_STATUS(NTAPI * PHW_ADAPTER_CONTROL)(IN PVOID DeviceExtension, IN SCSI_ADAPTER_CONTROL_TYPE ControlType, IN PVOID Parameters)
Definition: srb.h:486
struct _ACCESS_RANGE * PACCESS_RANGE
UCHAR Function
Definition: srb.h:242
BOOLEAN(NTAPI * PHW_STARTIO)(IN PVOID DeviceExtension, IN PSCSI_REQUEST_BLOCK Srb)
Definition: srb.h:435
BOOLEAN AtdiskSecondaryClaimed
Definition: srb.h:79
_SCSI_ADAPTER_CONTROL_TYPE
Definition: srb.h:168
USHORT Length
Definition: srb.h:241
#define _Inout_
Definition: no_sal2.h:244
_In_ ULONG _In_ ULONG _In_ ULONG Length
Definition: ntddpcm.h:101
PVOID SenseInfoBuffer
Definition: srb.h:416
struct _SCSI_REQUEST_BLOCK SCSI_REQUEST_BLOCK
_ANONYMOUS_UNION union _HW_INITIALIZATION_DATA::@2121 DUMMYUNIONNAME
SCSI_PHYSICAL_ADDRESS RangeStart
Definition: srb.h:41
SCSIPORT_API ULONG NTAPI ScsiPortSetBusDataByOffset(IN PVOID DeviceExtension, IN ULONG BusDataType, IN ULONG SystemIoBusNumber, IN ULONG SlotNumber, IN PVOID Buffer, IN ULONG Offset, IN ULONG Length)
Definition: scsiport.c:1457
_In_opt_ PUNICODE_STRING _In_ PDRIVER_OBJECT _In_ PDEVICE_OBJECT _In_ INTERFACE_TYPE _In_ ULONG _In_ ULONG SlotNumber
Definition: halfuncs.h:156
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS PhysicalAddress
Definition: iotypes.h:1061
SCSIPORT_API VOID NTAPI ScsiPortReadPortBufferUchar(IN PUCHAR Port, IN PUCHAR Buffer, IN ULONG Count)
Definition: stubs.c:54
unsigned char UCHAR
Definition: xmlstorage.h:181
struct _PORT_CONFIGURATION_INFORMATION PORT_CONFIGURATION_INFORMATION
BOOLEAN RangeInMemory
Definition: srb.h:43
char * PBOOLEAN
Definition: retypes.h:11
_In_ PPCI_DEVICE_PRESENCE_PARAMETERS Parameters
Definition: iotypes.h:872
Definition: srb.h:500
_ANONYMOUS_UNION union _SCSI_REQUEST_BLOCK::@2120 DUMMYUNIONNAME
PHYSICAL_ADDRESS SCSI_PHYSICAL_ADDRESS
Definition: srb.h:38
#define VOID
Definition: acefi.h:82
ULONG InternalStatus
Definition: srb.h:261
PVOID OriginalRequest
Definition: srb.h:418
_In_ ULONG _In_ BOOLEAN _Must_inspect_result_ PVOID * VirtualAddress
Definition: ndis.h:3791
struct _HW_INITIALIZATION_DATA * PHW_INITIALIZATION_DATA
#define PASSIVE_LEVEL
Definition: env_spec_w32.h:693
#define _In_reads_bytes_(size)
Definition: no_sal2.h:229
ULONG NumberOfAccessRanges
Definition: srb.h:569
#define SaveState(State)
STOR_POWER_ACTION PowerAction
Definition: srb.h:372
enum _DMA_SPEED DMA_SPEED
SCSIPORT_API PVOID NTAPI ScsiPortGetDeviceBase(IN PVOID HwDeviceExtension, IN INTERFACE_TYPE BusType, IN ULONG SystemIoBusNumber, IN SCSI_PHYSICAL_ADDRESS IoAddress, IN ULONG NumberOfBytes, IN BOOLEAN InIoSpace)
Definition: scsiport.c:562
PHYSICAL_ADDRESS * PSCSI_PHYSICAL_ADDRESS
Definition: srb.h:38
#define _In_
Definition: no_sal2.h:204
UCHAR SenseInfoBufferLength
Definition: srb.h:251
enum _SCSI_ADAPTER_CONTROL_STATUS * PSCSI_ADAPTER_CONTROL_STATUS
PHW_ADAPTER_CONTROL HwAdapterControl
Definition: srb.h:535
UCHAR Reserved5[16]
Definition: srb.h:376
SCSIPORT_API VOID NTAPI ScsiPortWritePortBufferUshort(IN PUSHORT Port, IN PUSHORT Buffer, IN ULONG Count)
Definition: scsiport.c:1521
UCHAR PathId
Definition: srb.h:245
_Must_inspect_result_ _IRQL_requires_max_(PASSIVE_LEVEL) SCSIPORTAPI ULONG NTAPI ScsiPortInitialize(_In_ PVOID Argument1
Definition: Messaging.c:64
SCSIPORT_API VOID NTAPI ScsiPortFreeDeviceBase(IN PVOID HwDeviceExtension, IN PVOID MappedAddress)
Definition: scsiport.c:540
unsigned short USHORT
Definition: pedump.c:61
Definition: srb.h:531
SCSIPORT_API VOID __cdecl ScsiDebugPrint(ULONG DebugPrintLevel, PCCHAR DebugMessage,...)
ULONG RangeLength
Definition: srb.h:42
ULONG SrbExtensionSize
Definition: srb.h:568
unsigned int * PULONG
Definition: retypes.h:1
BOOLEAN(NTAPI * PHW_INTERRUPT)(IN PVOID DeviceExtension)
Definition: srb.h:442
#define ScsiPortConvertPhysicalAddressToUlong(Address)
Definition: srb.h:561
enum _STOR_PNP_ACTION * PSTOR_PNP_ACTION
SCSIPORT_API VOID NTAPI ScsiPortWritePortBufferUlong(IN PULONG Port, IN PULONG Buffer, IN ULONG Count)
Definition: scsiport.c:1511
PHW_INITIALIZE HwInitialize
Definition: srb.h:559
struct _SCSI_REQUEST_BLOCK * NextSrb
Definition: srb.h:369
enum _SCSI_ADAPTER_CONTROL_TYPE SCSI_ADAPTER_CONTROL_TYPE
_SCSI_ADAPTER_CONTROL_STATUS
Definition: srb.h:182
SCSIPORT_API UCHAR NTAPI ScsiPortReadPortUchar(IN PUCHAR Port)
Definition: scsiport.c:1374
PVOID SenseInfoBuffer
Definition: srb.h:256
#define BOOLEAN
Definition: pedump.c:73
VOID(NTAPI * PHW_TIMER)(IN PVOID DeviceExtension)
Definition: srb.h:448
#define SCSIPORTAPI
Definition: srb.h:541
INTERFACE_TYPE AdapterInterfaceType
Definition: srb.h:557
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS _Inout_ PLARGE_INTEGER NumberOfBytes
Definition: iotypes.h:998
struct tagContext Context
Definition: acpixf.h:1024
unsigned int ULONG
Definition: retypes.h:1
struct _STOR_DEVICE_CAPABILITIES STOR_DEVICE_CAPABILITIES
SCSIPORT_API VOID __cdecl ScsiPortNotification(IN SCSI_NOTIFICATION_TYPE NotificationType, IN PVOID HwDeviceExtension,...)
Definition: scsiport.c:1869
BOOLEAN MapBuffers
Definition: srb.h:572
struct _SCSI_POWER_REQUEST_BLOCK * PSCSI_POWER_REQUEST_BLOCK
SCSIPORT_API VOID NTAPI ScsiPortFlushDma(IN PVOID DeviceExtension)
Definition: scsiport.c:531
SCSIPORT_API VOID NTAPI ScsiPortReadRegisterBufferUlong(IN PULONG Register, IN PULONG Buffer, IN ULONG Count)
Definition: scsiport.c:1411
struct _SCSI_SUPPORTED_CONTROL_TYPE_LIST SCSI_SUPPORTED_CONTROL_TYPE_LIST
IN PSCSI_REQUEST_BLOCK Srb
Definition: class2.h:49
ULONG DataTransferLength
Definition: srb.h:413
SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterUshort(IN PUSHORT Register, IN USHORT Value)
Definition: scsiport.c:1609
SCSIPORT_API PVOID NTAPI ScsiPortGetUncachedExtension(IN PVOID HwDeviceExtension, IN PPORT_CONFIGURATION_INFORMATION ConfigInfo, IN ULONG NumberOfBytes)
Definition: scsiport.c:721
UCHAR Reserved5[16]
Definition: srb.h:300
UCHAR PnPSubFunction
Definition: srb.h:407
enum _STOR_POWER_ACTION * PSTOR_POWER_ACTION
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:460
SCSIPORT_API VOID NTAPI ScsiPortStallExecution(IN ULONG Delay)
Definition: scsiport.c:1473
STOR_DEVICE_POWER_STATE DevicePowerState
Definition: srb.h:363
unsigned short * PUSHORT
Definition: retypes.h:2
ULONG QueueSortKey
Definition: srb.h:262
#define WriteBuffer(BaseIoAddress, Buffer, Count)
Definition: atapi.h:344
SCSIPORT_API VOID NTAPI ScsiPortWriteRegisterBufferUchar(IN PUCHAR Register, IN PUCHAR Buffer, IN ULONG Count)
Definition: scsiport.c:1558
VOID(NTAPI * PHW_DMA_STARTED)(IN PVOID DeviceExtension)
Definition: srb.h:454
SCSIPORT_API USHORT NTAPI ScsiPortReadRegisterUshort(IN PUSHORT Register)
Definition: scsiport.c:1449
_Must_inspect_result_ _In_ PVOID _In_ struct _HW_INITIALIZATION_DATA * HwInitializationData
Definition: srb.h:664
SCSIPORTAPI VOID NTAPI ScsiPortQuerySystemTime(_Out_ PLARGE_INTEGER CurrentTime)
SCSIPORT_API VOID NTAPI ScsiPortIoMapTransfer(IN PVOID HwDeviceExtension, IN PSCSI_REQUEST_BLOCK Srb, IN PVOID LogicalAddress, IN ULONG Length)
Definition: scsiport.c:1271
struct _PORT_CONFIGURATION_INFORMATION * PPORT_CONFIGURATION_INFORMATION