ReactOS  0.4.14-dev-384-g5b37caa
scsiport_int.h
Go to the documentation of this file.
1 /*
2  * SCSI_PORT_TIMER_STATES
3  *
4  * DESCRIPTION
5  * An enumeration containing the states in the timer DFA
6  */
7 
8 #pragma once
9 
10 #define VERSION "0.0.3"
11 
12 #ifndef PAGE_ROUND_UP
13 #define PAGE_ROUND_UP(x) ( (((ULONG_PTR)x)%PAGE_SIZE) ? ((((ULONG_PTR)x)&(~(PAGE_SIZE-1)))+PAGE_SIZE) : ((ULONG_PTR)x) )
14 #endif
15 #ifndef ROUND_UP
16 #define ROUND_UP(N, S) ((((N) + (S) - 1) / (S)) * (S))
17 #endif
18 
19 #define TAG_SCSIPORT 'ISCS'
20 
21 /* Defines how many logical unit arrays will be in a device extension */
22 #define LUS_NUMBER 8
23 
24 #define MAX_SG_LIST 17
25 
26 /* Flags */
27 #define SCSI_PORT_DEVICE_BUSY 0x0001
28 #define SCSI_PORT_LU_ACTIVE 0x0002
29 #define SCSI_PORT_NOTIFICATION_NEEDED 0x0004
30 #define SCSI_PORT_NEXT_REQUEST_READY 0x0008
31 #define SCSI_PORT_FLUSH_ADAPTERS 0x0010
32 #define SCSI_PORT_MAP_TRANSFER 0x0020
33 #define SCSI_PORT_RESET 0x0080
34 #define SCSI_PORT_RESET_REQUEST 0x0100
35 #define SCSI_PORT_RESET_REPORTED 0x0200
36 #define SCSI_PORT_REQUEST_PENDING 0x0800
37 #define SCSI_PORT_DISCONNECT_ALLOWED 0x1000
38 #define SCSI_PORT_DISABLE_INT_REQUESET 0x2000
39 #define SCSI_PORT_DISABLE_INTERRUPTS 0x4000
40 #define SCSI_PORT_ENABLE_INT_REQUEST 0x8000
41 #define SCSI_PORT_TIMER_NEEDED 0x10000
42 
43 /* LUN Extension flags*/
44 #define LUNEX_FROZEN_QUEUE 0x0001
45 #define LUNEX_NEED_REQUEST_SENSE 0x0004
46 #define LUNEX_BUSY 0x0008
47 #define LUNEX_FULL_QUEUE 0x0010
48 #define LUNEX_REQUEST_PENDING 0x0020
49 #define SCSI_PORT_SCAN_IN_PROGRESS 0x8000
50 
51 
53 {
59 
60 typedef struct _CONFIGURATION_INFO
61 {
62  /* Identify info */
66 
67  /* Registry related */
71 
72  /* Features */
75 
76  /* Parameters */
80 
81 typedef struct _SCSI_PORT_DEVICE_BASE
82 {
84 
90 
91 typedef struct _SCSI_SG_ADDRESS
92 {
96 
98 {
103 
105 
106  /* DMA stuff */
109 
111 
112  /* Scatter-gather list */
116 
118 {
122 
124 
126 
129 
131 
136 
139 
142 
145 
147 
148  /* More data? */
149 
150  UCHAR MiniportLunExtension[1]; /* must be the last entry */
152 
153 /* Structures for inquiries support */
154 
155 typedef struct _SCSI_LUN_INFO
156 {
165 
166 typedef struct _SCSI_BUS_SCAN_INFO
167 {
173 
175 {
179 
180 
182 {
183  ULONG Flags; /* Interrupt-time flags */
184  PSCSI_REQUEST_BLOCK_INFO CompletedRequests; /* Linked list of Srb info data */
190 
191 
192 /* Only for interrupt data saving function */
194 {
198 
199 /*
200  * SCSI_PORT_DEVICE_EXTENSION
201  *
202  * DESCRIPTION
203  * First part of the port objects device extension. The second
204  * part is the miniport-specific device extension.
205  */
206 
208 {
215 
219 
223 
224  KSPIN_LOCK IrqLock; /* Used when there are 2 irqs */
225  ULONG SequenceNumber; /* Global sequence number for packets */
230 
233 
236 
238 
241 
243 
244  /* SRB extension stuff*/
248 
249  /* SRB information */
253 
255 
258 
265 
269 
270  /* DMA related stuff */
276 
277  /* Features */
283 
288 
291 
293 
295 
296  UCHAR MiniPortDeviceExtension[1]; /* must be the last entry */
298 
299 typedef struct _RESETBUS_PARAMS
300 {
PCONTROLLER_OBJECT ControllerObject
Definition: scsiport_int.h:257
struct _SCSI_REQUEST_BLOCK_INFO * CompletedRequests
Definition: scsiport_int.h:110
signed char * PCHAR
Definition: retypes.h:7
#define MAX_SG_LIST
Definition: scsiport_int.h:24
PSCSI_LUN_INFO LunInfo
Definition: scsiport_int.h:171
KDEVICE_QUEUE DeviceQueue
Definition: scsiport_int.h:132
PSCSI_PORT_DEVICE_EXTENSION DeviceExtension
Definition: scsiport_int.h:302
BOOLEAN DisableMultipleLun
Definition: scsiport_int.h:74
BOOLEAN(NTAPI * PHW_RESET_BUS)(IN PVOID DeviceExtension, IN ULONG PathId)
Definition: srb.h:471
SCSI_PHYSICAL_ADDRESS IoAddress
Definition: scsiport_int.h:87
struct _RESETBUS_PARAMS RESETBUS_PARAMS
struct _RESETBUS_PARAMS * PRESETBUS_PARAMS
PDEVICE_OBJECT DeviceObject
Definition: scsiport_int.h:128
struct _SCSI_PORT_DEVICE_EXTENSION SCSI_PORT_DEVICE_EXTENSION
PSCSI_REQUEST_BLOCK_INFO CompletedRequests
Definition: scsiport_int.h:184
struct _SCSI_PORT_INTERRUPT_DATA SCSI_PORT_INTERRUPT_DATA
PADAPTER_OBJECT AdapterObject
Definition: scsiport_int.h:271
struct _SCSI_LUN_INFO * PSCSI_LUN_INFO
struct _SCSI_PORT_LUN_EXTENSION * PSCSI_PORT_LUN_EXTENSION
struct _SCSI_PORT_LUN_EXTENSION * Next
Definition: scsiport_int.h:125
BOOLEAN(NTAPI * PHW_INITIALIZE)(IN PVOID DeviceExtension)
Definition: srb.h:429
struct _SCSI_BUS_SCAN_INFO SCSI_BUS_SCAN_INFO
long LONG
Definition: pedump.c:60
struct _CONFIGURATION_INFO CONFIGURATION_INFO
PSCSI_BUS_SCAN_INFO BusScanInfo[1]
Definition: scsiport_int.h:177
PSCSI_REQUEST_BLOCK_INFO SrbInfo
Definition: scsiport_int.h:250
unsigned char BOOLEAN
#define INQUIRYDATABUFFERSIZE
Definition: cdrw_hw.h:1113
PACCESS_RANGE AccessRanges
Definition: scsiport_int.h:78
PSCSI_SG_ADDRESS ScatterGather
Definition: scsiport_int.h:113
struct _SCSI_PORT_LUN_EXTENSION SCSI_PORT_LUN_EXTENSION
PMAPPED_ADDRESS MappedAddressList
Definition: scsiport_int.h:237
UCHAR InquiryData[INQUIRYDATABUFFERSIZE]
Definition: scsiport_int.h:163
struct _SCSI_SG_ADDRESS SCSI_SG_ADDRESS
PSCSI_REQUEST_BLOCK_INFO FreeSrbInfo
Definition: scsiport_int.h:251
struct _SCSI_PORT_DEVICE_BASE * PSCSI_PORT_DEVICE_BASE
struct _SCSI_PORT_INTERRUPT_DATA * PSCSI_PORT_INTERRUPT_DATA
PPORT_CONFIGURATION_INFORMATION PortConfig
Definition: scsiport_int.h:211
BOOLEAN DeviceClaimed
Definition: scsiport_int.h:160
struct _SCSI_SG_ADDRESS * PSCSI_SG_ADDRESS
SCSI_REQUEST_BLOCK_INFO SrbInfo
Definition: scsiport_int.h:146
BOOLEAN(NTAPI * PHW_STARTIO)(IN PVOID DeviceExtension, IN PSCSI_REQUEST_BLOCK Srb)
Definition: srb.h:435
IO_SCSI_CAPABILITIES PortCapabilities
Definition: scsiport_int.h:254
_SCSI_PORT_TIMER_STATES
Definition: scsiport_int.h:52
PSCSI_PORT_INTERRUPT_DATA InterruptData
Definition: scsiport_int.h:195
struct _SCSI_BUS_SCAN_INFO * PSCSI_BUS_SCAN_INFO
struct _SCSI_REQUEST_BLOCK_INFO * PSCSI_REQUEST_BLOCK_INFO
struct _SCSI_PORT_DEVICE_EXTENSION * PSCSI_PORT_DEVICE_EXTENSION
unsigned char UCHAR
Definition: xmlstorage.h:181
enum _SCSI_PORT_TIMER_STATES SCSI_PORT_TIMER_STATES
PSCSI_PORT_LUN_EXTENSION CompletedAbort
Definition: scsiport_int.h:185
Definition: ketypes.h:687
PHYSICAL_ADDRESS PhysicalAddress
Definition: scsiport_int.h:284
struct _SCSI_PORT_LUN_EXTENSION * CompletedAbortRequests
Definition: scsiport_int.h:144
Definition: typedefs.h:117
SCSI_PORT_TIMER_STATES TimerState
Definition: scsiport_int.h:231
PSCSI_REQUEST_BLOCK Srb
Definition: scsiport_int.h:100
PHYSICAL_ADDRESS PhysicalAddress
Definition: scsiport_int.h:93
SCSI_SG_ADDRESS ScatterGatherList[MAX_SG_LIST]
Definition: scsiport_int.h:114
struct _SCSI_REQUEST_BLOCK_INFO SCSI_REQUEST_BLOCK_INFO
unsigned short USHORT
Definition: pedump.c:61
struct _SCSI_PORT_DEVICE_BASE SCSI_PORT_DEVICE_BASE
struct _BUSES_CONFIGURATION_INFORMATION BUSES_CONFIGURATION_INFORMATION
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
struct _SCSI_PORT_SAVE_INTERRUPT * PSCSI_PORT_SAVE_INTERRUPT
BOOLEAN(NTAPI * PHW_INTERRUPT)(IN PVOID DeviceExtension)
Definition: srb.h:442
struct _SCSI_PORT_LUN_EXTENSION * ReadyLun
Definition: scsiport_int.h:143
struct _SCSI_LUN_INFO * Next
Definition: scsiport_int.h:162
PHW_DMA_STARTED HwDmaStarted
Definition: scsiport_int.h:263
SCSI_REQUEST_BLOCK InternalSrb
Definition: scsiport_int.h:267
VOID(NTAPI * PHW_TIMER)(IN PVOID DeviceExtension)
Definition: srb.h:448
PSCSI_PORT_LUN_EXTENSION ReadyLun
Definition: scsiport_int.h:186
unsigned int ULONG
Definition: retypes.h:1
PSCSI_PORT_LUN_EXTENSION LunExtensionList[LUS_NUMBER]
Definition: scsiport_int.h:240
struct _CONFIGURATION_INFO * PCONFIGURATION_INFO
#define LUS_NUMBER
Definition: scsiport_int.h:22
PBUSES_CONFIGURATION_INFORMATION BusesConfig
Definition: scsiport_int.h:212
PSCSI_REQUEST_BLOCK OriginalSrb
Definition: scsiport_int.h:266
struct _SCSI_PORT_SAVE_INTERRUPT SCSI_PORT_SAVE_INTERRUPT
BOOLEAN DisableTaggedQueueing
Definition: scsiport_int.h:73
SCSI_PORT_INTERRUPT_DATA InterruptData
Definition: scsiport_int.h:242
struct _SCSI_PORT_DEVICE_EXTENSION * DeviceExtension
Definition: scsiport_int.h:196
struct _BUSES_CONFIGURATION_INFORMATION * PBUSES_CONFIGURATION_INFORMATION
VOID(NTAPI * PHW_DMA_STARTED)(IN PVOID DeviceExtension)
Definition: srb.h:454
struct _SCSI_LUN_INFO SCSI_LUN_INFO