1 #if (!defined(dprintk))
5 /*------------------------------------------------------------------------------
7 *----------------------------------------------------------------------------*/
9 #define MAXIMUM_NUM_CONTAINERS 32
11 #define AAC_NUM_FIB (256 + 64)
12 #define AAC_NUM_IO_FIB 100
14 #define AAC_MAX_LUN (8)
16 #define AAC_MAX_HOSTPHYSMEMPAGES (0xfffff)
19 * These macros convert from physical channels to virtual channels
21 #define CONTAINER_CHANNEL (0)
22 #define ID_LUN_TO_CONTAINER(id, lun) (id)
23 #define CONTAINER_TO_CHANNEL(cont) (CONTAINER_CHANNEL)
24 #define CONTAINER_TO_ID(cont) (cont)
25 #define CONTAINER_TO_LUN(cont) (0)
27 #define aac_phys_to_logical(x) (x+1)
28 #define aac_logical_to_phys(x) (x?x-1:0)
30 /* #define AAC_DETAILED_STATUS_INFO */
41 * DON'T CHANGE THE ORDER, this is set by the firmware
54 #define CT_RAID10 10 /* stripe of mirror */
55 #define CT_RAID00 11 /* stripe of stripe */
56 #define CT_VOLUME_OF_MIRRORS 12 /* volume of mirror */
57 #define CT_PSEUDO_RAID 13 /* really raid4 */
58 #define CT_LAST_VOLUME_TYPE 14
62 * Types of objects addressable in some fashion by the client.
63 * This is a superset of those objects handled just by the filesystem
64 * and includes "raw" objects that an administrator would use to
65 * configure containers and filesystems.
68 #define FT_REG 1 /* regular file */
69 #define FT_DIR 2 /* directory */
70 #define FT_BLK 3 /* "block" device - reserved */
71 #define FT_CHR 4 /* "character special" device - reserved */
72 #define FT_LNK 5 /* symbolic link */
73 #define FT_SOCK 6 /* socket */
74 #define FT_FIFO 7 /* fifo */
75 #define FT_FILESYS 8 /* ADAPTEC's "FSA"(tm) filesystem */
76 #define FT_DRIVE 9 /* physical disk - addressable in scsi by bus/id/lun */
77 #define FT_SLICE 10 /* virtual disk - raw volume - slice */
78 #define FT_PARTITION 11 /* FSA partition - carved out of a slice - building block for containers */
79 #define FT_VOLUME 12 /* Container - Volume Set */
80 #define FT_STRIPE 13 /* Container - Stripe Set */
81 #define FT_MIRROR 14 /* Container - Mirror Set */
82 #define FT_RAID5 15 /* Container - Raid 5 Set */
83 #define FT_DATABASE 16 /* Storage object with "foreign" content manager */
86 * Host side memory scatter gather list
87 * Used by the adapter for read, write, and readdirplus operations
88 * We have separate 32 and 64 bit version because even
89 * on 64 bit systems not all cards support the 64 bit version
92 u32 addr; /* 32-bit address. */
93 u32 count; /* Length. */
97 u32 addr[2]; /* 64-bit addr. 2 pieces for data alignment */
98 u32 count; /* Length. */
104 * This is the SGMAP structure for all commands that use
110 struct sgentry sg[1];
115 struct sgentry64 sg[1];
120 u8 buildnum; /* e.g., 588 */
121 u8 usec; /* e.g., 588 */
122 u8 via; /* e.g., 1 = FSU,
125 u8 year; /* e.g., 1997 = 97 */
127 * unsigned Month :4; // 1 - 12
128 * unsigned Day :6; // 1 - 32
129 * unsigned Hour :6; // 0 - 23
130 * unsigned Minute :6; // 0 - 60
131 * unsigned Second :6; // 0 - 60
133 u32 serial[2]; /* e.g., 0x1DEADB0BFAFAF001 */
138 * Define all the constants needed for the communication interface
142 * Define how many queue entries each queue will have and the total
143 * number of entries for the entire communication interface. Also define
144 * how many queues we support.
146 * This has to match the controller
149 #define NUMBER_OF_COMM_QUEUES 8 // 4 command; 4 response
150 #define HOST_HIGH_CMD_ENTRIES 4
151 #define HOST_NORM_CMD_ENTRIES 8
152 #define ADAP_HIGH_CMD_ENTRIES 4
153 #define ADAP_NORM_CMD_ENTRIES 512
154 #define HOST_HIGH_RESP_ENTRIES 4
155 #define HOST_NORM_RESP_ENTRIES 512
156 #define ADAP_HIGH_RESP_ENTRIES 4
157 #define ADAP_NORM_RESP_ENTRIES 8
159 #define TOTAL_QUEUE_ENTRIES \
160 (HOST_NORM_CMD_ENTRIES + HOST_HIGH_CMD_ENTRIES + ADAP_NORM_CMD_ENTRIES + ADAP_HIGH_CMD_ENTRIES + \
161 HOST_NORM_RESP_ENTRIES + HOST_HIGH_RESP_ENTRIES + ADAP_NORM_RESP_ENTRIES + ADAP_HIGH_RESP_ENTRIES)
165 * Set the queues on a 16 byte alignment
168 #define QUEUE_ALIGNMENT 16
171 * The queue headers define the Communication Region queues. These
172 * are physically contiguous and accessible by both the adapter and the
173 * host. Even though all queue headers are in the same contiguous block
174 * they will be represented as individual units in the data structures.
178 u32 size; /* Size in bytes of Fib which this QE points to */
179 u32 addr; /* Receiver address of the FIB */
183 * The adapter assumes the ProducerIndex and ConsumerIndex are grouped
184 * adjacently and in that order.
188 u64 header_addr; /* Address to hand the adapter to access to this queue head */
189 u32 *producer; /* The producer index for this queue (host address) */
190 u32 *consumer; /* The consumer index for this queue (host address) */
194 * Define all the events which the adapter would like to notify
198 #define HostNormCmdQue 1 /* Change in host normal priority command queue */
199 #define HostHighCmdQue 2 /* Change in host high priority command queue */
200 #define HostNormRespQue 3 /* Change in host normal priority response queue */
201 #define HostHighRespQue 4 /* Change in host high priority response queue */
202 #define AdapNormRespNotFull 5
203 #define AdapHighRespNotFull 6
204 #define AdapNormCmdNotFull 7
205 #define AdapHighCmdNotFull 8
206 #define SynchCommandComplete 9
207 #define AdapInternalError 0xfe /* The adapter detected an internal error shutting down */
210 * Define all the events the host wishes to notify the
211 * adapter of. The first four values much match the Qid the
212 * corresponding queue.
215 #define AdapNormCmdQue 2
216 #define AdapHighCmdQue 3
217 #define AdapNormRespQue 6
218 #define AdapHighRespQue 7
219 #define HostShutdown 8
220 #define HostPowerFail 9
221 #define FatalCommError 10
222 #define HostNormRespNotFull 11
223 #define HostHighRespNotFull 12
224 #define HostNormCmdNotFull 13
225 #define HostHighCmdNotFull 14
227 #define AdapPrintfDone 16
230 * Define all the queues that the adapter and host use to communicate
231 * Number them to match the physical queue layout.
234 enum aac_queue_types {
235 HostNormCmdQueue = 0, /* Adapter to host normal priority command traffic */
236 HostHighCmdQueue, /* Adapter to host high priority command traffic */
237 AdapNormCmdQueue, /* Host to adapter normal priority command traffic */
238 AdapHighCmdQueue, /* Host to adapter high priority command traffic */
239 HostNormRespQueue, /* Adapter to host normal priority response traffic */
240 HostHighRespQueue, /* Adapter to host high priority response traffic */
241 AdapNormRespQueue, /* Host to adapter normal priority response traffic */
242 AdapHighRespQueue /* Host to adapter high priority response traffic */
246 * Assign type values to the FSA communication data structures
249 #define FIB_MAGIC 0x0001
252 * Define the priority levels the FSA communication routines support.
259 * Define the FIB. The FIB is the where all the requested data and
260 * command information are put to the application on the FSA adapter.
264 u32 XferState; // Current transfer state for this CCB
265 u16 Command; // Routing information for the destination
266 u8 StructType; // Type FIB
267 u8 Flags; // Flags for FIB
268 u16 Size; // Size of this FIB in bytes
269 u16 SenderSize; // Size of the FIB in the sender (for response sizing)
270 u32 SenderFibAddress; // Host defined data in the FIB
271 u32 ReceiverFibAddress; // Logical address of this FIB for the adapter
272 u32 SenderData; // Place holder for the sender to store data
275 u32 _ReceiverTimeStart; // Timestamp for receipt of fib
276 u32 _ReceiverTimeDone; // Timestamp for completion of fib
281 #define FIB_DATA_SIZE_IN_BYTES (512 - sizeof(struct aac_fibhdr))
285 struct aac_fibhdr header;
286 u8 data[FIB_DATA_SIZE_IN_BYTES]; // Command specific data
293 #define TestCommandResponse 1
294 #define TestAdapterCommand 2
296 * Lowlevel and comm commands
298 #define LastTestCommand 100
299 #define ReinitHostNormCommandQueue 101
300 #define ReinitHostHighCommandQueue 102
301 #define ReinitHostHighRespQueue 103
302 #define ReinitHostNormRespQueue 104
303 #define ReinitAdapNormCommandQueue 105
304 #define ReinitAdapHighCommandQueue 107
305 #define ReinitAdapHighRespQueue 108
306 #define ReinitAdapNormRespQueue 109
307 #define InterfaceShutdown 110
308 #define DmaCommandFib 120
309 #define StartProfile 121
310 #define TermProfile 122
311 #define SpeedTest 123
312 #define TakeABreakPt 124
313 #define RequestPerfData 125
314 #define SetInterruptDefTimer 126
315 #define SetInterruptDefCount 127
316 #define GetInterruptDefStatus 128
317 #define LastCommCommand 129
319 * Filesystem commands
321 #define NuFileSystem 300
323 #define HostFileSystem 302
324 #define LastFileSystemCommand 303
328 #define ContainerCommand 500
329 #define ContainerCommand64 501
333 #define ClusterCommand 550
335 * Scsi Port commands (scsi passthrough)
337 #define ScsiPortCommand 600
338 #define ScsiPortCommand64 601
340 * Misc house keeping and generic adapter initiated commands
342 #define AifRequest 700
343 #define CheckRevision 701
344 #define FsaHostShutdown 702
345 #define RequestAdapterInfo 703
346 #define IsAdapterPaused 704
347 #define SendHostTime 705
348 #define LastMiscCommand 706
351 // Commands that will target the failover level on the FSA adapter
354 enum fib_xfer_state {
356 AdapterOwned = (1<<1),
357 FibInitialized = (1<<2),
359 AllocatedFromPool = (1<<4),
360 SentFromHost = (1<<5),
361 SentFromAdapter = (1<<6),
362 ResponseExpected = (1<<7),
363 NoResponseExpected = (1<<8),
364 AdapterProcessed = (1<<9),
365 HostProcessed = (1<<10),
366 HighPriority = (1<<11),
367 NormalPriority = (1<<12),
369 AsyncIo = (1<<13), // rpbfix: remove with new regime
370 PageFileIo = (1<<14), // rpbfix: remove with new regime
371 ShutdownRequest = (1<<15),
372 LazyWrite = (1<<16), // rpbfix: remove with new regime
373 AdapterMicroFib = (1<<17),
374 BIOSFibPath = (1<<18),
375 FastResponseCapable = (1<<19),
376 ApiFib = (1<<20) // Its an API Fib.
380 * The following defines needs to be updated any time there is an
381 * incompatible change made to the aac_init structure.
384 #define ADAPTER_INIT_STRUCT_REVISION 3
388 u32 InitStructRevision;
389 u32 MiniPortRevision;
391 u32 CommHeaderAddress;
392 u32 FastIoCommAreaAddress;
393 u32 AdapterFibsPhysicalAddress;
394 u32 AdapterFibsVirtualAddress;
399 u32 HostPhysMemPages; // number of 4k pages of host physical memory
400 u32 HostElapsedSeconds; // number of seconds since 1970.
405 LOG_AAC_INFORMATIONAL = 20,
406 LOG_AAC_WARNING = 30,
407 LOG_AAC_LOW_ERROR = 40,
408 LOG_AAC_MEDIUM_ERROR = 50,
409 LOG_AAC_HIGH_ERROR = 60,
412 LOG_AAC_WINDBG_PRINT = 90
415 #define FSAFS_NTC_GET_ADAPTER_FIB_CONTEXT 0x030b
416 #define FSAFS_NTC_FIB_CONTEXT 0x030c
422 void (*adapter_interrupt)(struct aac_dev *dev);
423 void (*adapter_notify)(struct aac_dev *dev, u32 event);
424 int (*adapter_sync_cmd)(struct aac_dev *dev, u32 command, u32 p1, u32 *status);
425 int (*adapter_check_health)(struct aac_dev *dev);
429 * Define which interrupt handler needs to be installed
432 struct aac_driver_ident
434 int (*init)(struct aac_dev *dev);
442 * Some adapter firmware needs communication memory
443 * below 2gig. This tells the init function to set the
444 * dma mask such that fib memory will be allocated where the
445 * adapter firmware can get to it.
447 #define AAC_QUIRK_31BIT 0x0001
450 * Some adapter firmware, when the raid card's cache is turned off, can not
451 * split up scatter gathers in order to deal with the limits of the
452 * underlying CHIM. This limit is 34 scatter gather elements.
454 #define AAC_QUIRK_34SG 0x0002
457 * This adapter is a slave (no Firmware)
459 #define AAC_QUIRK_SLAVE 0x0004
462 * This adapter is a master.
464 #define AAC_QUIRK_MASTER 0x0008
467 * The adapter interface specs all queues to be located in the same
468 * physically contigous block. The host structure that defines the
469 * commuication queues will assume they are each a separate physically
470 * contigous memory region that will support them all being one big
472 * There is a command and response queue for each level and direction of
473 * commuication. These regions are accessed by both the host and adapter.
477 u64 logical; /*address we give the adapter */
478 struct aac_entry *base; /*system virtual address */
479 struct aac_qhdr headers; /*producer,consumer q headers*/
480 u32 entries; /*Number of queue entries */
481 wait_queue_head_t qfull; /*Event to wait on if q full */
482 wait_queue_head_t cmdready; /*Cmd ready from the adapter */
483 /* This is only valid for adapter to host command queues. */
484 spinlock_t *lock; /* Spinlock for this queue must take this lock before accessing the lock */
485 spinlock_t lockdata; /* Actual lock (used only on one side of the lock) */
486 unsigned long SavedIrql; /* Previous IRQL when the spin lock is taken */
487 u32 padding; /* Padding - FIXME - can remove I believe */
488 struct list_head cmdq; /* A queue of FIBs which need to be prcessed by the FS thread. This is */
489 /* only valid for command queues which receive entries from the adapter. */
490 struct list_head pendingq; /* A queue of outstanding fib's to the adapter. */
491 u32 numpending; /* Number of entries on outstanding queue. */
492 struct aac_dev * dev; /* Back pointer to adapter structure */
496 * Message queues. The order here is important, see also the
497 * queue type ordering
500 struct aac_queue_block
502 struct aac_queue queue[8];
506 * SaP1 Message Unit Registers
509 struct sa_drawbridge_CSR {
511 u32 reserved[10]; // 00h-27h | Reserved
512 u8 LUT_Offset; // 28h | Looup Table Offset
513 u8 reserved1[3]; // 29h-2bh | Reserved
514 u32 LUT_Data; // 2ch | Looup Table Data
515 u32 reserved2[26]; // 30h-97h | Reserved
516 u16 PRICLEARIRQ; // 98h | Primary Clear Irq
517 u16 SECCLEARIRQ; // 9ah | Secondary Clear Irq
518 u16 PRISETIRQ; // 9ch | Primary Set Irq
519 u16 SECSETIRQ; // 9eh | Secondary Set Irq
520 u16 PRICLEARIRQMASK; // a0h | Primary Clear Irq Mask
521 u16 SECCLEARIRQMASK; // a2h | Secondary Clear Irq Mask
522 u16 PRISETIRQMASK; // a4h | Primary Set Irq Mask
523 u16 SECSETIRQMASK; // a6h | Secondary Set Irq Mask
524 u32 MAILBOX0; // a8h | Scratchpad 0
525 u32 MAILBOX1; // ach | Scratchpad 1
526 u32 MAILBOX2; // b0h | Scratchpad 2
527 u32 MAILBOX3; // b4h | Scratchpad 3
528 u32 MAILBOX4; // b8h | Scratchpad 4
529 u32 MAILBOX5; // bch | Scratchpad 5
530 u32 MAILBOX6; // c0h | Scratchpad 6
531 u32 MAILBOX7; // c4h | Scratchpad 7
533 u32 ROM_Setup_Data; // c8h | Rom Setup and Data
534 u32 ROM_Control_Addr; // cch | Rom Control and Address
536 u32 reserved3[12]; // d0h-ffh | reserved
537 u32 LUT[64]; // 100h-1ffh| Lookup Table Entries
541 // need to add DMA, I2O, UART, etc registers form 80h to 364h
546 #define Mailbox0 SaDbCSR.MAILBOX0
547 #define Mailbox1 SaDbCSR.MAILBOX1
548 #define Mailbox2 SaDbCSR.MAILBOX2
549 #define Mailbox3 SaDbCSR.MAILBOX3
550 #define Mailbox4 SaDbCSR.MAILBOX4
551 #define Mailbox5 SaDbCSR.MAILBOX5
552 #define Mailbox7 SaDbCSR.MAILBOX7
554 #define DoorbellReg_p SaDbCSR.PRISETIRQ
555 #define DoorbellReg_s SaDbCSR.SECSETIRQ
556 #define DoorbellClrReg_p SaDbCSR.PRICLEARIRQ
559 #define DOORBELL_0 cpu_to_le16(0x0001)
560 #define DOORBELL_1 cpu_to_le16(0x0002)
561 #define DOORBELL_2 cpu_to_le16(0x0004)
562 #define DOORBELL_3 cpu_to_le16(0x0008)
563 #define DOORBELL_4 cpu_to_le16(0x0010)
564 #define DOORBELL_5 cpu_to_le16(0x0020)
565 #define DOORBELL_6 cpu_to_le16(0x0040)
568 #define PrintfReady DOORBELL_5
569 #define PrintfDone DOORBELL_5
571 struct sa_registers {
572 struct sa_drawbridge_CSR SaDbCSR; /* 98h - c4h */
576 #define Sa_MINIPORT_REVISION 1
578 #define sa_readw(AEP, CSR) readl(&((AEP)->regs.sa->CSR))
579 #define sa_readl(AEP, CSR) readl(&((AEP)->regs.sa->CSR))
580 #define sa_writew(AEP, CSR, value) writew(value, &((AEP)->regs.sa->CSR))
581 #define sa_writel(AEP, CSR, value) writel(value, &((AEP)->regs.sa->CSR))
584 * Rx Message Unit Registers
587 struct rx_mu_registers {
588 // Local | PCI* | Name
590 u32 ARSR; // 1300h | 00h | APIC Register Select Register
591 u32 reserved0; // 1304h | 04h | Reserved
592 u32 AWR; // 1308h | 08h | APIC Window Register
593 u32 reserved1; // 130Ch | 0Ch | Reserved
594 u32 IMRx[2]; // 1310h | 10h | Inbound Message Registers
595 u32 OMRx[2]; // 1318h | 18h | Outbound Message Registers
596 u32 IDR; // 1320h | 20h | Inbound Doorbell Register
597 u32 IISR; // 1324h | 24h | Inbound Interrupt Status Register
598 u32 IIMR; // 1328h | 28h | Inbound Interrupt Mask Register
599 u32 ODR; // 132Ch | 2Ch | Outbound Doorbell Register
600 u32 OISR; // 1330h | 30h | Outbound Interrupt Status Register
601 u32 OIMR; // 1334h | 34h | Outbound Interrupt Mask Register
602 // * Must access through ATU Inbound Translation Window
609 #define InboundMailbox0 IndexRegs.Mailbox[0]
610 #define InboundMailbox1 IndexRegs.Mailbox[1]
611 #define InboundMailbox2 IndexRegs.Mailbox[2]
612 #define InboundMailbox3 IndexRegs.Mailbox[3]
613 #define InboundMailbox4 IndexRegs.Mailbox[4]
614 #define InboundMailbox5 IndexRegs.Mailbox[5]
615 #define InboundMailbox6 IndexRegs.Mailbox[6]
616 #define InboundMailbox7 IndexRegs.Mailbox[7]
618 #define INBOUNDDOORBELL_0 cpu_to_le32(0x00000001)
619 #define INBOUNDDOORBELL_1 cpu_to_le32(0x00000002)
620 #define INBOUNDDOORBELL_2 cpu_to_le32(0x00000004)
621 #define INBOUNDDOORBELL_3 cpu_to_le32(0x00000008)
622 #define INBOUNDDOORBELL_4 cpu_to_le32(0x00000010)
623 #define INBOUNDDOORBELL_5 cpu_to_le32(0x00000020)
624 #define INBOUNDDOORBELL_6 cpu_to_le32(0x00000040)
626 #define OUTBOUNDDOORBELL_0 cpu_to_le32(0x00000001)
627 #define OUTBOUNDDOORBELL_1 cpu_to_le32(0x00000002)
628 #define OUTBOUNDDOORBELL_2 cpu_to_le32(0x00000004)
629 #define OUTBOUNDDOORBELL_3 cpu_to_le32(0x00000008)
630 #define OUTBOUNDDOORBELL_4 cpu_to_le32(0x00000010)
632 #define InboundDoorbellReg MUnit.IDR
633 #define OutboundDoorbellReg MUnit.ODR
635 struct rx_registers {
636 struct rx_mu_registers MUnit; // 1300h - 1334h
637 u32 reserved1[6]; // 1338h - 134ch
638 struct rx_inbound IndexRegs;
641 #define rx_readb(AEP, CSR) readb(&((AEP)->regs.rx->CSR))
642 #define rx_readl(AEP, CSR) readl(&((AEP)->regs.rx->CSR))
643 #define rx_writeb(AEP, CSR, value) writeb(value, &((AEP)->regs.rx->CSR))
644 #define rx_writel(AEP, CSR, value) writel(value, &((AEP)->regs.rx->CSR))
647 * Rkt Message Unit Registers (same as Rx, except a larger reserve region)
650 #define rkt_mu_registers rx_mu_registers
651 #define rkt_inbound rx_inbound
653 struct rkt_registers {
654 struct rkt_mu_registers MUnit; /* 1300h - 1334h */
655 u32 reserved1[1010]; /* 1338h - 22fch */
656 struct rkt_inbound IndexRegs; /* 2300h - */
659 #define rkt_readb(AEP, CSR) readb(&((AEP)->regs.rkt->CSR))
660 #define rkt_readl(AEP, CSR) readl(&((AEP)->regs.rkt->CSR))
661 #define rkt_writeb(AEP, CSR, value) writeb(value, &((AEP)->regs.rkt->CSR))
662 #define rkt_writel(AEP, CSR, value) writel(value, &((AEP)->regs.rkt->CSR))
666 typedef void (*fib_callback)(void *ctxt, struct fib *fibctx);
668 struct aac_fib_context {
669 s16 type; // used for verification of structure
671 u32 unique; // unique value representing this context
672 ulong jiffies; // used for cleanup - dmb changed to ulong
673 struct list_head next; // used to link context's into a linked list
674 struct semaphore wait_sem; // this is used to wait for the next fib to arrive.
675 int wait; // Set to true when thread is in WaitForSingleObject
676 unsigned long count; // total number of FIBs on FibList
677 struct list_head fib_list; // this holds fibs and their attachd hw_fibs
681 u8 error_code; /* 70h (current errors), 71h(deferred errors) */
682 u8 valid:1; /* A valid bit of one indicates that the information */
683 /* field contains valid information as defined in the
686 u8 segment_number; /* Only used for COPY, COMPARE, or COPY AND VERIFY Commands */
687 u8 sense_key:4; /* Sense Key */
689 u8 ILI:1; /* Incorrect Length Indicator */
690 u8 EOM:1; /* End Of Medium - reserved for random access devices */
691 u8 filemark:1; /* Filemark - reserved for random access devices */
693 u8 information[4]; /* for direct-access devices, contains the unsigned
694 * logical block address or residue associated with
697 u8 add_sense_len; /* number of additional sense bytes to follow this field */
698 u8 cmnd_info[4]; /* not used */
699 u8 ASC; /* Additional Sense Code */
700 u8 ASCQ; /* Additional Sense Code Qualifier */
701 u8 FRUC; /* Field Replaceable Unit Code - not used */
702 u8 bit_ptr:3; /* indicates which byte of the CDB or parameter data
705 u8 BPV:1; /* bit pointer valid (BPV): 1- indicates that
706 * the bit_ptr field has valid value
709 u8 CD:1; /* command data bit: 1- illegal parameter in CDB.
710 * 0- illegal parameter in data.
713 u8 field_ptr[2]; /* byte of the CDB or parameter data in error */
716 struct fsa_dev_info {
726 struct sense_data sense_data;
730 void *next; /* this is used by the allocator */
734 * The Adapter that this I/O is destined for.
738 * This is the event the sendfib routine will wait on if the
739 * caller did not pass one and this is synch io.
741 struct semaphore event_wait;
742 spinlock_t event_lock;
744 u32 done; /* gets set to 1 when fib is complete */
745 fib_callback callback;
747 u32 flags; // u32 dmb was ulong
749 * The following is used to put this fib context onto the
750 * Outstanding I/O queue.
752 struct list_head queue;
754 * And for the internal issue/reply queues (we may be able
755 * to merge these two)
757 struct list_head fiblink;
759 struct hw_fib *hw_fib; /* Actual shared object */
760 dma_addr_t hw_fib_pa; /* physical address of hw_fib*/
764 * Adapter Information Block
766 * This is returned by the RequestAdapterInfo block
769 struct aac_adapter_info
787 u32 clusterchannelmask;
797 #define AAC_BAT_REQ_PRESENT (1)
798 #define AAC_BAT_REQ_NOTPRESENT (2)
799 #define AAC_BAT_OPT_PRESENT (3)
800 #define AAC_BAT_OPT_NOTPRESENT (4)
801 #define AAC_BAT_NOT_SUPPORTED (5)
805 #define AAC_CPU_SIMULATOR (1)
806 #define AAC_CPU_I960 (2)
807 #define AAC_CPU_STRONGARM (3)
812 #define AAC_OPT_SNAPSHOT cpu_to_le32(1)
813 #define AAC_OPT_CLUSTERS cpu_to_le32(1<<1)
814 #define AAC_OPT_WRITE_CACHE cpu_to_le32(1<<2)
815 #define AAC_OPT_64BIT_DATA cpu_to_le32(1<<3)
816 #define AAC_OPT_HOST_TIME_FIB cpu_to_le32(1<<4)
817 #define AAC_OPT_RAID50 cpu_to_le32(1<<5)
818 #define AAC_OPT_4GB_WINDOW cpu_to_le32(1<<6)
819 #define AAC_OPT_SCSI_UPGRADEABLE cpu_to_le32(1<<7)
820 #define AAC_OPT_SOFT_ERR_REPORT cpu_to_le32(1<<8)
821 #define AAC_OPT_SUPPORTED_RECONDITION cpu_to_le32(1<<9)
822 #define AAC_OPT_SGMAP_HOST64 cpu_to_le32(1<<10)
823 #define AAC_OPT_ALARM cpu_to_le32(1<<11)
824 #define AAC_OPT_NONDASD cpu_to_le32(1<<12)
825 #define AAC_OPT_SCSI_MANAGED cpu_to_le32(1<<13)
826 #define AAC_OPT_RAID_SCSI_MODE cpu_to_le32(1<<14)
830 struct list_head entry;
836 * Map for 128 fib objects (64k)
838 dma_addr_t hw_fib_pa;
839 struct hw_fib *hw_fib_va;
840 struct hw_fib *aif_base_va;
846 struct fib *free_fib;
847 struct fib *timeout_fib;
850 struct aac_queue_block *queues;
852 * The user API will use an IOCTL to register itself to receive
853 * FIBs from the adapter. The following list is used to keep
854 * track of all the threads that have requested these FIBs. The
855 * mutex is used to synchronize access to all data associated
856 * with the adapter fibs.
858 struct list_head fib_list;
860 struct adapter_ops a_ops;
861 unsigned long fsrev; /* Main driver's revision number */
863 struct aac_init *init; /* Holds initialization info to communicate with adapter */
864 dma_addr_t init_pa; /* Holds physical address of the init struct */
866 struct pci_dev *pdev; /* Our PCI interface */
867 void * printfbuf; /* pointer to buffer used for printf's from the adapter */
868 void * comm_addr; /* Base address of Comm area */
869 dma_addr_t comm_phys; /* Physical Address of Comm area */
872 struct Scsi_Host *scsi_host_ptr;
873 int maximum_num_containers;
874 struct fsa_dev_info *fsa_dev;
879 * The following is the device specific extension.
883 struct sa_registers __iomem *sa;
884 struct rx_registers __iomem *rx;
885 struct rkt_registers __iomem *rkt;
887 u32 OIMR; /* Mask Register Cache */
892 struct completion aif_completion;
893 struct aac_adapter_info adapter_info;
894 /* These are in adapter info but they are in the io flow so
895 * lets break them out so we don't have to do an AND to check them
902 #define aac_adapter_interrupt(dev) \
903 (dev)->a_ops.adapter_interrupt(dev)
905 #define aac_adapter_notify(dev, event) \
906 (dev)->a_ops.adapter_notify(dev, event)
909 #define aac_adapter_check_health(dev) \
910 (dev)->a_ops.adapter_check_health(dev)
913 #define FIB_CONTEXT_FLAG_TIMED_OUT (0x00000001)
916 * Define the command values
920 #define GetAttributes 1
921 #define SetAttributes 2
927 #define MakeDirectory 8
928 #define SymbolicLink 9
931 #define RemoveDirectoryx 12
934 #define ReadDirectory 15
935 #define ReadDirectoryPlus 16
936 #define FileSystemStatus 17
937 #define FileSystemInfo 18
938 #define PathConfigure 19
945 #define SimReadWrite 26
946 #define SetFileSystemStatus 27
948 #define BlockWrite 29
949 #define NvramIoctl 30
950 #define FsSyncWait 31
951 #define ClearArchiveBit 32
955 #define FaultInsertion 36 /* Fault Insertion Command */
956 #define CrazyCache 37 /* Crazycache */
958 #define MAX_FSACOMMAND_NUM 38
962 * Define the status returns. These are very unixlike although
963 * most are not in fact used
983 #define ST_WOULDBLOCK 35
984 #define ST_NAMETOOLONG 63
985 #define ST_NOTEMPTY 66
989 #define ST_BADHANDLE 10001
990 #define ST_NOT_SYNC 10002
991 #define ST_BAD_COOKIE 10003
992 #define ST_NOTSUPP 10004
993 #define ST_TOOSMALL 10005
994 #define ST_SERVERFAULT 10006
995 #define ST_BADTYPE 10007
996 #define ST_JUKEBOX 10008
997 #define ST_NOTMOUNTED 10009
998 #define ST_MAINTMODE 10010
999 #define ST_STALEACL 10011
1002 * On writes how does the client want the data written.
1005 #define CACHE_CSTABLE 1
1006 #define CACHE_UNSTABLE 2
1009 * Lets the client know at which level the data was commited on
1013 #define CMFILE_SYNCH_NVRAM 1
1014 #define CMDATA_SYNCH_NVRAM 2
1015 #define CMFILE_SYNCH 3
1016 #define CMDATA_SYNCH 4
1017 #define CMUNSTABLE 5
1025 struct sgmap sg; // Must be last in struct because it is variable
1036 struct sgmap64 sg; // Must be last in struct because it is variable
1039 struct aac_read_reply
1051 u32 stable; // Not used
1052 struct sgmap sg; // Must be last in struct because it is variable
1063 struct sgmap64 sg; // Must be last in struct because it is variable
1065 struct aac_write_reply
1072 #define CT_FLUSH_CACHE 129
1073 struct aac_synchronize {
1074 u32 command; /* VM_ContainerConfig */
1075 u32 type; /* CT_FLUSH_CACHE */
1081 u32 count; /* sizeof(((struct aac_synchronize_reply *)NULL)->data) */
1084 struct aac_synchronize_reply {
1087 u32 status; /* CT_OK */
1104 u32 count; // Data xfer size
1113 #define AAC_SENSE_BUFFERSIZE 30
1115 struct aac_srb_reply
1120 u32 data_xfer_length;
1121 u32 sense_data_size;
1122 u8 sense_data[AAC_SENSE_BUFFERSIZE]; // Can this be SCSI_SENSE_BUFFERSIZE
1127 #define SRB_NoDataXfer 0x0000
1128 #define SRB_DisableDisconnect 0x0004
1129 #define SRB_DisableSynchTransfer 0x0008
1130 #define SRB_BypassFrozenQueue 0x0010
1131 #define SRB_DisableAutosense 0x0020
1132 #define SRB_DataIn 0x0040
1133 #define SRB_DataOut 0x0080
1136 * SRB Functions - set in aac_srb->function
1138 #define SRBF_ExecuteScsi 0x0000
1139 #define SRBF_ClaimDevice 0x0001
1140 #define SRBF_IO_Control 0x0002
1141 #define SRBF_ReceiveEvent 0x0003
1142 #define SRBF_ReleaseQueue 0x0004
1143 #define SRBF_AttachDevice 0x0005
1144 #define SRBF_ReleaseDevice 0x0006
1145 #define SRBF_Shutdown 0x0007
1146 #define SRBF_Flush 0x0008
1147 #define SRBF_AbortCommand 0x0010
1148 #define SRBF_ReleaseRecovery 0x0011
1149 #define SRBF_ResetBus 0x0012
1150 #define SRBF_ResetDevice 0x0013
1151 #define SRBF_TerminateIO 0x0014
1152 #define SRBF_FlushQueue 0x0015
1153 #define SRBF_RemoveDevice 0x0016
1154 #define SRBF_DomainValidation 0x0017
1157 * SRB SCSI Status - set in aac_srb->scsi_status
1159 #define SRB_STATUS_PENDING 0x00
1160 #define SRB_STATUS_SUCCESS 0x01
1161 #define SRB_STATUS_ABORTED 0x02
1162 #define SRB_STATUS_ABORT_FAILED 0x03
1163 #define SRB_STATUS_ERROR 0x04
1164 #define SRB_STATUS_BUSY 0x05
1165 #define SRB_STATUS_INVALID_REQUEST 0x06
1166 #define SRB_STATUS_INVALID_PATH_ID 0x07
1167 #define SRB_STATUS_NO_DEVICE 0x08
1168 #define SRB_STATUS_TIMEOUT 0x09
1169 #define SRB_STATUS_SELECTION_TIMEOUT 0x0A
1170 #define SRB_STATUS_COMMAND_TIMEOUT 0x0B
1171 #define SRB_STATUS_MESSAGE_REJECTED 0x0D
1172 #define SRB_STATUS_BUS_RESET 0x0E
1173 #define SRB_STATUS_PARITY_ERROR 0x0F
1174 #define SRB_STATUS_REQUEST_SENSE_FAILED 0x10
1175 #define SRB_STATUS_NO_HBA 0x11
1176 #define SRB_STATUS_DATA_OVERRUN 0x12
1177 #define SRB_STATUS_UNEXPECTED_BUS_FREE 0x13
1178 #define SRB_STATUS_PHASE_SEQUENCE_FAILURE 0x14
1179 #define SRB_STATUS_BAD_SRB_BLOCK_LENGTH 0x15
1180 #define SRB_STATUS_REQUEST_FLUSHED 0x16
1181 #define SRB_STATUS_DELAYED_RETRY 0x17
1182 #define SRB_STATUS_INVALID_LUN 0x20
1183 #define SRB_STATUS_INVALID_TARGET_ID 0x21
1184 #define SRB_STATUS_BAD_FUNCTION 0x22
1185 #define SRB_STATUS_ERROR_RECOVERY 0x23
1186 #define SRB_STATUS_NOT_STARTED 0x24
1187 #define SRB_STATUS_NOT_IN_USE 0x30
1188 #define SRB_STATUS_FORCE_ABORT 0x31
1189 #define SRB_STATUS_DOMAIN_VALIDATION_FAIL 0x32
1192 * Object-Server / Volume-Manager Dispatch Classes
1196 #define VM_NameServe 1
1197 #define VM_ContainerConfig 2
1199 #define VM_FilesystemIoctl 4
1200 #define VM_CloseAll 5
1201 #define VM_CtBlockRead 6
1202 #define VM_CtBlockWrite 7
1203 #define VM_SliceBlockRead 8 /* raw access to configured "storage objects" */
1204 #define VM_SliceBlockWrite 9
1205 #define VM_DriveBlockRead 10 /* raw access to physical devices */
1206 #define VM_DriveBlockWrite 11
1207 #define VM_EnclosureMgt 12 /* enclosure management */
1208 #define VM_Unused 13 /* used to be diskset management */
1209 #define VM_CtBlockVerify 14
1210 #define VM_CtPerf 15 /* performance test */
1211 #define VM_CtBlockRead64 16
1212 #define VM_CtBlockWrite64 17
1213 #define VM_CtBlockVerify64 18
1214 #define VM_CtHostRead64 19
1215 #define VM_CtHostWrite64 20
1217 #define MAX_VMCOMMAND_NUM 21 /* used for sizing stats array - leave last */
1220 * Descriptive information (eg, vital stats)
1221 * that a content manager might report. The
1222 * FileArray filesystem component is one example
1223 * of a content manager. Raw mode might be
1228 u32 fsTotalSize; /* Consumed by fs, incl. metadata */
1231 u32 fsMaxExtendSize;
1236 }; /* valid iff ObjType == FT_FILESYS && !(ContentState & FSCS_NOTCLEAN) */
1238 union aac_contentinfo {
1239 struct aac_fsinfo filesys; /* valid iff ObjType == FT_FILESYS && !(ContentState & FSCS_NOTCLEAN) */
1243 * Query for Container Configuration Status
1246 #define CT_GET_CONFIG_STATUS 147
1247 struct aac_get_config_status {
1248 u32 command; /* VM_ContainerConfig */
1249 u32 type; /* CT_GET_CONFIG_STATUS */
1255 u32 count; /* sizeof(((struct aac_get_config_status_resp *)NULL)->data) */
1258 #define CFACT_CONTINUE 0
1259 #define CFACT_PAUSE 1
1260 #define CFACT_ABORT 2
1261 struct aac_get_config_status_resp {
1262 u32 response; /* ST_OK */
1264 u32 status; /* CT_OK */
1271 u32 action; /* CFACT_CONTINUE, CFACT_PAUSE or CFACT_ABORT */
1278 * Accept the configuration as-is
1281 #define CT_COMMIT_CONFIG 152
1283 struct aac_commit_config {
1284 u32 command; /* VM_ContainerConfig */
1285 u32 type; /* CT_COMMIT_CONFIG */
1289 * Query for Container Configuration Count
1292 #define CT_GET_CONTAINER_COUNT 4
1293 struct aac_get_container_count {
1294 u32 command; /* VM_ContainerConfig */
1295 u32 type; /* CT_GET_CONTAINER_COUNT */
1298 struct aac_get_container_count_resp {
1299 u32 response; /* ST_OK */
1302 u32 ContainerSwitchEntries;
1308 * Query for "mountable" objects, ie, objects that are typically
1309 * associated with a drive letter on the client (host) side.
1314 u8 name[16]; // if applicable
1315 struct creation_info create_info; // if applicable
1317 u32 vol; // substrate structure
1318 u32 obj; // FT_FILESYS, FT_DATABASE, etc.
1319 u32 state; // unready for mounting, readonly, etc.
1320 union aac_contentinfo fileinfo; // Info specific to content manager (eg, filesystem)
1321 u32 altoid; // != oid <==> snapshot or broken mirror exists
1324 #define FSCS_NOTCLEAN 0x0001 /* fsck is neccessary before mounting */
1325 #define FSCS_READONLY 0x0002 /* possible result of broken mirror */
1326 #define FSCS_HIDDEN 0x0004 /* should be ignored - set during a clear */
1328 struct aac_query_mount {
1336 u32 type; /* should be same as that requested */
1338 struct aac_mntent mnt[1];
1341 #define CT_READ_NAME 130
1342 struct aac_get_name {
1343 u32 command; /* VM_ContainerConfig */
1344 u32 type; /* CT_READ_NAME */
1350 u32 count; /* sizeof(((struct aac_get_name_resp *)NULL)->data) */
1354 struct aac_get_name_resp {
1357 u32 status; /* CT_OK */
1367 * The following command is sent to shut down each container.
1375 struct aac_query_disk
1389 struct aac_delete_disk {
1409 * Ugly - non Linux like ioctl coding for back compat.
1412 #define CTL_CODE(function, method) ( \
1413 (4<< 16) | ((function) << 2) | (method) \
1417 * Define the method codes for how buffers are passed for I/O and FS
1421 #define METHOD_BUFFERED 0
1422 #define METHOD_NEITHER 3
1428 #define FSACTL_SENDFIB CTL_CODE(2050, METHOD_BUFFERED)
1429 #define FSACTL_SEND_RAW_SRB CTL_CODE(2067, METHOD_BUFFERED)
1430 #define FSACTL_DELETE_DISK 0x163
1431 #define FSACTL_QUERY_DISK 0x173
1432 #define FSACTL_OPEN_GET_ADAPTER_FIB CTL_CODE(2100, METHOD_BUFFERED)
1433 #define FSACTL_GET_NEXT_ADAPTER_FIB CTL_CODE(2101, METHOD_BUFFERED)
1434 #define FSACTL_CLOSE_GET_ADAPTER_FIB CTL_CODE(2102, METHOD_BUFFERED)
1435 #define FSACTL_MINIPORT_REV_CHECK CTL_CODE(2107, METHOD_BUFFERED)
1436 #define FSACTL_GET_PCI_INFO CTL_CODE(2119, METHOD_BUFFERED)
1437 #define FSACTL_FORCE_DELETE_DISK CTL_CODE(2120, METHOD_NEITHER)
1438 #define FSACTL_GET_CONTAINERS 2131
1444 * If this value is set to 1 then interrupt moderation will occur
1445 * in the base commuication support.
1452 * Statistical counters in debug mode
1458 u32 NoResponseRecved;
1466 extern struct aac_common aac_config;
1470 * The following macro is used when sending and receiving FIBs. It is
1471 * only used for debugging.
1475 #define FIB_COUNTER_INCREMENT(counter) (counter)++
1477 #define FIB_COUNTER_INCREMENT(counter)
1481 * Adapter direct commands
1482 * Monitor/Kernel API
1485 #define BREAKPOINT_REQUEST cpu_to_le32(0x00000004)
1486 #define INIT_STRUCT_BASE_ADDRESS cpu_to_le32(0x00000005)
1487 #define READ_PERMANENT_PARAMETERS cpu_to_le32(0x0000000a)
1488 #define WRITE_PERMANENT_PARAMETERS cpu_to_le32(0x0000000b)
1489 #define HOST_CRASHING cpu_to_le32(0x0000000d)
1490 #define SEND_SYNCHRONOUS_FIB cpu_to_le32(0x0000000c)
1491 #define COMMAND_POST_RESULTS cpu_to_le32(0x00000014)
1492 #define GET_ADAPTER_PROPERTIES cpu_to_le32(0x00000019)
1493 #define RE_INIT_ADAPTER cpu_to_le32(0x000000ee)
1496 * Adapter Status Register
1498 * Phase Staus mailbox is 32bits:
1499 * <31:16> = Phase Status
1502 * The adapter reports is present state through the phase. Only
1503 * a single phase should be ever be set. Each phase can have multiple
1504 * phase status bits to provide more detailed information about the
1505 * state of the board. Care should be taken to ensure that any phase
1506 * status bits that are set when changing the phase are also valid
1507 * for the new phase or be cleared out. Adapter software (monitor,
1508 * iflash, kernel) is responsible for properly maintining the phase
1509 * status mailbox when it is running.
1513 * Phases are bit oriented. It is NOT valid to have multiple bits set
1516 #define SELF_TEST_FAILED (cpu_to_le32(0x00000004))
1517 #define MONITOR_PANIC (cpu_to_le32(0x00000020))
1518 #define KERNEL_UP_AND_RUNNING (cpu_to_le32(0x00000080))
1519 #define KERNEL_PANIC (cpu_to_le32(0x00000100))
1522 * Doorbell bit defines
1525 #define DoorBellSyncCmdAvailable cpu_to_le32(1<<0) // Host -> Adapter
1526 #define DoorBellPrintfDone cpu_to_le32(1<<5) // Host -> Adapter
1527 #define DoorBellAdapterNormCmdReady cpu_to_le32(1<<1) // Adapter -> Host
1528 #define DoorBellAdapterNormRespReady cpu_to_le32(1<<2) // Adapter -> Host
1529 #define DoorBellAdapterNormCmdNotFull cpu_to_le32(1<<3) // Adapter -> Host
1530 #define DoorBellAdapterNormRespNotFull cpu_to_le32(1<<4) // Adapter -> Host
1531 #define DoorBellPrintfReady cpu_to_le32(1<<5) // Adapter -> Host
1534 * For FIB communication, we need all of the following things
1535 * to send back to the user.
1538 #define AifCmdEventNotify 1 /* Notify of event */
1539 #define AifEnConfigChange 3 /* Adapter configuration change */
1540 #define AifEnContainerChange 4 /* Container configuration change */
1541 #define AifEnDeviceFailure 5 /* SCSI device failed */
1542 #define AifEnAddContainer 15 /* A new array was created */
1543 #define AifEnDeleteContainer 16 /* A container was deleted */
1544 #define AifEnExpEvent 23 /* Firmware Event Log */
1545 #define AifExeFirmwarePanic 3 /* Firmware Event Panic */
1546 #define AifHighPriority 3 /* Highest Priority Event */
1548 #define AifCmdJobProgress 2 /* Progress report */
1549 #define AifJobCtrZero 101 /* Array Zero progress */
1550 #define AifJobStsSuccess 1 /* Job completes */
1551 #define AifCmdAPIReport 3 /* Report from other user of API */
1552 #define AifCmdDriverNotify 4 /* Notify host driver of event */
1553 #define AifDenMorphComplete 200 /* A morph operation completed */
1554 #define AifDenVolumeExtendComplete 201 /* A volume extend completed */
1555 #define AifReqJobList 100 /* Gets back complete job list */
1556 #define AifReqJobsForCtr 101 /* Gets back jobs for specific container */
1557 #define AifReqJobsForScsi 102 /* Gets back jobs for specific SCSI device */
1558 #define AifReqJobReport 103 /* Gets back a specific job report or list of them */
1559 #define AifReqTerminateJob 104 /* Terminates job */
1560 #define AifReqSuspendJob 105 /* Suspends a job */
1561 #define AifReqResumeJob 106 /* Resumes a job */
1562 #define AifReqSendAPIReport 107 /* API generic report requests */
1563 #define AifReqAPIJobStart 108 /* Start a job from the API */
1564 #define AifReqAPIJobUpdate 109 /* Update a job report from the API */
1565 #define AifReqAPIJobFinish 110 /* Finish a job from the API */
1568 * Adapter Initiated FIB command structures. Start with the adapter
1569 * initiated FIBs that really come from the adapter, and get responded
1574 u32 command; /* Tell host what type of notify this is */
1575 u32 seqnum; /* To allow ordering of reports (if necessary) */
1576 u8 data[1]; /* Undefined length (from kernel viewpoint) */
1580 * Convert capacity to cylinders
1581 * accounting for the fact capacity could be a 64 bit value
1584 static inline u32 cap_to_cyls(sector_t capacity, u32 divisor)
1586 sector_div(capacity, divisor);
1587 return (u32)capacity;
1592 const char *aac_driverinfo(struct Scsi_Host *);
1593 struct fib *fib_alloc(struct aac_dev *dev);
1594 int fib_setup(struct aac_dev *dev);
1595 void fib_map_free(struct aac_dev *dev);
1596 void fib_free(struct fib * context);
1597 void fib_init(struct fib * context);
1598 void fib_dealloc(struct fib * context);
1599 void aac_printf(struct aac_dev *dev, u32 val);
1600 int fib_send(u16 command, struct fib * context, unsigned long size, int priority, int wait, int reply, fib_callback callback, void *ctxt);
1601 int aac_consumer_get(struct aac_dev * dev, struct aac_queue * q, struct aac_entry **entry);
1602 int aac_consumer_avail(struct aac_dev * dev, struct aac_queue * q);
1603 void aac_consumer_free(struct aac_dev * dev, struct aac_queue * q, u32 qnum);
1604 int fib_complete(struct fib * context);
1605 #define fib_data(fibctx) ((void *)(fibctx)->hw_fib->data)
1606 struct aac_dev *aac_init_adapter(struct aac_dev *dev);
1607 int aac_get_config_status(struct aac_dev *dev);
1608 int aac_get_containers(struct aac_dev *dev);
1609 int aac_scsi_cmd(struct scsi_cmnd *cmd);
1610 int aac_dev_ioctl(struct aac_dev *dev, int cmd, void __user *arg);
1611 int aac_do_ioctl(struct aac_dev * dev, int cmd, void __user *arg);
1612 int aac_rx_init(struct aac_dev *dev);
1613 int aac_rkt_init(struct aac_dev *dev);
1614 int aac_sa_init(struct aac_dev *dev);
1615 unsigned int aac_response_normal(struct aac_queue * q);
1616 unsigned int aac_command_normal(struct aac_queue * q);
1617 int aac_command_thread(struct aac_dev * dev);
1618 int aac_close_fib_context(struct aac_dev * dev, struct aac_fib_context *fibctx);
1619 int fib_adapter_complete(struct fib * fibptr, unsigned short size);
1620 struct aac_driver_ident* aac_get_driver_ident(int devtype);
1621 int aac_get_adapter_info(struct aac_dev* dev);
1622 int aac_send_shutdown(struct aac_dev *dev);