aacreg.h (82527) | aacreg.h (83114) |
---|---|
1/*- 2 * Copyright (c) 2000 Michael Smith 3 * Copyright (c) 2000-2001 Scott Long 4 * Copyright (c) 2000 BSDi 5 * Copyright (c) 2001 Adaptec, Inc. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * | 1/*- 2 * Copyright (c) 2000 Michael Smith 3 * Copyright (c) 2000-2001 Scott Long 4 * Copyright (c) 2000 BSDi 5 * Copyright (c) 2001 Adaptec, Inc. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 12 unchanged lines hidden (view full) --- 21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * |
29 * $FreeBSD: head/sys/dev/aac/aacreg.h 82527 2001-08-29 23:34:05Z scottl $ | 29 * $FreeBSD: head/sys/dev/aac/aacreg.h 83114 2001-09-05 20:43:02Z scottl $ |
30 */ 31 32/* 33 * Data structures defining the interface between the driver and the Adaptec 34 * 'FSA' adapters. Note that many field names and comments here are taken 35 * verbatim from the Adaptec driver source in order to make comparing the 36 * two slightly easier. 37 */ 38 | 30 */ 31 32/* 33 * Data structures defining the interface between the driver and the Adaptec 34 * 'FSA' adapters. Note that many field names and comments here are taken 35 * verbatim from the Adaptec driver source in order to make comparing the 36 * two slightly easier. 37 */ 38 |
39/****************************************************************************** | 39/* |
40 * Misc. magic numbers. 41 */ 42#define AAC_MAX_CONTAINERS 64 43#define AAC_BLOCK_SIZE 512 44 | 40 * Misc. magic numbers. 41 */ 42#define AAC_MAX_CONTAINERS 64 43#define AAC_BLOCK_SIZE 512 44 |
45/****************************************************************************** | 45/* |
46 * Communications interface. 47 * 48 * Where datastructure layouts are closely parallel to the Adaptec sample code, 49 * retain their naming conventions (for now) to aid in cross-referencing. 50 */ 51 52/* 53 * We establish 4 command queues and matching response queues. Queues must --- 23 unchanged lines hidden (view full) --- 77 AAC_HOST_HIGH_RESP_ENTRIES + \ 78 AAC_HOST_NORM_RESP_ENTRIES + \ 79 AAC_ADAP_HIGH_RESP_ENTRIES + \ 80 AAC_ADAP_NORM_RESP_ENTRIES) 81#define AAC_QUEUE_COUNT 8 82#define AAC_QUEUE_ALIGN 16 83 84struct aac_queue_entry { | 46 * Communications interface. 47 * 48 * Where datastructure layouts are closely parallel to the Adaptec sample code, 49 * retain their naming conventions (for now) to aid in cross-referencing. 50 */ 51 52/* 53 * We establish 4 command queues and matching response queues. Queues must --- 23 unchanged lines hidden (view full) --- 77 AAC_HOST_HIGH_RESP_ENTRIES + \ 78 AAC_HOST_NORM_RESP_ENTRIES + \ 79 AAC_ADAP_HIGH_RESP_ENTRIES + \ 80 AAC_ADAP_NORM_RESP_ENTRIES) 81#define AAC_QUEUE_COUNT 8 82#define AAC_QUEUE_ALIGN 16 83 84struct aac_queue_entry { |
85 u_int32_t aq_fib_size; /* FIB size in bytes */ 86 u_int32_t aq_fib_addr; /* receiver-space address of the FIB */ | 85 u_int32_t aq_fib_size; /* FIB size in bytes */ 86 u_int32_t aq_fib_addr; /* receiver-space address of the FIB */ |
87} __attribute__ ((packed)); 88 89#define AAC_PRODUCER_INDEX 0 90#define AAC_CONSUMER_INDEX 1 91 92/* 93 * Table of queue indices and queues used to communicate with the 94 * controller. This structure must be aligned to AAC_QUEUE_ALIGN 95 */ 96struct aac_queue_table { | 87} __attribute__ ((packed)); 88 89#define AAC_PRODUCER_INDEX 0 90#define AAC_CONSUMER_INDEX 1 91 92/* 93 * Table of queue indices and queues used to communicate with the 94 * controller. This structure must be aligned to AAC_QUEUE_ALIGN 95 */ 96struct aac_queue_table { |
97 /* queue consumer/producer indexes (layout mandated by adapter) */ 98 u_int32_t qt_qindex[AAC_QUEUE_COUNT][2]; | 97 /* queue consumer/producer indexes (layout mandated by adapter) */ 98 u_int32_t qt_qindex[AAC_QUEUE_COUNT][2]; |
99 | 99 |
100 /* queue entry structures (layout mandated by adapter) */ 101 struct aac_queue_entry qt_HostNormCmdQueue [AAC_HOST_NORM_CMD_ENTRIES]; 102 struct aac_queue_entry qt_HostHighCmdQueue [AAC_HOST_HIGH_CMD_ENTRIES]; 103 struct aac_queue_entry qt_AdapNormCmdQueue [AAC_ADAP_NORM_CMD_ENTRIES]; 104 struct aac_queue_entry qt_AdapHighCmdQueue [AAC_ADAP_HIGH_CMD_ENTRIES]; 105 struct aac_queue_entry qt_HostNormRespQueue[AAC_HOST_NORM_RESP_ENTRIES]; 106 struct aac_queue_entry qt_HostHighRespQueue[AAC_HOST_HIGH_RESP_ENTRIES]; 107 struct aac_queue_entry qt_AdapNormRespQueue[AAC_ADAP_NORM_RESP_ENTRIES]; 108 struct aac_queue_entry qt_AdapHighRespQueue[AAC_ADAP_HIGH_RESP_ENTRIES]; | 100 /* queue entry structures (layout mandated by adapter) */ 101 struct aac_queue_entry qt_HostNormCmdQueue [AAC_HOST_NORM_CMD_ENTRIES]; 102 struct aac_queue_entry qt_HostHighCmdQueue [AAC_HOST_HIGH_CMD_ENTRIES]; 103 struct aac_queue_entry qt_AdapNormCmdQueue [AAC_ADAP_NORM_CMD_ENTRIES]; 104 struct aac_queue_entry qt_AdapHighCmdQueue [AAC_ADAP_HIGH_CMD_ENTRIES]; 105 struct aac_queue_entry qt_HostNormRespQueue[AAC_HOST_NORM_RESP_ENTRIES]; 106 struct aac_queue_entry qt_HostHighRespQueue[AAC_HOST_HIGH_RESP_ENTRIES]; 107 struct aac_queue_entry qt_AdapNormRespQueue[AAC_ADAP_NORM_RESP_ENTRIES]; 108 struct aac_queue_entry qt_AdapHighRespQueue[AAC_ADAP_HIGH_RESP_ENTRIES]; |
109} __attribute__ ((packed)); 110 111/* 112 * Queue names 113 * 114 * Note that we base these at 0 in order to use them as array indices. Adaptec 115 * used base 1 for some unknown reason, and sorted them in a different order. 116 */ --- 6 unchanged lines hidden (view full) --- 123#define AAC_ADAP_NORM_RESP_QUEUE 6 124#define AAC_ADAP_HIGH_RESP_QUEUE 7 125 126/* 127 * List structure used to chain FIBs (used by the adapter - we hang FIBs off 128 * our private command structure and don't touch these) 129 */ 130struct aac_fib_list_entry { | 109} __attribute__ ((packed)); 110 111/* 112 * Queue names 113 * 114 * Note that we base these at 0 in order to use them as array indices. Adaptec 115 * used base 1 for some unknown reason, and sorted them in a different order. 116 */ --- 6 unchanged lines hidden (view full) --- 123#define AAC_ADAP_NORM_RESP_QUEUE 6 124#define AAC_ADAP_HIGH_RESP_QUEUE 7 125 126/* 127 * List structure used to chain FIBs (used by the adapter - we hang FIBs off 128 * our private command structure and don't touch these) 129 */ 130struct aac_fib_list_entry { |
131 struct fib_list_entry *Flink; 132 struct fib_list_entry *Blink; | 131 struct fib_list_entry *Flink; 132 struct fib_list_entry *Blink; |
133} __attribute__ ((packed)); 134 135/* 136 * FIB (FSA Interface Block?); this is the datastructure passed between the host 137 * and adapter. 138 */ 139struct aac_fib_header { | 133} __attribute__ ((packed)); 134 135/* 136 * FIB (FSA Interface Block?); this is the datastructure passed between the host 137 * and adapter. 138 */ 139struct aac_fib_header { |
140 u_int32_t XferState; 141 u_int16_t Command; 142 u_int8_t StructType; 143 u_int8_t Flags; 144 u_int16_t Size; 145 u_int16_t SenderSize; 146 u_int32_t SenderFibAddress; 147 u_int32_t ReceiverFibAddress; 148 u_int32_t SenderData; 149 union { 150 struct { 151 u_int32_t ReceiverTimeStart; 152 u_int32_t ReceiverTimeDone; 153 } _s; 154 struct aac_fib_list_entry FibLinks; 155 } _u; | 140 u_int32_t XferState; 141 u_int16_t Command; 142 u_int8_t StructType; 143 u_int8_t Flags; 144 u_int16_t Size; 145 u_int16_t SenderSize; 146 u_int32_t SenderFibAddress; 147 u_int32_t ReceiverFibAddress; 148 u_int32_t SenderData; 149 union { 150 struct { 151 u_int32_t ReceiverTimeStart; 152 u_int32_t ReceiverTimeDone; 153 } _s; 154 struct aac_fib_list_entry FibLinks; 155 } _u; |
156} __attribute__ ((packed)); 157 158#define AAC_FIB_DATASIZE (512 - sizeof(struct aac_fib_header)) 159 160struct aac_fib { | 156} __attribute__ ((packed)); 157 158#define AAC_FIB_DATASIZE (512 - sizeof(struct aac_fib_header)) 159 160struct aac_fib { |
161 struct aac_fib_header Header; 162 u_int8_t data[AAC_FIB_DATASIZE]; | 161 struct aac_fib_header Header; 162 u_int8_t data[AAC_FIB_DATASIZE]; |
163} __attribute__ ((packed)); 164 165/* 166 * FIB commands 167 */ 168typedef enum { | 163} __attribute__ ((packed)); 164 165/* 166 * FIB commands 167 */ 168typedef enum { |
169 TestCommandResponse = 1, 170 TestAdapterCommand = 2, | 169 TestCommandResponse = 1, 170 TestAdapterCommand = 2, |
171 | 171 |
172 /* lowlevel and comm commands */ 173 LastTestCommand = 100, 174 ReinitHostNormCommandQueue = 101, 175 ReinitHostHighCommandQueue = 102, 176 ReinitHostHighRespQueue = 103, 177 ReinitHostNormRespQueue = 104, 178 ReinitAdapNormCommandQueue = 105, 179 ReinitAdapHighCommandQueue = 107, 180 ReinitAdapHighRespQueue = 108, 181 ReinitAdapNormRespQueue = 109, 182 InterfaceShutdown = 110, 183 DmaCommandFib = 120, 184 StartProfile = 121, 185 TermProfile = 122, 186 SpeedTest = 123, 187 TakeABreakPt = 124, 188 RequestPerfData = 125, 189 SetInterruptDefTimer= 126, 190 SetInterruptDefCount= 127, 191 GetInterruptDefStatus= 128, 192 LastCommCommand = 129, | 172 /* lowlevel and comm commands */ 173 LastTestCommand = 100, 174 ReinitHostNormCommandQueue = 101, 175 ReinitHostHighCommandQueue = 102, 176 ReinitHostHighRespQueue = 103, 177 ReinitHostNormRespQueue = 104, 178 ReinitAdapNormCommandQueue = 105, 179 ReinitAdapHighCommandQueue = 107, 180 ReinitAdapHighRespQueue = 108, 181 ReinitAdapNormRespQueue = 109, 182 InterfaceShutdown = 110, 183 DmaCommandFib = 120, 184 StartProfile = 121, 185 TermProfile = 122, 186 SpeedTest = 123, 187 TakeABreakPt = 124, 188 RequestPerfData = 125, 189 SetInterruptDefTimer= 126, 190 SetInterruptDefCount= 127, 191 GetInterruptDefStatus= 128, 192 LastCommCommand = 129, |
193 | 193 |
194 /* filesystem commands */ 195 NuFileSystem = 300, 196 UFS = 301, 197 HostFileSystem = 302, 198 LastFileSystemCommand = 303, | 194 /* filesystem commands */ 195 NuFileSystem = 300, 196 UFS = 301, 197 HostFileSystem = 302, 198 LastFileSystemCommand = 303, |
199 | 199 |
200 /* Container Commands */ 201 ContainerCommand = 500, 202 ContainerCommand64 = 501, | 200 /* Container Commands */ 201 ContainerCommand = 500, 202 ContainerCommand64 = 501, |
203 | 203 |
204 /* Cluster Commands */ 205 ClusterCommand = 550, | 204 /* Cluster Commands */ 205 ClusterCommand = 550, |
206 | 206 |
207 /* Scsi Port commands (scsi passthrough) */ 208 ScsiPortCommand = 600, | 207 /* Scsi Port commands (scsi passthrough) */ 208 ScsiPortCommand = 600, |
209 | 209 |
210 /* misc house keeping and generic adapter initiated commands */ 211 AifRequest = 700, 212 CheckRevision = 701, 213 FsaHostShutdown = 702, 214 RequestAdapterInfo = 703, 215 IsAdapterPaused = 704, 216 SendHostTime = 705, 217 LastMiscCommand = 706 | 210 /* misc house keeping and generic adapter initiated commands */ 211 AifRequest = 700, 212 CheckRevision = 701, 213 FsaHostShutdown = 702, 214 RequestAdapterInfo = 703, 215 IsAdapterPaused = 704, 216 SendHostTime = 705, 217 LastMiscCommand = 706 |
218} AAC_FibCommands; 219 220/* 221 * FIB types 222 */ 223#define AAC_FIBTYPE_TFIB 1 224#define AAC_FIBTYPE_TQE 2 225#define AAC_FIBTYPE_TCTPERF 3 --- 37 unchanged lines hidden (view full) --- 263#define AAC_ERROR_FIB_ALLOCATION_FAILED 0x07 264#define AAC_ERROR_FIB_DEALLOCATION_FAILED 0x08 265 266/* 267 * Adapter Init Structure: this is passed to the adapter with the 268 * AAC_MONKER_INITSTRUCT command to point it at our control structures. 269 */ 270struct aac_adapter_init { | 218} AAC_FibCommands; 219 220/* 221 * FIB types 222 */ 223#define AAC_FIBTYPE_TFIB 1 224#define AAC_FIBTYPE_TQE 2 225#define AAC_FIBTYPE_TCTPERF 3 --- 37 unchanged lines hidden (view full) --- 263#define AAC_ERROR_FIB_ALLOCATION_FAILED 0x07 264#define AAC_ERROR_FIB_DEALLOCATION_FAILED 0x08 265 266/* 267 * Adapter Init Structure: this is passed to the adapter with the 268 * AAC_MONKER_INITSTRUCT command to point it at our control structures. 269 */ 270struct aac_adapter_init { |
271 u_int32_t InitStructRevision; | 271 u_int32_t InitStructRevision; |
272#define AAC_INIT_STRUCT_REVISION 3 | 272#define AAC_INIT_STRUCT_REVISION 3 |
273 u_int32_t MiniPortRevision; 274 u_int32_t FilesystemRevision; 275 u_int32_t CommHeaderAddress; 276 u_int32_t FastIoCommAreaAddress; 277 u_int32_t AdapterFibsPhysicalAddress; 278 void *AdapterFibsVirtualAddress; 279 u_int32_t AdapterFibsSize; 280 u_int32_t AdapterFibAlign; 281 u_int32_t PrintfBufferAddress; 282 u_int32_t PrintfBufferSize; 283 u_int32_t HostPhysMemPages; 284 u_int32_t HostElapsedSeconds; | 273 u_int32_t MiniPortRevision; 274 u_int32_t FilesystemRevision; 275 u_int32_t CommHeaderAddress; 276 u_int32_t FastIoCommAreaAddress; 277 u_int32_t AdapterFibsPhysicalAddress; 278 void *AdapterFibsVirtualAddress; 279 u_int32_t AdapterFibsSize; 280 u_int32_t AdapterFibAlign; 281 u_int32_t PrintfBufferAddress; 282 u_int32_t PrintfBufferSize; 283 u_int32_t HostPhysMemPages; 284 u_int32_t HostElapsedSeconds; |
285} __attribute__ ((packed)); 286 | 285} __attribute__ ((packed)); 286 |
287/****************************************************************************** | 287/* |
288 * Shared data types 289 */ 290/* 291 * Container types 292 */ 293typedef enum { | 288 * Shared data types 289 */ 290/* 291 * Container types 292 */ 293typedef enum { |
294 CT_NONE = 0, 295 CT_VOLUME, 296 CT_MIRROR, 297 CT_STRIPE, 298 CT_RAID5, 299 CT_SSRW, 300 CT_SSRO, 301 CT_MORPH, 302 CT_PASSTHRU, 303 CT_RAID4, 304 CT_RAID10, /* stripe of mirror */ 305 CT_RAID00, /* stripe of stripe */ 306 CT_VOLUME_OF_MIRRORS, /* volume of mirror */ 307 CT_PSEUDO_RAID3, /* really raid4 */ | 294 CT_NONE = 0, 295 CT_VOLUME, 296 CT_MIRROR, 297 CT_STRIPE, 298 CT_RAID5, 299 CT_SSRW, 300 CT_SSRO, 301 CT_MORPH, 302 CT_PASSTHRU, 303 CT_RAID4, 304 CT_RAID10, /* stripe of mirror */ 305 CT_RAID00, /* stripe of stripe */ 306 CT_VOLUME_OF_MIRRORS, /* volume of mirror */ 307 CT_PSEUDO_RAID3, /* really raid4 */ |
308} AAC_FSAVolType; 309 310/* 311 * Host-addressable object types 312 */ 313typedef enum { | 308} AAC_FSAVolType; 309 310/* 311 * Host-addressable object types 312 */ 313typedef enum { |
314 FT_REG = 1, /* regular file */ 315 FT_DIR, /* directory */ 316 FT_BLK, /* "block" device - reserved */ 317 FT_CHR, /* "character special" device - reserved */ 318 FT_LNK, /* symbolic link */ 319 FT_SOCK, /* socket */ 320 FT_FIFO, /* fifo */ 321 FT_FILESYS, /* ADAPTEC's "FSA"(tm) filesystem */ 322 FT_DRIVE, /* physical disk - addressable in scsi by bus/target/lun */ 323 FT_SLICE, /* virtual disk - raw volume - slice */ 324 FT_PARTITION, /* FSA partition - carved out of a slice - building block 325 * for containers */ 326 FT_VOLUME, /* Container - Volume Set */ 327 FT_STRIPE, /* Container - Stripe Set */ 328 FT_MIRROR, /* Container - Mirror Set */ 329 FT_RAID5, /* Container - Raid 5 Set */ 330 FT_DATABASE /* Storage object with "foreign" content manager */ | 314 FT_REG = 1, /* regular file */ 315 FT_DIR, /* directory */ 316 FT_BLK, /* "block" device - reserved */ 317 FT_CHR, /* "character special" device - reserved */ 318 FT_LNK, /* symbolic link */ 319 FT_SOCK, /* socket */ 320 FT_FIFO, /* fifo */ 321 FT_FILESYS, /* ADAPTEC's "FSA"(tm) filesystem */ 322 FT_DRIVE, /* physical disk - addressable in scsi by b/t/l */ 323 FT_SLICE, /* virtual disk - raw volume - slice */ 324 FT_PARTITION, /* FSA partition - carved out of a slice - building 325 * block for containers */ 326 FT_VOLUME, /* Container - Volume Set */ 327 FT_STRIPE, /* Container - Stripe Set */ 328 FT_MIRROR, /* Container - Mirror Set */ 329 FT_RAID5, /* Container - Raid 5 Set */ 330 FT_DATABASE /* Storage object with "foreign" content manager */ |
331} AAC_FType; 332 333/* 334 * Host-side scatter/gather list for 32-bit commands. 335 */ 336struct aac_sg_entry { | 331} AAC_FType; 332 333/* 334 * Host-side scatter/gather list for 32-bit commands. 335 */ 336struct aac_sg_entry { |
337 u_int32_t SgAddress; 338 u_int32_t SgByteCount; | 337 u_int32_t SgAddress; 338 u_int32_t SgByteCount; |
339} __attribute__ ((packed)); 340 341struct aac_sg_table { | 339} __attribute__ ((packed)); 340 341struct aac_sg_table { |
342 u_int32_t SgCount; 343 struct aac_sg_entry SgEntry[0]; | 342 u_int32_t SgCount; 343 struct aac_sg_entry SgEntry[0]; |
344} __attribute__ ((packed)); 345 346/* 347 * Host-side scatter/gather list for 64-bit commands. 348 */ 349struct aac_sg_table64 { | 344} __attribute__ ((packed)); 345 346/* 347 * Host-side scatter/gather list for 64-bit commands. 348 */ 349struct aac_sg_table64 { |
350 u_int8_t SgCount; 351 u_int8_t SgSectorsPerPage; 352 u_int16_t SgByteOffset; 353 u_int64_t SgEntry[0]; | 350 u_int8_t SgCount; 351 u_int8_t SgSectorsPerPage; 352 u_int16_t SgByteOffset; 353 u_int64_t SgEntry[0]; |
354} __attribute__ ((packed)); 355 356/* 357 * Container creation data 358 */ 359struct aac_container_creation { | 354} __attribute__ ((packed)); 355 356/* 357 * Container creation data 358 */ 359struct aac_container_creation { |
360 u_int8_t ViaBuildNumber; 361 u_int8_t MicroSecond; 362 u_int8_t Via; /* 1 = FSU, 2 = API, etc. */ 363 u_int8_t YearsSince1900; 364 u_int32_t Month:4; /* 1-12 */ 365 u_int32_t Day:6; /* 1-32 */ 366 u_int32_t Hour:6; /* 0-23 */ 367 u_int32_t Minute:6; /* 0-59 */ 368 u_int32_t Second:6; /* 0-59 */ 369 u_int64_t ViaAdapterSerialNumber; | 360 u_int8_t ViaBuildNumber; 361 u_int8_t MicroSecond; 362 u_int8_t Via; /* 1 = FSU, 2 = API, etc. */ 363 u_int8_t YearsSince1900; 364 u_int32_t Month:4; /* 1-12 */ 365 u_int32_t Day:6; /* 1-32 */ 366 u_int32_t Hour:6; /* 0-23 */ 367 u_int32_t Minute:6; /* 0-59 */ 368 u_int32_t Second:6; /* 0-59 */ 369 u_int64_t ViaAdapterSerialNumber; |
370} __attribute__ ((packed)); 371 | 370} __attribute__ ((packed)); 371 |
372/****************************************************************************** | 372/* |
373 * Revision number handling 374 */ 375 376typedef enum { | 373 * Revision number handling 374 */ 375 376typedef enum { |
377 RevApplication = 1, 378 RevDkiCli, 379 RevNetService, 380 RevApi, 381 RevFileSysDriver, 382 RevMiniportDriver, 383 RevAdapterSW, 384 RevMonitor, 385 RevRemoteApi | 377 RevApplication = 1, 378 RevDkiCli, 379 RevNetService, 380 RevApi, 381 RevFileSysDriver, 382 RevMiniportDriver, 383 RevAdapterSW, 384 RevMonitor, 385 RevRemoteApi |
386} RevComponent; 387 388struct FsaRevision { | 386} RevComponent; 387 388struct FsaRevision { |
389 union { 390 struct { 391 u_int8_t dash; 392 u_int8_t type; 393 u_int8_t minor; 394 u_int8_t major; 395 } comp; 396 u_int32_t ul; 397 } external; 398 u_int32_t buildNumber; | 389 union { 390 struct { 391 u_int8_t dash; 392 u_int8_t type; 393 u_int8_t minor; 394 u_int8_t major; 395 } comp; 396 u_int32_t ul; 397 } external; 398 u_int32_t buildNumber; |
399} __attribute__ ((packed)); 400 | 399} __attribute__ ((packed)); 400 |
401/****************************************************************************** | 401/* |
402 * Adapter Information 403 */ 404 405typedef enum { | 402 * Adapter Information 403 */ 404 405typedef enum { |
406 CPU_NTSIM = 1, 407 CPU_I960, 408 CPU_ARM, 409 CPU_SPARC, 410 CPU_POWERPC, 411 CPU_ALPHA, 412 CPU_P7, 413 CPU_I960_RX, 414 CPU__last | 406 CPU_NTSIM = 1, 407 CPU_I960, 408 CPU_ARM, 409 CPU_SPARC, 410 CPU_POWERPC, 411 CPU_ALPHA, 412 CPU_P7, 413 CPU_I960_RX, 414 CPU__last |
415} AAC_CpuType; 416 417typedef enum { | 415} AAC_CpuType; 416 417typedef enum { |
418 CPUI960_JX = 1, 419 CPUI960_CX, 420 CPUI960_HX, 421 CPUI960_RX, 422 CPUARM_SA110, 423 CPUARM_xxx, 424 CPUPPC_603e, 425 CPUPPC_xxx, 426 CPUSUBTYPE__last | 418 CPUI960_JX = 1, 419 CPUI960_CX, 420 CPUI960_HX, 421 CPUI960_RX, 422 CPUARM_SA110, 423 CPUARM_xxx, 424 CPUPPC_603e, 425 CPUPPC_xxx, 426 CPUSUBTYPE__last |
427} AAC_CpuSubType; 428 429typedef enum { | 427} AAC_CpuSubType; 428 429typedef enum { |
430 PLAT_NTSIM = 1, 431 PLAT_V3ADU, 432 PLAT_CYCLONE, 433 PLAT_CYCLONE_HD, 434 PLAT_BATBOARD, 435 PLAT_BATBOARD_HD, 436 PLAT_YOLO, 437 PLAT_COBRA, 438 PLAT_ANAHEIM, 439 PLAT_JALAPENO, 440 PLAT_QUEENS, 441 PLAT_JALAPENO_DELL, 442 PLAT_POBLANO, 443 PLAT_POBLANO_OPAL, 444 PLAT_POBLANO_SL0, 445 PLAT_POBLANO_SL1, 446 PLAT_POBLANO_SL2, 447 PLAT_POBLANO_XXX, 448 PLAT_JALAPENO_P2, 449 PLAT_HABANERO, 450 PLAT__last | 430 PLAT_NTSIM = 1, 431 PLAT_V3ADU, 432 PLAT_CYCLONE, 433 PLAT_CYCLONE_HD, 434 PLAT_BATBOARD, 435 PLAT_BATBOARD_HD, 436 PLAT_YOLO, 437 PLAT_COBRA, 438 PLAT_ANAHEIM, 439 PLAT_JALAPENO, 440 PLAT_QUEENS, 441 PLAT_JALAPENO_DELL, 442 PLAT_POBLANO, 443 PLAT_POBLANO_OPAL, 444 PLAT_POBLANO_SL0, 445 PLAT_POBLANO_SL1, 446 PLAT_POBLANO_SL2, 447 PLAT_POBLANO_XXX, 448 PLAT_JALAPENO_P2, 449 PLAT_HABANERO, 450 PLAT__last |
451} AAC_Platform; 452 453typedef enum { | 451} AAC_Platform; 452 453typedef enum { |
454 OEM_FLAVOR_ADAPTEC = 1, 455 OEM_FLAVOR_DELL, 456 OEM_FLAVOR_HP, 457 OEM_FLAVOR_IBM, 458 OEM_FLAVOR_CPQ, 459 OEM_FLAVOR_BRAND_X, 460 OEM_FLAVOR_BRAND_Y, 461 OEM_FLAVOR_BRAND_Z, 462 OEM_FLAVOR__last | 454 OEM_FLAVOR_ADAPTEC = 1, 455 OEM_FLAVOR_DELL, 456 OEM_FLAVOR_HP, 457 OEM_FLAVOR_IBM, 458 OEM_FLAVOR_CPQ, 459 OEM_FLAVOR_BRAND_X, 460 OEM_FLAVOR_BRAND_Y, 461 OEM_FLAVOR_BRAND_Z, 462 OEM_FLAVOR__last |
463} AAC_OemFlavor; 464 465/* 466 * XXX the aac-2622 with no battery present reports PLATFORM_BAT_OPT_PRESENT 467 */ 468typedef enum 469{ | 463} AAC_OemFlavor; 464 465/* 466 * XXX the aac-2622 with no battery present reports PLATFORM_BAT_OPT_PRESENT 467 */ 468typedef enum 469{ |
470 PLATFORM_BAT_REQ_PRESENT = 1, /* BATTERY REQUIRED AND PRESENT */ 471 PLATFORM_BAT_REQ_NOTPRESENT, /* BATTERY REQUIRED AND NOT PRESENT */ 472 PLATFORM_BAT_OPT_PRESENT, /* BATTERY OPTIONAL AND PRESENT */ 473 PLATFORM_BAT_OPT_NOTPRESENT, /* BATTERY OPTIONAL AND NOT PRESENT */ 474 PLATFORM_BAT_NOT_SUPPORTED /* BATTERY NOT SUPPORTED */ | 470 PLATFORM_BAT_REQ_PRESENT = 1, /* BATTERY REQUIRED AND PRESENT */ 471 PLATFORM_BAT_REQ_NOTPRESENT, /* BATTERY REQUIRED AND NOT PRESENT */ 472 PLATFORM_BAT_OPT_PRESENT, /* BATTERY OPTIONAL AND PRESENT */ 473 PLATFORM_BAT_OPT_NOTPRESENT, /* BATTERY OPTIONAL AND NOT PRESENT */ 474 PLATFORM_BAT_NOT_SUPPORTED /* BATTERY NOT SUPPORTED */ |
475} AAC_BatteryPlatform; 476 477/* 478 * options supported by this board 479 * there has to be a one to one mapping of these defines and the ones in 480 * fsaapi.h, search for FSA_SUPPORT_SNAPSHOT 481 */ 482#define AAC_SUPPORTED_SNAPSHOT 0x01 483#define AAC_SUPPORTED_CLUSTERS 0x02 484#define AAC_SUPPORTED_WRITE_CACHE 0x04 485#define AAC_SUPPORTED_64BIT_DATA 0x08 486#define AAC_SUPPORTED_HOST_TIME_FIB 0x10 487#define AAC_SUPPORTED_RAID50 0x20 488 489/* 490 * Structure used to respond to a RequestAdapterInfo fib. 491 */ 492struct aac_adapter_info { | 475} AAC_BatteryPlatform; 476 477/* 478 * options supported by this board 479 * there has to be a one to one mapping of these defines and the ones in 480 * fsaapi.h, search for FSA_SUPPORT_SNAPSHOT 481 */ 482#define AAC_SUPPORTED_SNAPSHOT 0x01 483#define AAC_SUPPORTED_CLUSTERS 0x02 484#define AAC_SUPPORTED_WRITE_CACHE 0x04 485#define AAC_SUPPORTED_64BIT_DATA 0x08 486#define AAC_SUPPORTED_HOST_TIME_FIB 0x10 487#define AAC_SUPPORTED_RAID50 0x20 488 489/* 490 * Structure used to respond to a RequestAdapterInfo fib. 491 */ 492struct aac_adapter_info { |
493 AAC_Platform PlatformBase; /* adapter type */ 494 AAC_CpuType CpuArchitecture; /* adapter CPU type */ 495 AAC_CpuSubType CpuVariant; /* adapter CPU subtype */ 496 u_int32_t ClockSpeed; /* adapter CPU clockspeed */ 497 u_int32_t ExecutionMem; /* adapter Execution Memory size */ 498 u_int32_t BufferMem; /* adapter Data Memory */ 499 u_int32_t TotalMem; /* adapter Total Memory */ 500 struct FsaRevision KernelRevision; /* adapter Kernel Software Revision */ 501 struct FsaRevision MonitorRevision; /* adapter Monitor/Diagnostic 502 * Software Revision */ 503 struct FsaRevision HardwareRevision;/* TBD */ 504 struct FsaRevision BIOSRevision; /* adapter BIOS Revision */ 505 u_int32_t ClusteringEnabled; 506 u_int32_t ClusterChannelMask; 507 u_int64_t SerialNumber; 508 AAC_BatteryPlatform batteryPlatform; 509 u_int32_t SupportedOptions; /* supported features of this 510 * controller */ 511 AAC_OemFlavor OemVariant; | 493 AAC_Platform PlatformBase; /* adapter type */ 494 AAC_CpuType CpuArchitecture; /* adapter CPU type */ 495 AAC_CpuSubType CpuVariant; /* adapter CPU subtype */ 496 u_int32_t ClockSpeed; /* adapter CPU clockspeed */ 497 u_int32_t ExecutionMem; /* adapter Execution Memory 498 * size */ 499 u_int32_t BufferMem; /* adapter Data Memory */ 500 u_int32_t TotalMem; /* adapter Total Memory */ 501 struct FsaRevision KernelRevision; /* adapter Kernel Software 502 * Revision */ 503 struct FsaRevision MonitorRevision; /* adapter Monitor/Diagnostic 504 * Software Revision */ 505 struct FsaRevision HardwareRevision;/* TBD */ 506 struct FsaRevision BIOSRevision; /* adapter BIOS Revision */ 507 u_int32_t ClusteringEnabled; 508 u_int32_t ClusterChannelMask; 509 u_int64_t SerialNumber; 510 AAC_BatteryPlatform batteryPlatform; 511 u_int32_t SupportedOptions; /* supported features of this 512 * controller */ 513 AAC_OemFlavor OemVariant; |
512} __attribute__ ((packed)); 513 | 514} __attribute__ ((packed)); 515 |
514/****************************************************************************** | 516/* |
515 * Monitor/Kernel interface. 516 */ 517 518/* 519 * Synchronous commands to the monitor/kernel. 520 */ 521#define AAC_MONKER_INITSTRUCT 0x05 522#define AAC_MONKER_SYNCFIB 0x0c --- 9 unchanged lines hidden (view full) --- 532 * a single phase should be ever be set. Each phase can have multiple 533 * phase status bits to provide more detailed information about the 534 * state of the adapter. 535 */ 536#define AAC_SELF_TEST_FAILED 0x00000004 537#define AAC_UP_AND_RUNNING 0x00000080 538#define AAC_KERNEL_PANIC 0x00000100 539 | 517 * Monitor/Kernel interface. 518 */ 519 520/* 521 * Synchronous commands to the monitor/kernel. 522 */ 523#define AAC_MONKER_INITSTRUCT 0x05 524#define AAC_MONKER_SYNCFIB 0x0c --- 9 unchanged lines hidden (view full) --- 534 * a single phase should be ever be set. Each phase can have multiple 535 * phase status bits to provide more detailed information about the 536 * state of the adapter. 537 */ 538#define AAC_SELF_TEST_FAILED 0x00000004 539#define AAC_UP_AND_RUNNING 0x00000080 540#define AAC_KERNEL_PANIC 0x00000100 541 |
540/****************************************************************************** | 542/* |
541 * Data types relating to control and monitoring of the NVRAM/WriteCache 542 * subsystem. 543 */ 544 545#define AAC_NFILESYS 24 /* maximum number of filesystems */ 546 547/* 548 * NVRAM/Write Cache subsystem states 549 */ 550typedef enum { | 543 * Data types relating to control and monitoring of the NVRAM/WriteCache 544 * subsystem. 545 */ 546 547#define AAC_NFILESYS 24 /* maximum number of filesystems */ 548 549/* 550 * NVRAM/Write Cache subsystem states 551 */ 552typedef enum { |
551 NVSTATUS_DISABLED = 0, /* present, clean, not being used */ 552 NVSTATUS_ENABLED, /* present, possibly dirty, ready for use */ 553 NVSTATUS_ERROR, /* present, dirty, contains dirty data */ 554 /* for bad/missing device */ 555 NVSTATUS_BATTERY, /* present, bad or low battery, may contain dirty data */ 556 /* for bad/missing device */ 557 NVSTATUS_UNKNOWN | 553 NVSTATUS_DISABLED = 0, /* present, clean, not being used */ 554 NVSTATUS_ENABLED, /* present, possibly dirty, ready for use */ 555 NVSTATUS_ERROR, /* present, dirty, contains dirty data */ 556 NVSTATUS_BATTERY, /* present, bad or low battery, may contain 557 * dirty data */ 558 NVSTATUS_UNKNOWN /* for bad/missing device */ |
558} AAC_NVSTATUS; 559 560/* 561 * NVRAM/Write Cache subsystem battery component states 562 * 563 */ 564typedef enum { | 559} AAC_NVSTATUS; 560 561/* 562 * NVRAM/Write Cache subsystem battery component states 563 * 564 */ 565typedef enum { |
565 NVBATTSTATUS_NONE = 0, /* battery has no power or is not present */ 566 NVBATTSTATUS_LOW, /* battery is low on power */ 567 NVBATTSTATUS_OK, /* battery is okay - normal operation possible only in this state */ 568 NVBATTSTATUS_RECONDITIONING /* no battery present - reconditioning in process */ | 566 NVBATTSTATUS_NONE = 0, /* battery has no power or is not present */ 567 NVBATTSTATUS_LOW, /* battery is low on power */ 568 NVBATTSTATUS_OK, /* battery is okay - normal operation possible 569 * only in this state */ 570 NVBATTSTATUS_RECONDITIONING /* no battery present - reconditioning 571 * in process */ |
569} AAC_NVBATTSTATUS; 570 571/* 572 * Battery transition type 573 */ 574typedef enum { | 572} AAC_NVBATTSTATUS; 573 574/* 575 * Battery transition type 576 */ 577typedef enum { |
575 NVBATT_TRANSITION_NONE = 0, /* battery now has no power or is not present */ 576 NVBATT_TRANSITION_LOW, /* battery is now low on power */ 577 NVBATT_TRANSITION_OK /* battery is now okay - normal operation possible only in this state */ | 578 NVBATT_TRANSITION_NONE = 0, /* battery now has no power or is not 579 * present */ 580 NVBATT_TRANSITION_LOW, /* battery is now low on power */ 581 NVBATT_TRANSITION_OK /* battery is now okay - normal 582 * operation possible only in this 583 * state */ |
578} AAC_NVBATT_TRANSITION; 579 580/* 581 * NVRAM Info structure returned for NVRAM_GetInfo call 582 */ 583struct aac_nvramdevinfo { | 584} AAC_NVBATT_TRANSITION; 585 586/* 587 * NVRAM Info structure returned for NVRAM_GetInfo call 588 */ 589struct aac_nvramdevinfo { |
584 u_int32_t NV_Enabled; /* write caching enabled */ 585 u_int32_t NV_Error; /* device in error state */ 586 u_int32_t NV_NDirty; /* count of dirty NVRAM buffers */ 587 u_int32_t NV_NActive; /* count of NVRAM buffers being written */ | 590 u_int32_t NV_Enabled; /* write caching enabled */ 591 u_int32_t NV_Error; /* device in error state */ 592 u_int32_t NV_NDirty; /* count of dirty NVRAM buffers */ 593 u_int32_t NV_NActive; /* count of NVRAM buffers being 594 * written */ |
588} __attribute__ ((packed)); 589 590struct aac_nvraminfo { | 595} __attribute__ ((packed)); 596 597struct aac_nvraminfo { |
591 AAC_NVSTATUS NV_Status; /* nvram subsystem status */ 592 AAC_NVBATTSTATUS NV_BattStatus; /* battery status */ 593 u_int32_t NV_Size; /* size of WriteCache NVRAM in | 598 AAC_NVSTATUS NV_Status; /* nvram subsystem status */ 599 AAC_NVBATTSTATUS NV_BattStatus; /* battery status */ 600 u_int32_t NV_Size; /* size of WriteCache NVRAM in |
594 * bytes */ | 601 * bytes */ |
595 u_int32_t NV_BufSize; /* size of NVRAM buffers in | 602 u_int32_t NV_BufSize; /* size of NVRAM buffers in |
596 * bytes */ | 603 * bytes */ |
597 u_int32_t NV_NBufs; /* number of NVRAM buffers */ 598 u_int32_t NV_NDirty; /* Num dirty NVRAM buffers */ 599 u_int32_t NV_NClean; /* Num clean NVRAM buffers */ 600 u_int32_t NV_NActive; /* Num NVRAM buffers being | 604 u_int32_t NV_NBufs; /* number of NVRAM buffers */ 605 u_int32_t NV_NDirty; /* Num dirty NVRAM buffers */ 606 u_int32_t NV_NClean; /* Num clean NVRAM buffers */ 607 u_int32_t NV_NActive; /* Num NVRAM buffers being |
601 * written */ | 608 * written */ |
602 u_int32_t NV_NBrokered; /* Num brokered NVRAM buffers */ 603 struct aac_nvramdevinfo NV_DevInfo[AAC_NFILESYS]; /* per device | 609 u_int32_t NV_NBrokered; /* Num brokered NVRAM buffers */ 610 struct aac_nvramdevinfo NV_DevInfo[AAC_NFILESYS]; /* per device |
604 * info */ | 611 * info */ |
605 u_int32_t NV_BattNeedsReconditioning; /* boolean */ 606 u_int32_t NV_TotalSize; /* size of all non-volatile | 612 u_int32_t NV_BattNeedsReconditioning; /* boolean */ 613 u_int32_t NV_TotalSize; /* size of all non-volatile |
607 * memories in bytes */ 608} __attribute__ ((packed)); 609 | 614 * memories in bytes */ 615} __attribute__ ((packed)); 616 |
610/****************************************************************************** | 617/* |
611 * Data types relating to adapter-initiated FIBs 612 * 613 * Based on types and structures in <aifstruc.h> 614 */ 615 616/* 617 * Progress Reports 618 */ 619typedef enum { | 618 * Data types relating to adapter-initiated FIBs 619 * 620 * Based on types and structures in <aifstruc.h> 621 */ 622 623/* 624 * Progress Reports 625 */ 626typedef enum { |
620 AifJobStsSuccess = 1, 621 AifJobStsFinished, 622 AifJobStsAborted, 623 AifJobStsFailed, 624 AifJobStsLastReportMarker = 100, /* All before mean last report */ 625 AifJobStsSuspended, 626 AifJobStsRunning | 627 AifJobStsSuccess = 1, 628 AifJobStsFinished, 629 AifJobStsAborted, 630 AifJobStsFailed, 631 AifJobStsLastReportMarker = 100, /* All prior mean last report */ 632 AifJobStsSuspended, 633 AifJobStsRunning |
627} AAC_AifJobStatus; 628 629typedef enum { | 634} AAC_AifJobStatus; 635 636typedef enum { |
630 AifJobScsiMin = 1, /* Minimum value for Scsi operation */ 631 AifJobScsiZero, /* SCSI device clear operation */ 632 AifJobScsiVerify, /* SCSI device Verify operation NO | 637 AifJobScsiMin = 1, /* Minimum value for Scsi operation */ 638 AifJobScsiZero, /* SCSI device clear operation */ 639 AifJobScsiVerify, /* SCSI device Verify operation NO |
633 * REPAIR */ | 640 * REPAIR */ |
634 AifJobScsiExercise, /* SCSI device Exercise operation */ 635 AifJobScsiVerifyRepair, /* SCSI device Verify operation WITH | 641 AifJobScsiExercise, /* SCSI device Exercise operation */ 642 AifJobScsiVerifyRepair, /* SCSI device Verify operation WITH |
636 * repair */ | 643 * repair */ |
637 AifJobScsiMax = 99, /* Max Scsi value */ 638 AifJobCtrMin, /* Min Ctr op value */ 639 AifJobCtrZero, /* Container clear operation */ 640 AifJobCtrCopy, /* Container copy operation */ 641 AifJobCtrCreateMirror, /* Container Create Mirror operation */ 642 AifJobCtrMergeMirror, /* Container Merge Mirror operation */ 643 AifJobCtrScrubMirror, /* Container Scrub Mirror operation */ 644 AifJobCtrRebuildRaid5, /* Container Rebuild Raid5 operation */ 645 AifJobCtrScrubRaid5, /* Container Scrub Raid5 operation */ 646 AifJobCtrMorph, /* Container morph operation */ 647 AifJobCtrPartCopy, /* Container Partition copy operation */ 648 AifJobCtrRebuildMirror, /* Container Rebuild Mirror operation */ 649 AifJobCtrCrazyCache, /* crazy cache */ 650 AifJobCtrMax = 199, /* Max Ctr type operation */ 651 AifJobFsMin, /* Min Fs type operation */ 652 AifJobFsCreate, /* File System Create operation */ 653 AifJobFsVerify, /* File System Verify operation */ 654 AifJobFsExtend, /* File System Extend operation */ 655 AifJobFsMax = 299, /* Max Fs type operation */ 656 AifJobApiFormatNTFS, /* Format a drive to NTFS */ 657 AifJobApiFormatFAT, /* Format a drive to FAT */ 658 AifJobApiUpdateSnapshot, /* update the read/write half of a | 644 AifJobScsiMax = 99, /* Max Scsi value */ 645 AifJobCtrMin, /* Min Ctr op value */ 646 AifJobCtrZero, /* Container clear operation */ 647 AifJobCtrCopy, /* Container copy operation */ 648 AifJobCtrCreateMirror, /* Container Create Mirror operation */ 649 AifJobCtrMergeMirror, /* Container Merge Mirror operation */ 650 AifJobCtrScrubMirror, /* Container Scrub Mirror operation */ 651 AifJobCtrRebuildRaid5, /* Container Rebuild Raid5 operation */ 652 AifJobCtrScrubRaid5, /* Container Scrub Raid5 operation */ 653 AifJobCtrMorph, /* Container morph operation */ 654 AifJobCtrPartCopy, /* Container Partition copy operation */ 655 AifJobCtrRebuildMirror, /* Container Rebuild Mirror operation */ 656 AifJobCtrCrazyCache, /* crazy cache */ 657 AifJobCtrMax = 199, /* Max Ctr type operation */ 658 AifJobFsMin, /* Min Fs type operation */ 659 AifJobFsCreate, /* File System Create operation */ 660 AifJobFsVerify, /* File System Verify operation */ 661 AifJobFsExtend, /* File System Extend operation */ 662 AifJobFsMax = 299, /* Max Fs type operation */ 663 AifJobApiFormatNTFS, /* Format a drive to NTFS */ 664 AifJobApiFormatFAT, /* Format a drive to FAT */ 665 AifJobApiUpdateSnapshot, /* update the read/write half of a |
659 * snapshot */ | 666 * snapshot */ |
660 AifJobApiFormatFAT32, /* Format a drive to FAT32 */ 661 AifJobApiMax = 399, /* Max API type operation */ 662 AifJobCtlContinuousCtrVerify, /* Adapter operation */ 663 AifJobCtlMax = 499 /* Max Adapter type operation */ | 667 AifJobApiFormatFAT32, /* Format a drive to FAT32 */ 668 AifJobApiMax = 399, /* Max API type operation */ 669 AifJobCtlContinuousCtrVerify, /* Adapter operation */ 670 AifJobCtlMax = 499 /* Max Adapter type operation */ |
664} AAC_AifJobType; 665 666struct aac_AifContainers { | 671} AAC_AifJobType; 672 673struct aac_AifContainers { |
667 u_int32_t src; /* from/master */ 668 u_int32_t dst; /* to/slave */ | 674 u_int32_t src; /* from/master */ 675 u_int32_t dst; /* to/slave */ |
669} __attribute__ ((packed)); 670 671union aac_AifJobClient { | 676} __attribute__ ((packed)); 677 678union aac_AifJobClient { |
672 struct aac_AifContainers container; /* For Container and file 673 * system progress ops; */ 674 int32_t scsi_dh; /* For SCSI progress ops */ | 679 struct aac_AifContainers container; /* For Container and 680 * file system progress 681 * ops; */ 682 int32_t scsi_dh; /* For SCSI progress 683 * ops */ |
675}; 676 677struct aac_AifJobDesc { | 684}; 685 686struct aac_AifJobDesc { |
678 u_int32_t jobID; /* DO NOT FILL IN! Will be | 687 u_int32_t jobID; /* DO NOT FILL IN! Will be |
679 * filled in by AIF */ | 688 * filled in by AIF */ |
680 AAC_AifJobType type; /* Operation that is being | 689 AAC_AifJobType type; /* Operation that is being |
681 * performed */ | 690 * performed */ |
682 union aac_AifJobClient client; /* Details */ | 691 union aac_AifJobClient client; /* Details */ |
683} __attribute__ ((packed)); 684 685struct aac_AifJobProgressReport { | 692} __attribute__ ((packed)); 693 694struct aac_AifJobProgressReport { |
686 struct aac_AifJobDesc jd; 687 AAC_AifJobStatus status; 688 u_int32_t finalTick; 689 u_int32_t currentTick; 690 u_int32_t jobSpecificData1; 691 u_int32_t jobSpecificData2; | 695 struct aac_AifJobDesc jd; 696 AAC_AifJobStatus status; 697 u_int32_t finalTick; 698 u_int32_t currentTick; 699 u_int32_t jobSpecificData1; 700 u_int32_t jobSpecificData2; |
692} __attribute__ ((packed)); 693 694/* 695 * Event Notification 696 */ 697typedef enum { | 701} __attribute__ ((packed)); 702 703/* 704 * Event Notification 705 */ 706typedef enum { |
698 /* General application notifies start here */ 699 AifEnGeneric = 1, /* Generic notification */ 700 AifEnTaskComplete, /* Task has completed */ 701 AifEnConfigChange, /* Adapter config change occurred */ 702 AifEnContainerChange, /* Adapter specific container | 707 /* General application notifies start here */ 708 AifEnGeneric = 1, /* Generic notification */ 709 AifEnTaskComplete, /* Task has completed */ 710 AifEnConfigChange, /* Adapter config change occurred */ 711 AifEnContainerChange, /* Adapter specific container |
703 * configuration change */ | 712 * configuration change */ |
704 AifEnDeviceFailure, /* SCSI device failed */ 705 AifEnMirrorFailover, /* Mirror failover started */ 706 AifEnContainerEvent, /* Significant container event */ 707 AifEnFileSystemChange, /* File system changed */ 708 AifEnConfigPause, /* Container pause event */ 709 AifEnConfigResume, /* Container resume event */ 710 AifEnFailoverChange, /* Failover space assignment changed */ 711 AifEnRAID5RebuildDone, /* RAID5 rebuild finished */ 712 AifEnEnclosureManagement, /* Enclosure management event */ 713 AifEnBatteryEvent, /* Significant NV battery event */ 714 AifEnAddContainer, /* A new container was created. */ 715 AifEnDeleteContainer, /* A container was deleted. */ 716 AifEnSMARTEvent, /* SMART Event */ 717 AifEnBatteryNeedsRecond, /* The battery needs reconditioning */ 718 AifEnClusterEvent, /* Some cluster event */ 719 AifEnDiskSetEvent, /* A disk set event occured. */ 720 AifDriverNotifyStart=199, /* Notifies for host driver go here */ 721 /* Host driver notifications start here */ 722 AifDenMorphComplete, /* A morph operation completed */ 723 AifDenVolumeExtendComplete /* A volume expand operation completed */ | 713 AifEnDeviceFailure, /* SCSI device failed */ 714 AifEnMirrorFailover, /* Mirror failover started */ 715 AifEnContainerEvent, /* Significant container event */ 716 AifEnFileSystemChange, /* File system changed */ 717 AifEnConfigPause, /* Container pause event */ 718 AifEnConfigResume, /* Container resume event */ 719 AifEnFailoverChange, /* Failover space assignment changed */ 720 AifEnRAID5RebuildDone, /* RAID5 rebuild finished */ 721 AifEnEnclosureManagement, /* Enclosure management event */ 722 AifEnBatteryEvent, /* Significant NV battery event */ 723 AifEnAddContainer, /* A new container was created. */ 724 AifEnDeleteContainer, /* A container was deleted. */ 725 AifEnSMARTEvent, /* SMART Event */ 726 AifEnBatteryNeedsRecond, /* The battery needs reconditioning */ 727 AifEnClusterEvent, /* Some cluster event */ 728 AifEnDiskSetEvent, /* A disk set event occured. */ 729 AifDriverNotifyStart=199, /* Notifies for host driver go here */ 730 /* Host driver notifications start here */ 731 AifDenMorphComplete, /* A morph operation completed */ 732 AifDenVolumeExtendComplete /* Volume expand operation completed */ |
724} AAC_AifEventNotifyType; 725 726struct aac_AifEnsGeneric { | 733} AAC_AifEventNotifyType; 734 735struct aac_AifEnsGeneric { |
727 char text[132]; /* Generic text */ | 736 char text[132]; /* Generic text */ |
728} __attribute__ ((packed)); 729 730struct aac_AifEnsDeviceFailure { | 737} __attribute__ ((packed)); 738 739struct aac_AifEnsDeviceFailure { |
731 u_int32_t deviceHandle; /* SCSI device handle */ | 740 u_int32_t deviceHandle; /* SCSI device handle */ |
732} __attribute__ ((packed)); 733 734struct aac_AifEnsMirrorFailover { | 741} __attribute__ ((packed)); 742 743struct aac_AifEnsMirrorFailover { |
735 u_int32_t container; /* Container with failed element */ 736 u_int32_t failedSlice; /* Old slice which failed */ 737 u_int32_t creatingSlice; /* New slice used for auto-create */ | 744 u_int32_t container; /* Container with failed element */ 745 u_int32_t failedSlice; /* Old slice which failed */ 746 u_int32_t creatingSlice; /* New slice used for auto-create */ |
738} __attribute__ ((packed)); 739 740struct aac_AifEnsContainerChange { | 747} __attribute__ ((packed)); 748 749struct aac_AifEnsContainerChange { |
741 u_int32_t container[2]; /* container that changed, -1 if no | 750 u_int32_t container[2]; /* container that changed, -1 if no |
742 * container */ 743} __attribute__ ((packed)); 744 745struct aac_AifEnsContainerEvent { | 751 * container */ 752} __attribute__ ((packed)); 753 754struct aac_AifEnsContainerEvent { |
746 u_int32_t container; /* container number */ 747 u_int32_t eventType; /* event type */ | 755 u_int32_t container; /* container number */ 756 u_int32_t eventType; /* event type */ |
748} __attribute__ ((packed)); 749 750struct aac_AifEnsEnclosureEvent { | 757} __attribute__ ((packed)); 758 759struct aac_AifEnsEnclosureEvent { |
751 u_int32_t empID; /* enclosure management proc number */ 752 u_int32_t unitID; /* unitId, fan id, power supply id, | 760 u_int32_t empID; /* enclosure management proc number */ 761 u_int32_t unitID; /* unitId, fan id, power supply id, |
753 * slot id, tempsensor id. */ | 762 * slot id, tempsensor id. */ |
754 u_int32_t eventType; /* event type */ | 763 u_int32_t eventType; /* event type */ |
755} __attribute__ ((packed)); 756 757struct aac_AifEnsBatteryEvent { | 764} __attribute__ ((packed)); 765 766struct aac_AifEnsBatteryEvent { |
758 AAC_NVBATT_TRANSITION transition_type; /* eg from low to ok */ 759 AAC_NVBATTSTATUS current_state; /* current batt state */ 760 AAC_NVBATTSTATUS prior_state; /* prev batt state */ | 767 AAC_NVBATT_TRANSITION transition_type; /* eg from low to ok */ 768 AAC_NVBATTSTATUS current_state; /* current batt state */ 769 AAC_NVBATTSTATUS prior_state; /* prev batt state */ |
761} __attribute__ ((packed)); 762 763struct aac_AifEnsDiskSetEvent { | 770} __attribute__ ((packed)); 771 772struct aac_AifEnsDiskSetEvent { |
764 u_int32_t eventType; 765 u_int64_t DsNum; 766 u_int64_t CreatorId; | 773 u_int32_t eventType; 774 u_int64_t DsNum; 775 u_int64_t CreatorId; |
767} __attribute__ ((packed)); 768 769typedef enum { | 776} __attribute__ ((packed)); 777 778typedef enum { |
770 CLUSTER_NULL_EVENT = 0, 771 CLUSTER_PARTNER_NAME_EVENT, /* change in partner hostname or | 779 CLUSTER_NULL_EVENT = 0, 780 CLUSTER_PARTNER_NAME_EVENT, /* change in partner hostname or |
772 * adaptername from NULL to non-NULL */ | 781 * adaptername from NULL to non-NULL */ |
773 /* (partner's agent may be up) */ 774 CLUSTER_PARTNER_NULL_NAME_EVENT /* change in partner hostname or | 782 /* (partner's agent may be up) */ 783 CLUSTER_PARTNER_NULL_NAME_EVENT /* change in partner hostname or |
775 * adaptername from non-null to NULL */ | 784 * adaptername from non-null to NULL */ |
776 /* (partner has rebooted) */ | 785 /* (partner has rebooted) */ |
777} AAC_ClusterAifEvent; 778 779struct aac_AifEnsClusterEvent { | 786} AAC_ClusterAifEvent; 787 788struct aac_AifEnsClusterEvent { |
780 AAC_ClusterAifEvent eventType; | 789 AAC_ClusterAifEvent eventType; |
781} __attribute__ ((packed)); 782 783struct aac_AifEventNotify { | 790} __attribute__ ((packed)); 791 792struct aac_AifEventNotify { |
784 AAC_AifEventNotifyType type; 785 union { 786 struct aac_AifEnsGeneric EG; 787 struct aac_AifEnsDeviceFailure EDF; 788 struct aac_AifEnsMirrorFailover EMF; 789 struct aac_AifEnsContainerChange ECC; 790 struct aac_AifEnsContainerEvent ECE; 791 struct aac_AifEnsEnclosureEvent EEE; 792 struct aac_AifEnsBatteryEvent EBE; 793 struct aac_AifEnsDiskSetEvent EDS; 794/* struct aac_AifEnsSMARTEvent ES;*/ 795 struct aac_AifEnsClusterEvent ECLE; 796 } data; | 793 AAC_AifEventNotifyType type; 794 union { 795 struct aac_AifEnsGeneric EG; 796 struct aac_AifEnsDeviceFailure EDF; 797 struct aac_AifEnsMirrorFailover EMF; 798 struct aac_AifEnsContainerChange ECC; 799 struct aac_AifEnsContainerEvent ECE; 800 struct aac_AifEnsEnclosureEvent EEE; 801 struct aac_AifEnsBatteryEvent EBE; 802 struct aac_AifEnsDiskSetEvent EDS; 803/* struct aac_AifEnsSMARTEvent ES;*/ 804 struct aac_AifEnsClusterEvent ECLE; 805 } data; |
797} __attribute__ ((packed)); 798 799/* 800 * Adapter Initiated FIB command structures. Start with the adapter 801 * initiated FIBs that really come from the adapter, and get responded 802 * to by the host. 803 */ 804#define AAC_AIF_REPORT_MAX_SIZE 64 805 806typedef enum { | 806} __attribute__ ((packed)); 807 808/* 809 * Adapter Initiated FIB command structures. Start with the adapter 810 * initiated FIBs that really come from the adapter, and get responded 811 * to by the host. 812 */ 813#define AAC_AIF_REPORT_MAX_SIZE 64 814 815typedef enum { |
807 AifCmdEventNotify = 1, /* Notify of event */ 808 AifCmdJobProgress, /* Progress report */ 809 AifCmdAPIReport, /* Report from other user of API */ 810 AifCmdDriverNotify, /* Notify host driver of event */ 811 AifReqJobList = 100, /* Gets back complete job list */ 812 AifReqJobsForCtr, /* Gets back jobs for specific container */ 813 AifReqJobsForScsi, /* Gets back jobs for specific SCSI device */ 814 AifReqJobReport, /* Gets back a specific job report or list */ 815 AifReqTerminateJob, /* Terminates job */ 816 AifReqSuspendJob, /* Suspends a job */ 817 AifReqResumeJob, /* Resumes a job */ 818 AifReqSendAPIReport, /* API generic report requests */ 819 AifReqAPIJobStart, /* Start a job from the API */ 820 AifReqAPIJobUpdate, /* Update a job report from the API */ 821 AifReqAPIJobFinish /* Finish a job from the API */ | 816 AifCmdEventNotify = 1, /* Notify of event */ 817 AifCmdJobProgress, /* Progress report */ 818 AifCmdAPIReport, /* Report from other user of API */ 819 AifCmdDriverNotify, /* Notify host driver of event */ 820 AifReqJobList = 100, /* Gets back complete job list */ 821 AifReqJobsForCtr, /* Gets back jobs for specific container */ 822 AifReqJobsForScsi, /* Gets back jobs for specific SCSI device */ 823 AifReqJobReport, /* Gets back a specific job report or list */ 824 AifReqTerminateJob, /* Terminates job */ 825 AifReqSuspendJob, /* Suspends a job */ 826 AifReqResumeJob, /* Resumes a job */ 827 AifReqSendAPIReport, /* API generic report requests */ 828 AifReqAPIJobStart, /* Start a job from the API */ 829 AifReqAPIJobUpdate, /* Update a job report from the API */ 830 AifReqAPIJobFinish /* Finish a job from the API */ |
822} AAC_AifCommand; 823 824struct aac_aif_command { | 831} AAC_AifCommand; 832 833struct aac_aif_command { |
825 AAC_AifCommand command; /* Tell host what type of 826 * notify this is */ 827 u_int32_t seqNumber; /* To allow ordering of 828 * reports (if necessary) */ 829 union { | 834 AAC_AifCommand command; /* Tell host what type of 835 * notify this is */ 836 u_int32_t seqNumber; /* To allow ordering of 837 * reports (if necessary) */ 838 union { |
830 struct aac_AifEventNotify EN; /* Event notify structure */ 831 struct aac_AifJobProgressReport PR[1]; /* Progress report */ 832 u_int8_t AR[AAC_AIF_REPORT_MAX_SIZE]; | 839 struct aac_AifEventNotify EN; /* Event notify structure */ 840 struct aac_AifJobProgressReport PR[1]; /* Progress report */ 841 u_int8_t AR[AAC_AIF_REPORT_MAX_SIZE]; |
833 } data; | 842 } data; |
834} __attribute__ ((packed)); 835 | 843} __attribute__ ((packed)); 844 |
836/****************************************************************************** | 845/* |
837 * Filesystem commands/data 838 * 839 * The adapter has a very complex filesystem interface, most of which we ignore. 840 * (And which seems not to be implemented, anyway.) 841 */ 842 843/* 844 * FSA commands 845 * (not used?) 846 */ 847typedef enum { | 846 * Filesystem commands/data 847 * 848 * The adapter has a very complex filesystem interface, most of which we ignore. 849 * (And which seems not to be implemented, anyway.) 850 */ 851 852/* 853 * FSA commands 854 * (not used?) 855 */ 856typedef enum { |
848 Null = 0, 849 GetAttributes, 850 SetAttributes, 851 Lookup, 852 ReadLink, 853 Read, 854 Write, 855 Create, 856 MakeDirectory, 857 SymbolicLink, 858 MakeNode, 859 Removex, 860 RemoveDirectory, 861 Rename, 862 Link, 863 ReadDirectory, 864 ReadDirectoryPlus, 865 FileSystemStatus, 866 FileSystemInfo, 867 PathConfigure, 868 Commit, 869 Mount, 870 UnMount, 871 Newfs, 872 FsCheck, 873 FsSync, 874 SimReadWrite, 875 SetFileSystemStatus, 876 BlockRead, 877 BlockWrite, 878 NvramIoctl, 879 FsSyncWait, 880 ClearArchiveBit, 881 SetAcl, 882 GetAcl, 883 AssignAcl, 884 FaultInsertion, 885 CrazyCache | 857 Null = 0, 858 GetAttributes, 859 SetAttributes, 860 Lookup, 861 ReadLink, 862 Read, 863 Write, 864 Create, 865 MakeDirectory, 866 SymbolicLink, 867 MakeNode, 868 Removex, 869 RemoveDirectory, 870 Rename, 871 Link, 872 ReadDirectory, 873 ReadDirectoryPlus, 874 FileSystemStatus, 875 FileSystemInfo, 876 PathConfigure, 877 Commit, 878 Mount, 879 UnMount, 880 Newfs, 881 FsCheck, 882 FsSync, 883 SimReadWrite, 884 SetFileSystemStatus, 885 BlockRead, 886 BlockWrite, 887 NvramIoctl, 888 FsSyncWait, 889 ClearArchiveBit, 890 SetAcl, 891 GetAcl, 892 AssignAcl, 893 FaultInsertion, 894 CrazyCache |
886} AAC_FSACommand; 887 888/* 889 * Command status values 890 */ 891typedef enum { | 895} AAC_FSACommand; 896 897/* 898 * Command status values 899 */ 900typedef enum { |
892 ST_OK = 0, 893 ST_PERM = 1, 894 ST_NOENT = 2, 895 ST_IO = 5, 896 ST_NXIO = 6, 897 ST_E2BIG = 7, 898 ST_ACCES = 13, 899 ST_EXIST = 17, 900 ST_XDEV = 18, 901 ST_NODEV = 19, 902 ST_NOTDIR = 20, 903 ST_ISDIR = 21, 904 ST_INVAL = 22, 905 ST_FBIG = 27, 906 ST_NOSPC = 28, 907 ST_ROFS = 30, 908 ST_MLINK = 31, 909 ST_WOULDBLOCK = 35, 910 ST_NAMETOOLONG = 63, 911 ST_NOTEMPTY = 66, 912 ST_DQUOT = 69, 913 ST_STALE = 70, 914 ST_REMOTE = 71, 915 ST_BADHANDLE = 10001, 916 ST_NOT_SYNC = 10002, 917 ST_BAD_COOKIE = 10003, 918 ST_NOTSUPP = 10004, 919 ST_TOOSMALL = 10005, 920 ST_SERVERFAULT = 10006, 921 ST_BADTYPE = 10007, 922 ST_JUKEBOX = 10008, 923 ST_NOTMOUNTED = 10009, 924 ST_MAINTMODE = 10010, 925 ST_STALEACL = 10011 | 901 ST_OK = 0, 902 ST_PERM = 1, 903 ST_NOENT = 2, 904 ST_IO = 5, 905 ST_NXIO = 6, 906 ST_E2BIG = 7, 907 ST_ACCES = 13, 908 ST_EXIST = 17, 909 ST_XDEV = 18, 910 ST_NODEV = 19, 911 ST_NOTDIR = 20, 912 ST_ISDIR = 21, 913 ST_INVAL = 22, 914 ST_FBIG = 27, 915 ST_NOSPC = 28, 916 ST_ROFS = 30, 917 ST_MLINK = 31, 918 ST_WOULDBLOCK = 35, 919 ST_NAMETOOLONG = 63, 920 ST_NOTEMPTY = 66, 921 ST_DQUOT = 69, 922 ST_STALE = 70, 923 ST_REMOTE = 71, 924 ST_BADHANDLE = 10001, 925 ST_NOT_SYNC = 10002, 926 ST_BAD_COOKIE = 10003, 927 ST_NOTSUPP = 10004, 928 ST_TOOSMALL = 10005, 929 ST_SERVERFAULT = 10006, 930 ST_BADTYPE = 10007, 931 ST_JUKEBOX = 10008, 932 ST_NOTMOUNTED = 10009, 933 ST_MAINTMODE = 10010, 934 ST_STALEACL = 10011 |
926} AAC_FSAStatus; 927 928/* 929 * Volume manager commands 930 */ 931typedef enum _VM_COMMANDS { | 935} AAC_FSAStatus; 936 937/* 938 * Volume manager commands 939 */ 940typedef enum _VM_COMMANDS { |
932 VM_Null = 0, 933 VM_NameServe, 934 VM_ContainerConfig, 935 VM_Ioctl, 936 VM_FilesystemIoctl, 937 VM_CloseAll, 938 VM_CtBlockRead, 939 VM_CtBlockWrite, 940 VM_SliceBlockRead, /* raw access to configured "storage objects" */ 941 VM_SliceBlockWrite, 942 VM_DriveBlockRead, /* raw access to physical devices */ 943 VM_DriveBlockWrite, 944 VM_EnclosureMgt, /* enclosure management */ 945 VM_Unused, /* used to be diskset management */ 946 VM_CtBlockVerify, 947 VM_CtPerf, /* performance test */ 948 VM_CtBlockRead64, 949 VM_CtBlockWrite64, 950 VM_CtBlockVerify64, | 941 VM_Null = 0, 942 VM_NameServe, 943 VM_ContainerConfig, 944 VM_Ioctl, 945 VM_FilesystemIoctl, 946 VM_CloseAll, 947 VM_CtBlockRead, 948 VM_CtBlockWrite, 949 VM_SliceBlockRead, /* raw access to configured storage objects */ 950 VM_SliceBlockWrite, 951 VM_DriveBlockRead, /* raw access to physical devices */ 952 VM_DriveBlockWrite, 953 VM_EnclosureMgt, /* enclosure management */ 954 VM_Unused, /* used to be diskset management */ 955 VM_CtBlockVerify, 956 VM_CtPerf, /* performance test */ 957 VM_CtBlockRead64, 958 VM_CtBlockWrite64, 959 VM_CtBlockVerify64, |
951} AAC_VMCommand; 952 953/* 954 * "mountable object" 955 */ 956struct aac_mntobj { | 960} AAC_VMCommand; 961 962/* 963 * "mountable object" 964 */ 965struct aac_mntobj { |
957 u_int32_t ObjectId; 958 char FileSystemName[16]; 959 struct aac_container_creation CreateInfo; 960 u_int32_t Capacity; 961 AAC_FSAVolType VolType; 962 AAC_FType ObjType; 963 u_int32_t ContentState; | 966 u_int32_t ObjectId; 967 char FileSystemName[16]; 968 struct aac_container_creation CreateInfo; 969 u_int32_t Capacity; 970 AAC_FSAVolType VolType; 971 AAC_FType ObjType; 972 u_int32_t ContentState; |
964#define FSCS_READONLY 0x0002 /* XXX need more information 965 * than this */ | 973#define FSCS_READONLY 0x0002 /* XXX need more information 974 * than this */ |
966 union { 967 u_int32_t pad[8]; 968 } ObjExtension; 969 u_int32_t AlterEgoId; | 975 union { 976 u_int32_t pad[8]; 977 } ObjExtension; 978 u_int32_t AlterEgoId; |
970} __attribute__ ((packed)); 971 972struct aac_mntinfo { | 979} __attribute__ ((packed)); 980 981struct aac_mntinfo { |
973 AAC_VMCommand Command; 974 AAC_FType MntType; 975 u_int32_t MntCount; | 982 AAC_VMCommand Command; 983 AAC_FType MntType; 984 u_int32_t MntCount; |
976} __attribute__ ((packed)); 977 978struct aac_mntinforesponse { | 985} __attribute__ ((packed)); 986 987struct aac_mntinforesponse { |
979 AAC_FSAStatus Status; 980 AAC_FType MntType; 981 u_int32_t MntRespCount; 982 struct aac_mntobj MntTable[1]; | 988 AAC_FSAStatus Status; 989 AAC_FType MntType; 990 u_int32_t MntRespCount; 991 struct aac_mntobj MntTable[1]; |
983} __attribute__ ((packed)); 984 985/* 986 * Container shutdown command. 987 */ 988struct aac_closecommand { | 992} __attribute__ ((packed)); 993 994/* 995 * Container shutdown command. 996 */ 997struct aac_closecommand { |
989 u_int32_t Command; 990 u_int32_t ContainerId; | 998 u_int32_t Command; 999 u_int32_t ContainerId; |
991} __attribute__ ((packed)); 992 993/* 994 * Write 'stability' options. 995 */ 996typedef enum { | 1000} __attribute__ ((packed)); 1001 1002/* 1003 * Write 'stability' options. 1004 */ 1005typedef enum { |
997 CSTABLE = 1, 998 CUNSTABLE | 1006 CSTABLE = 1, 1007 CUNSTABLE |
999} AAC_CacheLevel; 1000 1001/* 1002 * Commit level response for a write request. 1003 */ 1004typedef enum { | 1008} AAC_CacheLevel; 1009 1010/* 1011 * Commit level response for a write request. 1012 */ 1013typedef enum { |
1005 CMFILE_SYNC_NVRAM = 1, 1006 CMDATA_SYNC_NVRAM, 1007 CMFILE_SYNC, 1008 CMDATA_SYNC, 1009 CMUNSTABLE | 1014 CMFILE_SYNC_NVRAM = 1, 1015 CMDATA_SYNC_NVRAM, 1016 CMFILE_SYNC, 1017 CMDATA_SYNC, 1018 CMUNSTABLE |
1010} AAC_CommitLevel; 1011 1012/* 1013 * Block read/write operations. 1014 * These structures are packed into the 'data' area in the FIB. 1015 */ 1016 1017struct aac_blockread { | 1019} AAC_CommitLevel; 1020 1021/* 1022 * Block read/write operations. 1023 * These structures are packed into the 'data' area in the FIB. 1024 */ 1025 1026struct aac_blockread { |
1018 AAC_VMCommand Command; /* not FSACommand! */ 1019 u_int32_t ContainerId; 1020 u_int32_t BlockNumber; 1021 u_int32_t ByteCount; 1022 struct aac_sg_table SgMap; /* variable size */ | 1027 AAC_VMCommand Command; /* not FSACommand! */ 1028 u_int32_t ContainerId; 1029 u_int32_t BlockNumber; 1030 u_int32_t ByteCount; 1031 struct aac_sg_table SgMap; /* variable size */ |
1023} __attribute__ ((packed)); 1024 1025struct aac_blockread_response { | 1032} __attribute__ ((packed)); 1033 1034struct aac_blockread_response { |
1026 AAC_FSAStatus Status; 1027 u_int32_t ByteCount; | 1035 AAC_FSAStatus Status; 1036 u_int32_t ByteCount; |
1028} __attribute__ ((packed)); 1029 1030struct aac_blockwrite { | 1037} __attribute__ ((packed)); 1038 1039struct aac_blockwrite { |
1031 AAC_VMCommand Command; /* not FSACommand! */ 1032 u_int32_t ContainerId; 1033 u_int32_t BlockNumber; 1034 u_int32_t ByteCount; 1035 AAC_CacheLevel Stable; 1036 struct aac_sg_table SgMap; /* variable size */ | 1040 AAC_VMCommand Command; /* not FSACommand! */ 1041 u_int32_t ContainerId; 1042 u_int32_t BlockNumber; 1043 u_int32_t ByteCount; 1044 AAC_CacheLevel Stable; 1045 struct aac_sg_table SgMap; /* variable size */ |
1037} __attribute__ ((packed)); 1038 1039struct aac_blockwrite_response { | 1046} __attribute__ ((packed)); 1047 1048struct aac_blockwrite_response { |
1040 AAC_FSAStatus Status; 1041 u_int32_t ByteCount; 1042 AAC_CommitLevel Committed; | 1049 AAC_FSAStatus Status; 1050 u_int32_t ByteCount; 1051 AAC_CommitLevel Committed; |
1043} __attribute__ ((packed)); 1044 1045/* 1046 * Container shutdown command. 1047 */ 1048struct aac_close_command { | 1052} __attribute__ ((packed)); 1053 1054/* 1055 * Container shutdown command. 1056 */ 1057struct aac_close_command { |
1049 AAC_VMCommand Command; 1050 u_int32_t ContainerId; | 1058 AAC_VMCommand Command; 1059 u_int32_t ContainerId; |
1051}; 1052 | 1060}; 1061 |
1053/****************************************************************************** | 1062/* |
1054 * Register definitions for the Adaptec AAC-364 'Jalapeno I/II' adapters, based 1055 * on the SA110 'StrongArm'. 1056 */ 1057 1058#define AAC_SA_DOORBELL0_CLEAR 0x98 /* doorbell 0 (adapter->host) */ 1059#define AAC_SA_DOORBELL0_SET 0x9c 1060#define AAC_SA_DOORBELL0 0x9c 1061#define AAC_SA_MASK0_CLEAR 0xa0 1062#define AAC_SA_MASK0_SET 0xa4 1063 1064#define AAC_SA_DOORBELL1_CLEAR 0x9a /* doorbell 1 (host->adapter) */ 1065#define AAC_SA_DOORBELL1_SET 0x9e 1066#define AAC_SA_MASK1_CLEAR 0xa2 1067#define AAC_SA_MASK1_SET 0xa6 1068 1069#define AAC_SA_MAILBOX 0xa8 /* mailbox (20 bytes) */ 1070#define AAC_SA_FWSTATUS 0xc4 1071 | 1063 * Register definitions for the Adaptec AAC-364 'Jalapeno I/II' adapters, based 1064 * on the SA110 'StrongArm'. 1065 */ 1066 1067#define AAC_SA_DOORBELL0_CLEAR 0x98 /* doorbell 0 (adapter->host) */ 1068#define AAC_SA_DOORBELL0_SET 0x9c 1069#define AAC_SA_DOORBELL0 0x9c 1070#define AAC_SA_MASK0_CLEAR 0xa0 1071#define AAC_SA_MASK0_SET 0xa4 1072 1073#define AAC_SA_DOORBELL1_CLEAR 0x9a /* doorbell 1 (host->adapter) */ 1074#define AAC_SA_DOORBELL1_SET 0x9e 1075#define AAC_SA_MASK1_CLEAR 0xa2 1076#define AAC_SA_MASK1_SET 0xa6 1077 1078#define AAC_SA_MAILBOX 0xa8 /* mailbox (20 bytes) */ 1079#define AAC_SA_FWSTATUS 0xc4 1080 |
1072/****************************************************************************** | 1081/* |
1073 * Register definitions for the Adaptec 'Pablano' adapters, based on the i960Rx, 1074 * and other related adapters. 1075 */ 1076 1077#define AAC_RX_IDBR 0x20 /* inbound doorbell register */ 1078#define AAC_RX_IISR 0x24 /* inbound interrupt status register */ 1079#define AAC_RX_IIMR 0x28 /* inbound interrupt mask register */ 1080#define AAC_RX_ODBR 0x2c /* outbound doorbell register */ 1081#define AAC_RX_OISR 0x30 /* outbound interrupt status register */ 1082#define AAC_RX_OIMR 0x34 /* outbound interrupt mask register */ 1083 1084#define AAC_RX_MAILBOX 0x50 /* mailbox (20 bytes) */ 1085#define AAC_RX_FWSTATUS 0x6c 1086 | 1082 * Register definitions for the Adaptec 'Pablano' adapters, based on the i960Rx, 1083 * and other related adapters. 1084 */ 1085 1086#define AAC_RX_IDBR 0x20 /* inbound doorbell register */ 1087#define AAC_RX_IISR 0x24 /* inbound interrupt status register */ 1088#define AAC_RX_IIMR 0x28 /* inbound interrupt mask register */ 1089#define AAC_RX_ODBR 0x2c /* outbound doorbell register */ 1090#define AAC_RX_OISR 0x30 /* outbound interrupt status register */ 1091#define AAC_RX_OIMR 0x34 /* outbound interrupt mask register */ 1092 1093#define AAC_RX_MAILBOX 0x50 /* mailbox (20 bytes) */ 1094#define AAC_RX_FWSTATUS 0x6c 1095 |
1087/****************************************************************************** | 1096/* |
1088 * Common bit definitions for the doorbell registers. 1089 */ 1090 1091/* 1092 * Status bits in the doorbell registers. 1093 */ 1094#define AAC_DB_SYNC_COMMAND (1<<0) /* send/completed synchronous FIB */ 1095#define AAC_DB_COMMAND_READY (1<<1) /* posted one or more commands */ --- 9 unchanged lines hidden (view full) --- 1105 * (ODBR and IDBR respectively for the i960Rx adapters) 1106 */ 1107#define AAC_DB_PRINTF (1<<5) /* adapter requests host printf */ 1108 1109/* 1110 * Mask containing the interrupt bits we care about. We don't anticipate (or 1111 * want) interrupts not in this mask. 1112 */ | 1097 * Common bit definitions for the doorbell registers. 1098 */ 1099 1100/* 1101 * Status bits in the doorbell registers. 1102 */ 1103#define AAC_DB_SYNC_COMMAND (1<<0) /* send/completed synchronous FIB */ 1104#define AAC_DB_COMMAND_READY (1<<1) /* posted one or more commands */ --- 9 unchanged lines hidden (view full) --- 1114 * (ODBR and IDBR respectively for the i960Rx adapters) 1115 */ 1116#define AAC_DB_PRINTF (1<<5) /* adapter requests host printf */ 1117 1118/* 1119 * Mask containing the interrupt bits we care about. We don't anticipate (or 1120 * want) interrupts not in this mask. 1121 */ |
1113#define AAC_DB_INTERRUPTS (AAC_DB_COMMAND_READY | AAC_DB_RESPONSE_READY | AAC_DB_PRINTF) | 1122#define AAC_DB_INTERRUPTS (AAC_DB_COMMAND_READY | \ 1123 AAC_DB_RESPONSE_READY | \ 1124 AAC_DB_PRINTF) |