2 * Copyright (c) 2000 Michael Smith
3 * Copyright (c) 2000-2001 Scott Long
4 * Copyright (c) 2000 BSDi
5 * Copyright (c) 2001 Adaptec, Inc.
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
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
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.
40 * Misc. magic numbers.
42 #define AAC_MAX_CONTAINERS 64
43 #define AAC_BLOCK_SIZE 512
46 * Communications interface.
48 * Where datastructure layouts are closely parallel to the Adaptec sample code,
49 * retain their naming conventions (for now) to aid in cross-referencing.
53 * We establish 4 command queues and matching response queues. Queues must
54 * be 16-byte aligned, and are sized as follows:
56 #define AAC_HOST_NORM_CMD_ENTRIES 8 /* command adapter->host,
58 #define AAC_HOST_HIGH_CMD_ENTRIES 4 /* command adapter->host,
60 #define AAC_ADAP_NORM_CMD_ENTRIES 512 /* command host->adapter,
62 #define AAC_ADAP_HIGH_CMD_ENTRIES 4 /* command host->adapter,
64 #define AAC_HOST_NORM_RESP_ENTRIES 512 /* response, adapter->host,
66 #define AAC_HOST_HIGH_RESP_ENTRIES 4 /* response, adapter->host,
68 #define AAC_ADAP_NORM_RESP_ENTRIES 8 /* response, host->adapter,
70 #define AAC_ADAP_HIGH_RESP_ENTRIES 4 /* response, host->adapter,
73 #define AAC_TOTALQ_LENGTH (AAC_HOST_HIGH_CMD_ENTRIES + \
74 AAC_HOST_NORM_CMD_ENTRIES + \
75 AAC_ADAP_HIGH_CMD_ENTRIES + \
76 AAC_ADAP_NORM_CMD_ENTRIES + \
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
84 struct 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 */
89 #define AAC_PRODUCER_INDEX 0
90 #define AAC_CONSUMER_INDEX 1
93 * Table of queue indices and queues used to communicate with the
94 * controller. This structure must be aligned to AAC_QUEUE_ALIGN
96 struct aac_queue_table {
97 /* queue consumer/producer indexes (layout mandated by adapter) */
98 u_int32_t qt_qindex[AAC_QUEUE_COUNT][2];
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];
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.
117 #define AAC_HOST_NORM_CMD_QUEUE 0
118 #define AAC_HOST_HIGH_CMD_QUEUE 1
119 #define AAC_ADAP_NORM_CMD_QUEUE 2
120 #define AAC_ADAP_HIGH_CMD_QUEUE 3
121 #define AAC_HOST_NORM_RESP_QUEUE 4
122 #define AAC_HOST_HIGH_RESP_QUEUE 5
123 #define AAC_ADAP_NORM_RESP_QUEUE 6
124 #define AAC_ADAP_HIGH_RESP_QUEUE 7
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)
130 struct aac_fib_list_entry {
136 * FIB (FSA Interface Block?); this is the datastructure passed between the host
139 struct aac_fib_header {
145 u_int16_t SenderSize;
146 u_int32_t SenderFibAddress;
147 u_int32_t ReceiverFibAddress;
148 u_int32_t SenderData;
151 u_int32_t ReceiverTimeStart;
152 u_int32_t ReceiverTimeDone;
154 struct aac_fib_list_entry FibLinks;
158 #define AAC_FIB_DATASIZE (512 - sizeof(struct aac_fib_header))
161 struct aac_fib_header Header;
162 u_int8_t data[AAC_FIB_DATASIZE];
169 TestCommandResponse = 1,
170 TestAdapterCommand = 2,
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,
188 RequestPerfData = 125,
189 SetInterruptDefTimer= 126,
190 SetInterruptDefCount= 127,
191 GetInterruptDefStatus= 128,
192 LastCommCommand = 129,
194 /* filesystem commands */
197 HostFileSystem = 302,
198 LastFileSystemCommand = 303,
200 /* Container Commands */
201 ContainerCommand = 500,
202 ContainerCommand64 = 501,
205 /* Cluster Commands */
206 ClusterCommand = 550,
208 /* Scsi Port commands (scsi passthrough) */
209 ScsiPortCommand = 600,
210 ScsiPortCommandU64 = 601,
211 SataPortCommandU64 = 602,
212 SasSmpPassThrough = 603,
213 SasRequestPhyInfo = 612,
215 /* misc house keeping and generic adapter initiated commands */
218 FsaHostShutdown = 702,
219 RequestAdapterInfo = 703,
220 IsAdapterPaused = 704,
222 RequestSupplementAdapterInfo = 706, /* Supp. Info for set in UCC
223 * use only if supported
224 * (RequestAdapterInfo first) */
225 LastMiscCommand = 707,
227 OnLineDiagnostic = 800,
228 FduAdapterTest = 801,
229 RequestCompatibilityId = 802,
230 AdapterEnvironmentInfo = 803, /* temp. sensors */
231 NvsramEventLog = 900,
232 ResetNvsramEventLogPointers = 901,
233 EnableEventLog = 902,
234 DisableEventLog = 903,
235 EncryptedKeyTransportFIB= 904,
236 KeyableFeaturesFIB= 905
242 #define AAC_FIBTYPE_TFIB 1
243 #define AAC_FIBTYPE_TQE 2
244 #define AAC_FIBTYPE_TCTPERF 3
249 #define AAC_FIBSTATE_HOSTOWNED (1<<0) /* owned by the host */
250 #define AAC_FIBSTATE_ADAPTEROWNED (1<<1) /* owned by the adapter */
251 #define AAC_FIBSTATE_INITIALISED (1<<2) /* initialised */
252 #define AAC_FIBSTATE_EMPTY (1<<3) /* empty */
253 #define AAC_FIBSTATE_FROMPOOL (1<<4) /* allocated from pool */
254 #define AAC_FIBSTATE_FROMHOST (1<<5) /* sent from the host */
255 #define AAC_FIBSTATE_FROMADAP (1<<6) /* sent from the adapter */
256 #define AAC_FIBSTATE_REXPECTED (1<<7) /* response is expected */
257 #define AAC_FIBSTATE_RNOTEXPECTED (1<<8) /* response is not expected */
258 #define AAC_FIBSTATE_DONEADAP (1<<9) /* processed by the adapter */
259 #define AAC_FIBSTATE_DONEHOST (1<<10) /* processed by the host */
260 #define AAC_FIBSTATE_HIGH (1<<11) /* high priority */
261 #define AAC_FIBSTATE_NORM (1<<12) /* normal priority */
262 #define AAC_FIBSTATE_ASYNC (1<<13)
263 #define AAC_FIBSTATE_ASYNCIO (1<<13) /* to be removed */
264 #define AAC_FIBSTATE_PAGEFILEIO (1<<14) /* to be removed */
265 #define AAC_FIBSTATE_SHUTDOWN (1<<15)
266 #define AAC_FIBSTATE_LAZYWRITE (1<<16) /* to be removed */
267 #define AAC_FIBSTATE_ADAPMICROFIB (1<<17)
268 #define AAC_FIBSTATE_BIOSFIB (1<<18)
269 #define AAC_FIBSTATE_FAST_RESPONSE (1<<19) /* fast response capable */
270 #define AAC_FIBSTATE_APIFIB (1<<20)
275 #define AAC_ERROR_NORMAL 0x00
276 #define AAC_ERROR_PENDING 0x01
277 #define AAC_ERROR_FATAL 0x02
278 #define AAC_ERROR_INVALID_QUEUE 0x03
279 #define AAC_ERROR_NOENTRIES 0x04
280 #define AAC_ERROR_SENDFAILED 0x05
281 #define AAC_ERROR_INVALID_QUEUE_PRIORITY 0x06
282 #define AAC_ERROR_FIB_ALLOCATION_FAILED 0x07
283 #define AAC_ERROR_FIB_DEALLOCATION_FAILED 0x08
286 * Adapter Init Structure: this is passed to the adapter with the
287 * AAC_MONKER_INITSTRUCT command to point it at our control structures.
289 struct aac_adapter_init {
290 u_int32_t InitStructRevision;
291 #define AAC_INIT_STRUCT_REVISION 3
292 #define AAC_INIT_STRUCT_REVISION_4 4
293 u_int32_t MiniPortRevision;
294 #define AAC_INIT_STRUCT_MINIPORT_REVISION 1
295 u_int32_t FilesystemRevision;
296 u_int32_t CommHeaderAddress;
297 u_int32_t FastIoCommAreaAddress;
298 u_int32_t AdapterFibsPhysicalAddress;
299 u_int32_t AdapterFibsVirtualAddress;
300 u_int32_t AdapterFibsSize;
301 u_int32_t AdapterFibAlign;
302 u_int32_t PrintfBufferAddress;
303 u_int32_t PrintfBufferSize;
304 #define AAC_PAGE_SIZE 4096
305 u_int32_t HostPhysMemPages;
306 u_int32_t HostElapsedSeconds;
307 /* ADAPTER_INIT_STRUCT_REVISION_4 begins here */
308 u_int32_t InitFlags; /* flags for supported features */
309 #define INITFLAGS_NEW_COMM_SUPPORTED 1
310 u_int32_t MaxIoCommands; /* max outstanding commands */
311 u_int32_t MaxIoSize; /* largest I/O command */
312 u_int32_t MaxFibSize; /* largest FIB to adapter */
332 CT_RAID10, /* stripe of mirror */
333 CT_RAID00, /* stripe of stripe */
334 CT_VOLUME_OF_MIRRORS, /* volume of mirror */
335 CT_PSEUDO_RAID3, /* really raid4 */
336 CT_RAID50, /* stripe of raid5 */
337 CT_RAID5D, /* raid5 distributed hot-sparing */
339 CT_RAID1E, /* extended raid1 mirroring */
345 * Host-addressable object types
348 FT_REG = 1, /* regular file */
349 FT_DIR, /* directory */
350 FT_BLK, /* "block" device - reserved */
351 FT_CHR, /* "character special" device - reserved */
352 FT_LNK, /* symbolic link */
353 FT_SOCK, /* socket */
355 FT_FILESYS, /* ADAPTEC's "FSA"(tm) filesystem */
356 FT_DRIVE, /* physical disk - addressable in scsi by b/t/l */
357 FT_SLICE, /* virtual disk - raw volume - slice */
358 FT_PARTITION, /* FSA partition - carved out of a slice - building
359 * block for containers */
360 FT_VOLUME, /* Container - Volume Set */
361 FT_STRIPE, /* Container - Stripe Set */
362 FT_MIRROR, /* Container - Mirror Set */
363 FT_RAID5, /* Container - Raid 5 Set */
364 FT_DATABASE /* Storage object with "foreign" content manager */
368 * Host-side scatter/gather list for 32-bit commands.
370 struct aac_sg_entry {
372 u_int32_t SgByteCount;
375 struct aac_sg_entry64 {
377 u_int32_t SgByteCount;
380 struct aac_sg_entryraw {
381 u_int32_t Next; /* reserved for FW use */
382 u_int32_t Prev; /* reserved for FW use */
384 u_int32_t SgByteCount;
385 u_int32_t Flags; /* reserved for FW use */
388 struct aac_sg_table {
390 struct aac_sg_entry SgEntry[0];
394 * Host-side scatter/gather list for 64-bit commands.
396 struct aac_sg_table64 {
398 struct aac_sg_entry64 SgEntry64[0];
402 * s/g list for raw commands
404 struct aac_sg_tableraw {
406 struct aac_sg_entryraw SgEntryRaw[0];
410 * Container creation data
412 struct aac_container_creation {
413 u_int8_t ViaBuildNumber;
414 u_int8_t MicroSecond;
415 u_int8_t Via; /* 1 = FSU, 2 = API, etc. */
416 u_int8_t YearsSince1900;
417 u_int32_t Month:4; /* 1-12 */
418 u_int32_t Day:6; /* 1-32 */
419 u_int32_t Hour:6; /* 0-23 */
420 u_int32_t Minute:6; /* 0-59 */
421 u_int32_t Second:6; /* 0-59 */
422 u_int64_t ViaAdapterSerialNumber;
426 * Revision number handling
451 u_int32_t buildNumber;
455 * Adapter Information
527 OEM_FLAVOR_ADAPTEC = 1,
544 * XXX the aac-2622 with no battery present reports PLATFORM_BAT_OPT_PRESENT
548 PLATFORM_BAT_REQ_PRESENT = 1, /* BATTERY REQUIRED AND PRESENT */
549 PLATFORM_BAT_REQ_NOTPRESENT, /* BATTERY REQUIRED AND NOT PRESENT */
550 PLATFORM_BAT_OPT_PRESENT, /* BATTERY OPTIONAL AND PRESENT */
551 PLATFORM_BAT_OPT_NOTPRESENT, /* BATTERY OPTIONAL AND NOT PRESENT */
552 PLATFORM_BAT_NOT_SUPPORTED /* BATTERY NOT SUPPORTED */
553 } AAC_BatteryPlatform;
556 * options supported by this board
557 * there has to be a one to one mapping of these defines and the ones in
558 * fsaapi.h, search for FSA_SUPPORT_SNAPSHOT
560 #define AAC_SUPPORTED_SNAPSHOT 0x01
561 #define AAC_SUPPORTED_CLUSTERS 0x02
562 #define AAC_SUPPORTED_WRITE_CACHE 0x04
563 #define AAC_SUPPORTED_64BIT_DATA 0x08
564 #define AAC_SUPPORTED_HOST_TIME_FIB 0x10
565 #define AAC_SUPPORTED_RAID50 0x20
566 #define AAC_SUPPORTED_4GB_WINDOW 0x40
567 #define AAC_SUPPORTED_SCSI_UPGRADEABLE 0x80
568 #define AAC_SUPPORTED_SOFT_ERR_REPORT 0x100
569 #define AAC_SUPPORTED_NOT_RECONDITION 0x200
570 #define AAC_SUPPORTED_SGMAP_HOST64 0x400
571 #define AAC_SUPPORTED_ALARM 0x800
572 #define AAC_SUPPORTED_NONDASD 0x1000
573 #define AAC_SUPPORTED_SCSI_MANAGED 0x2000
574 #define AAC_SUPPORTED_RAID_SCSI_MODE 0x4000
575 #define AAC_SUPPORTED_SUPPLEMENT_ADAPTER_INFO 0x10000
576 #define AAC_SUPPORTED_NEW_COMM 0x20000
577 #define AAC_SUPPORTED_64BIT_ARRAYSIZE 0x40000
578 #define AAC_SUPPORTED_HEAT_SENSOR 0x80000
581 * Structure used to respond to a RequestAdapterInfo fib.
583 struct aac_adapter_info {
584 AAC_Platform PlatformBase; /* adapter type */
585 AAC_CpuType CpuArchitecture; /* adapter CPU type */
586 AAC_CpuSubType CpuVariant; /* adapter CPU subtype */
587 u_int32_t ClockSpeed; /* adapter CPU clockspeed */
588 u_int32_t ExecutionMem; /* adapter Execution Memory
590 u_int32_t BufferMem; /* adapter Data Memory */
591 u_int32_t TotalMem; /* adapter Total Memory */
592 struct FsaRevision KernelRevision; /* adapter Kernel Software
594 struct FsaRevision MonitorRevision; /* adapter Monitor/Diagnostic
595 * Software Revision */
596 struct FsaRevision HardwareRevision;/* TBD */
597 struct FsaRevision BIOSRevision; /* adapter BIOS Revision */
598 u_int32_t ClusteringEnabled;
599 u_int32_t ClusterChannelMask;
600 u_int64_t SerialNumber;
601 AAC_BatteryPlatform batteryPlatform;
602 u_int32_t SupportedOptions; /* supported features of this
604 AAC_OemFlavor OemVariant;
608 * Structure used to respond to a RequestSupplementAdapterInfo fib.
611 u_int8_t AssemblyPn[8];
613 u_int8_t BatteryFruPn[8];
614 u_int8_t EcVersionString[8];
618 #define MFG_PCBA_SERIAL_NUMBER_WIDTH 12
619 #define MFG_WWN_WIDTH 8
621 struct aac_supplement_adapter_info {
622 /* The assigned Adapter Type Text, extra byte for null termination */
623 int8_t AdapterTypeText[17+1];
624 /* Pad for the text above */
626 /* Size in bytes of the memory that is flashed */
627 u_int32_t FlashMemoryByteSize;
628 /* The assigned IMAGEID_xxx for this adapter */
629 u_int32_t FlashImageId;
631 * The maximum number of Phys available on a SATA/SAS
632 * Controller, 0 otherwise
634 u_int32_t MaxNumberPorts;
635 /* Version of expansion area */
637 u_int32_t FeatureBits;
639 u_int8_t ReservedPad0[3];
640 u_int8_t BuildDate[12];
641 /* The current number of Ports on a SAS controller, 0 otherwise */
642 u_int32_t CurrentNumberPorts;
644 struct vpd_info VpdInfo;
646 /* Firmware Revision (Vmaj.min-dash.) */
647 struct FsaRevision FlashFirmwareRevision;
648 u_int32_t RaidTypeMorphOptions;
649 /* Firmware's boot code Revision (Vmaj.min-dash.) */
650 struct FsaRevision FlashFirmwareBootRevision;
651 /* PCBA serial no. from th MFG sector */
652 u_int8_t MfgPcbaSerialNo[MFG_PCBA_SERIAL_NUMBER_WIDTH];
653 /* WWN from the MFG sector */
654 u_int8_t MfgWWNName[MFG_WWN_WIDTH];
655 /* Growth Area for future expansion ((7*4) - 12 - 8)/4 = 2 words */
656 u_int32_t ReservedGrowth[2];
660 * Monitor/Kernel interface.
664 * Synchronous commands to the monitor/kernel.
666 #define AAC_MONKER_BREAKPOINT 0x04
667 #define AAC_MONKER_INITSTRUCT 0x05
668 #define AAC_MONKER_SYNCFIB 0x0c
669 #define AAC_MONKER_GETKERNVER 0x11
670 #define AAC_MONKER_POSTRESULTS 0x14
671 #define AAC_MONKER_GETINFO 0x19
672 #define AAC_MONKER_GETDRVPROP 0x23
673 #define AAC_MONKER_RCVTEMP 0x25
674 #define AAC_MONKER_GETCOMMPREF 0x26
675 #define AAC_MONKER_REINIT 0xee
678 * Adapter Status Register
680 * Phase Staus mailbox is 32bits:
681 * <31:16> = Phase Status
684 * The adapter reports its present state through the phase. Only
685 * a single phase should be ever be set. Each phase can have multiple
686 * phase status bits to provide more detailed information about the
687 * state of the adapter.
689 #define AAC_SELF_TEST_FAILED 0x00000004
690 #define AAC_MONITOR_PANIC 0x00000020
691 #define AAC_UP_AND_RUNNING 0x00000080
692 #define AAC_KERNEL_PANIC 0x00000100
695 * Data types relating to control and monitoring of the NVRAM/WriteCache
699 #define AAC_NFILESYS 24 /* maximum number of filesystems */
702 * NVRAM/Write Cache subsystem states
705 NVSTATUS_DISABLED = 0, /* present, clean, not being used */
706 NVSTATUS_ENABLED, /* present, possibly dirty, ready for use */
707 NVSTATUS_ERROR, /* present, dirty, contains dirty data */
708 NVSTATUS_BATTERY, /* present, bad or low battery, may contain
710 NVSTATUS_UNKNOWN /* for bad/missing device */
714 * NVRAM/Write Cache subsystem battery component states
718 NVBATTSTATUS_NONE = 0, /* battery has no power or is not present */
719 NVBATTSTATUS_LOW, /* battery is low on power */
720 NVBATTSTATUS_OK, /* battery is okay - normal operation possible
721 * only in this state */
722 NVBATTSTATUS_RECONDITIONING /* no battery present - reconditioning
727 * Battery transition type
730 NVBATT_TRANSITION_NONE = 0, /* battery now has no power or is not
732 NVBATT_TRANSITION_LOW, /* battery is now low on power */
733 NVBATT_TRANSITION_OK /* battery is now okay - normal
734 * operation possible only in this
736 } AAC_NVBATT_TRANSITION;
739 * NVRAM Info structure returned for NVRAM_GetInfo call
741 struct aac_nvramdevinfo {
742 u_int32_t NV_Enabled; /* write caching enabled */
743 u_int32_t NV_Error; /* device in error state */
744 u_int32_t NV_NDirty; /* count of dirty NVRAM buffers */
745 u_int32_t NV_NActive; /* count of NVRAM buffers being
749 struct aac_nvraminfo {
750 AAC_NVSTATUS NV_Status; /* nvram subsystem status */
751 AAC_NVBATTSTATUS NV_BattStatus; /* battery status */
752 u_int32_t NV_Size; /* size of WriteCache NVRAM in
754 u_int32_t NV_BufSize; /* size of NVRAM buffers in
756 u_int32_t NV_NBufs; /* number of NVRAM buffers */
757 u_int32_t NV_NDirty; /* Num dirty NVRAM buffers */
758 u_int32_t NV_NClean; /* Num clean NVRAM buffers */
759 u_int32_t NV_NActive; /* Num NVRAM buffers being
761 u_int32_t NV_NBrokered; /* Num brokered NVRAM buffers */
762 struct aac_nvramdevinfo NV_DevInfo[AAC_NFILESYS]; /* per device
764 u_int32_t NV_BattNeedsReconditioning; /* boolean */
765 u_int32_t NV_TotalSize; /* size of all non-volatile
766 * memories in bytes */
770 * Data types relating to adapter-initiated FIBs
772 * Based on types and structures in <aifstruc.h>
779 AifJobStsSuccess = 1,
783 AifJobStsLastReportMarker = 100, /* All prior mean last report */
789 AifJobScsiMin = 1, /* Minimum value for Scsi operation */
790 AifJobScsiZero, /* SCSI device clear operation */
791 AifJobScsiVerify, /* SCSI device Verify operation NO
793 AifJobScsiExercise, /* SCSI device Exercise operation */
794 AifJobScsiVerifyRepair, /* SCSI device Verify operation WITH
796 AifJobScsiWritePattern, /* write pattern */
797 AifJobScsiMax = 99, /* Max Scsi value */
798 AifJobCtrMin, /* Min Ctr op value */
799 AifJobCtrZero, /* Container clear operation */
800 AifJobCtrCopy, /* Container copy operation */
801 AifJobCtrCreateMirror, /* Container Create Mirror operation */
802 AifJobCtrMergeMirror, /* Container Merge Mirror operation */
803 AifJobCtrScrubMirror, /* Container Scrub Mirror operation */
804 AifJobCtrRebuildRaid5, /* Container Rebuild Raid5 operation */
805 AifJobCtrScrubRaid5, /* Container Scrub Raid5 operation */
806 AifJobCtrMorph, /* Container morph operation */
807 AifJobCtrPartCopy, /* Container Partition copy operation */
808 AifJobCtrRebuildMirror, /* Container Rebuild Mirror operation */
809 AifJobCtrCrazyCache, /* crazy cache */
810 AifJobCtrCopyback, /* Container Copyback operation */
811 AifJobCtrCompactRaid5D, /* Container Compaction operation */
812 AifJobCtrExpandRaid5D, /* Container Expansion operation */
813 AifJobCtrRebuildRaid6, /* Container Rebuild Raid6 operation */
814 AifJobCtrScrubRaid6, /* Container Scrub Raid6 operation */
815 AifJobCtrSSBackup, /* Container snapshot backup task */
816 AifJobCtrMax = 199, /* Max Ctr type operation */
817 AifJobFsMin, /* Min Fs type operation */
818 AifJobFsCreate, /* File System Create operation */
819 AifJobFsVerify, /* File System Verify operation */
820 AifJobFsExtend, /* File System Extend operation */
821 AifJobFsMax = 299, /* Max Fs type operation */
822 AifJobApiFormatNTFS, /* Format a drive to NTFS */
823 AifJobApiFormatFAT, /* Format a drive to FAT */
824 AifJobApiUpdateSnapshot, /* update the read/write half of a
826 AifJobApiFormatFAT32, /* Format a drive to FAT32 */
827 AifJobApiMax = 399, /* Max API type operation */
828 AifJobCtlContinuousCtrVerify, /* Adapter operation */
829 AifJobCtlMax = 499 /* Max Adapter type operation */
832 struct aac_AifContainers {
833 u_int32_t src; /* from/master */
834 u_int32_t dst; /* to/slave */
837 union aac_AifJobClient {
838 struct aac_AifContainers container; /* For Container and
839 * filesystem progress
841 int32_t scsi_dh; /* For SCSI progress
845 struct aac_AifJobDesc {
846 u_int32_t jobID; /* DO NOT FILL IN! Will be
847 * filled in by AIF */
848 AAC_AifJobType type; /* Operation that is being
850 union aac_AifJobClient client; /* Details */
853 struct aac_AifJobProgressReport {
854 struct aac_AifJobDesc jd;
855 AAC_AifJobStatus status;
857 u_int32_t currentTick;
858 u_int32_t jobSpecificData1;
859 u_int32_t jobSpecificData2;
866 /* General application notifies start here */
867 AifEnGeneric = 1, /* Generic notification */
868 AifEnTaskComplete, /* Task has completed */
869 AifEnConfigChange, /* Adapter config change occurred */
870 AifEnContainerChange, /* Adapter specific container
871 * configuration change */
872 AifEnDeviceFailure, /* SCSI device failed */
873 AifEnMirrorFailover, /* Mirror failover started */
874 AifEnContainerEvent, /* Significant container event */
875 AifEnFileSystemChange, /* File system changed */
876 AifEnConfigPause, /* Container pause event */
877 AifEnConfigResume, /* Container resume event */
878 AifEnFailoverChange, /* Failover space assignment changed */
879 AifEnRAID5RebuildDone, /* RAID5 rebuild finished */
880 AifEnEnclosureManagement, /* Enclosure management event */
881 AifEnBatteryEvent, /* Significant NV battery event */
882 AifEnAddContainer, /* A new container was created. */
883 AifEnDeleteContainer, /* A container was deleted. */
884 AifEnSMARTEvent, /* SMART Event */
885 AifEnBatteryNeedsRecond, /* The battery needs reconditioning */
886 AifEnClusterEvent, /* Some cluster event */
887 AifEnDiskSetEvent, /* A disk set event occured. */
888 AifDriverNotifyStart=199, /* Notifies for host driver go here */
889 /* Host driver notifications start here */
890 AifDenMorphComplete, /* A morph operation completed */
891 AifDenVolumeExtendComplete /* Volume expand operation completed */
892 } AAC_AifEventNotifyType;
894 struct aac_AifEnsGeneric {
895 char text[132]; /* Generic text */
898 struct aac_AifEnsDeviceFailure {
899 u_int32_t deviceHandle; /* SCSI device handle */
902 struct aac_AifEnsMirrorFailover {
903 u_int32_t container; /* Container with failed element */
904 u_int32_t failedSlice; /* Old slice which failed */
905 u_int32_t creatingSlice; /* New slice used for auto-create */
908 struct aac_AifEnsContainerChange {
909 u_int32_t container[2]; /* container that changed, -1 if no
913 struct aac_AifEnsContainerEvent {
914 u_int32_t container; /* container number */
915 u_int32_t eventType; /* event type */
918 struct aac_AifEnsEnclosureEvent {
919 u_int32_t empID; /* enclosure management proc number */
920 u_int32_t unitID; /* unitId, fan id, power supply id,
921 * slot id, tempsensor id. */
922 u_int32_t eventType; /* event type */
925 struct aac_AifEnsBatteryEvent {
926 AAC_NVBATT_TRANSITION transition_type; /* eg from low to ok */
927 AAC_NVBATTSTATUS current_state; /* current batt state */
928 AAC_NVBATTSTATUS prior_state; /* prev batt state */
931 struct aac_AifEnsDiskSetEvent {
938 CLUSTER_NULL_EVENT = 0,
939 CLUSTER_PARTNER_NAME_EVENT, /* change in partner hostname or
940 * adaptername from NULL to non-NULL */
941 /* (partner's agent may be up) */
942 CLUSTER_PARTNER_NULL_NAME_EVENT /* change in partner hostname or
943 * adaptername from non-null to NULL */
944 /* (partner has rebooted) */
945 } AAC_ClusterAifEvent;
947 struct aac_AifEnsClusterEvent {
948 AAC_ClusterAifEvent eventType;
951 struct aac_AifEventNotify {
952 AAC_AifEventNotifyType type;
954 struct aac_AifEnsGeneric EG;
955 struct aac_AifEnsDeviceFailure EDF;
956 struct aac_AifEnsMirrorFailover EMF;
957 struct aac_AifEnsContainerChange ECC;
958 struct aac_AifEnsContainerEvent ECE;
959 struct aac_AifEnsEnclosureEvent EEE;
960 struct aac_AifEnsBatteryEvent EBE;
961 struct aac_AifEnsDiskSetEvent EDS;
962 /* struct aac_AifEnsSMARTEvent ES;*/
963 struct aac_AifEnsClusterEvent ECLE;
968 * Adapter Initiated FIB command structures. Start with the adapter
969 * initiated FIBs that really come from the adapter, and get responded
972 #define AAC_AIF_REPORT_MAX_SIZE 64
975 AifCmdEventNotify = 1, /* Notify of event */
976 AifCmdJobProgress, /* Progress report */
977 AifCmdAPIReport, /* Report from other user of API */
978 AifCmdDriverNotify, /* Notify host driver of event */
979 AifReqJobList = 100, /* Gets back complete job list */
980 AifReqJobsForCtr, /* Gets back jobs for specific container */
981 AifReqJobsForScsi, /* Gets back jobs for specific SCSI device */
982 AifReqJobReport, /* Gets back a specific job report or list */
983 AifReqTerminateJob, /* Terminates job */
984 AifReqSuspendJob, /* Suspends a job */
985 AifReqResumeJob, /* Resumes a job */
986 AifReqSendAPIReport, /* API generic report requests */
987 AifReqAPIJobStart, /* Start a job from the API */
988 AifReqAPIJobUpdate, /* Update a job report from the API */
989 AifReqAPIJobFinish /* Finish a job from the API */
992 struct aac_aif_command {
993 AAC_AifCommand command; /* Tell host what type of
995 u_int32_t seqNumber; /* To allow ordering of
996 * reports (if necessary) */
998 struct aac_AifEventNotify EN; /* Event notify */
999 struct aac_AifJobProgressReport PR[1]; /* Progress report */
1000 u_int8_t AR[AAC_AIF_REPORT_MAX_SIZE];
1001 u_int8_t data[AAC_FIB_DATASIZE - 8];
1006 * Filesystem commands/data
1008 * The adapter has a very complex filesystem interface, most of which we ignore.
1009 * (And which seems not to be implemented, anyway.)
1044 SetFileSystemStatus,
1058 * Command status values
1079 ST_NAMETOOLONG = 63,
1084 ST_BADHANDLE = 10001,
1085 ST_NOT_SYNC = 10002,
1086 ST_BAD_COOKIE = 10003,
1088 ST_TOOSMALL = 10005,
1089 ST_SERVERFAULT = 10006,
1092 ST_NOTMOUNTED = 10009,
1093 ST_MAINTMODE = 10010,
1098 * Volume manager commands
1100 typedef enum _VM_COMMANDS {
1109 VM_SliceBlockRead, /* raw access to configured storage objects */
1111 VM_DriveBlockRead, /* raw access to physical devices */
1113 VM_EnclosureMgt, /* enclosure management */
1114 VM_Unused, /* used to be diskset management */
1116 VM_CtPerf, /* performance test */
1122 VM_DrvErrTblLog, /* drive error table/log type of command */
1127 * "mountable object"
1131 char FileSystemName[16];
1132 struct aac_container_creation CreateInfo;
1136 u_int32_t ContentState;
1137 #define FSCS_READONLY 0x0002 /* XXX need more information
1142 u_int32_t AlterEgoId;
1143 u_int32_t CapacityHigh;
1146 struct aac_mntinfo {
1152 struct aac_mntinforesp {
1155 u_int32_t MntRespCount;
1156 struct aac_mntobj MntTable[1];
1160 * Container shutdown command.
1162 struct aac_closecommand {
1164 u_int32_t ContainerId;
1168 * Container Config Command
1170 #define CT_GET_SCSI_METHOD 64
1177 struct aac_ctcfg_resp {
1186 #define AAC_SCSI_MAX_PORTS 10
1187 #define AAC_BUS_NO_EXIST 0
1188 #define AAC_BUS_VALID 1
1189 #define AAC_BUS_FAULTED 2
1190 #define AAC_BUS_DISABLED 3
1191 #define GetBusInfo 0x9
1193 struct aac_getbusinf {
1194 u_int32_t ProbeComplete;
1196 u_int32_t TargetsPerBus;
1197 u_int8_t InitiatorBusId[AAC_SCSI_MAX_PORTS];
1198 u_int8_t BusValid[AAC_SCSI_MAX_PORTS];
1201 struct aac_vmioctl {
1207 u_int32_t IoctlBuf[1]; /* Placeholder? */
1210 struct aac_vmi_businf_resp {
1216 struct aac_getbusinf BusInf;
1220 #define AAC_BTL_TO_HANDLE(b, t, l) \
1221 (((b & 0x3f) << 7) | ((l & 0x7) << 4) | (t & 0xf))
1223 #define AAC_BTL_TO_HANDLE(b, t, l) \
1224 ((((u_int32_t)b & 0x0f) << 24) | \
1225 (((u_int32_t)l & 0xff) << 16) | \
1226 ((u_int32_t)t & 0xffff))
1228 #define GetDeviceProbeInfo 0x5
1230 struct aac_vmi_devinfo_resp {
1236 u_int8_t VendorId[8];
1237 u_int8_t ProductId[16];
1238 u_int8_t ProductRev[4];
1245 u_int32_t reserved[2];
1246 u_int8_t VendorSpecific[20];
1248 u_int32_t AAC_Managed:1;
1250 u_int32_t reserved2:6;
1254 u_int32_t ultraEnable:1,
1266 }; /* Do not pack */
1268 #define ResetBus 0x16
1269 struct aac_resetbus {
1270 u_int32_t BusNumber;
1274 * Write 'stability' options.
1282 * Commit level response for a write request.
1285 CMFILE_SYNC_NVRAM = 1,
1293 * Block read/write operations.
1294 * These structures are packed into the 'data' area in the FIB.
1297 struct aac_blockread {
1298 u_int32_t Command; /* not FSACommand! */
1299 u_int32_t ContainerId;
1300 u_int32_t BlockNumber;
1301 u_int32_t ByteCount;
1302 struct aac_sg_table SgMap; /* variable size */
1305 struct aac_blockread64 {
1307 u_int16_t ContainerId;
1308 u_int16_t SectorCount;
1309 u_int32_t BlockNumber;
1312 struct aac_sg_table64 SgMap64;
1315 struct aac_blockread_response {
1317 u_int32_t ByteCount;
1320 struct aac_blockwrite {
1321 u_int32_t Command; /* not FSACommand! */
1322 u_int32_t ContainerId;
1323 u_int32_t BlockNumber;
1324 u_int32_t ByteCount;
1326 struct aac_sg_table SgMap; /* variable size */
1329 struct aac_blockwrite64 {
1330 u_int32_t Command; /* not FSACommand! */
1331 u_int16_t ContainerId;
1332 u_int16_t SectorCount;
1333 u_int32_t BlockNumber;
1336 struct aac_sg_table64 SgMap64; /* variable size */
1339 struct aac_blockwrite_response {
1341 u_int32_t ByteCount;
1342 u_int32_t Committed;
1346 u_int64_t BlockNumber;
1347 u_int32_t ByteCount;
1348 u_int16_t ContainerId;
1349 u_int16_t Flags; /* 0: W, 1: R */
1350 u_int16_t BpTotal; /* reserved for FW use */
1351 u_int16_t BpComplete; /* reserved for FW use */
1352 struct aac_sg_tableraw SgMapRaw; /* variable size */
1356 * Container shutdown command.
1358 struct aac_close_command {
1360 u_int32_t ContainerId;
1364 * SCSI Passthrough structures
1374 u_int32_t retry_limit;
1377 struct aac_sg_table sg_map32;
1381 AAC_SRB_FUNC_EXECUTE_SCSI = 0x00,
1382 AAC_SRB_FUNC_CLAIM_DEVICE,
1383 AAC_SRB_FUNC_IO_CONTROL,
1384 AAC_SRB_FUNC_RECEIVE_EVENT,
1385 AAC_SRB_FUNC_RELEASE_QUEUE,
1386 AAC_SRB_FUNC_ATTACH_DEVICE,
1387 AAC_SRB_FUNC_RELEASE_DEVICE,
1388 AAC_SRB_FUNC_SHUTDOWN,
1390 AAC_SRB_FUNC_ABORT_COMMAND = 0x10,
1391 AAC_SRB_FUNC_RELEASE_RECOVERY,
1392 AAC_SRB_FUNC_RESET_BUS,
1393 AAC_SRB_FUNC_RESET_DEVICE,
1394 AAC_SRB_FUNC_TERMINATE_IO,
1395 AAC_SRB_FUNC_FLUSH_QUEUE,
1396 AAC_SRB_FUNC_REMOVE_DEVICE,
1397 AAC_SRB_FUNC_DOMAIN_VALIDATION
1400 #define AAC_SRB_FLAGS_NO_DATA_XFER 0x0000
1401 #define AAC_SRB_FLAGS_DISABLE_DISCONNECT 0x0004
1402 #define AAC_SRB_FLAGS_DISABLE_SYNC_TRANSFER 0x0008
1403 #define AAC_SRB_FLAGS_BYPASS_FROZEN_QUEUE 0x0010
1404 #define AAC_SRB_FLAGS_DISABLE_AUTOSENSE 0x0020
1405 #define AAC_SRB_FLAGS_DATA_IN 0x0040
1406 #define AAC_SRB_FLAGS_DATA_OUT 0x0080
1407 #define AAC_SRB_FLAGS_UNSPECIFIED_DIRECTION \
1408 (AAC_SRB_FLAGS_DATA_IN | AAC_SRB_FLAGS_DATA_OUT)
1410 #define AAC_HOST_SENSE_DATA_MAX 30
1412 struct aac_srb_response {
1413 u_int32_t fib_status;
1414 u_int32_t srb_status;
1415 u_int32_t scsi_status;
1417 u_int32_t sense_len;
1418 u_int8_t sense[AAC_HOST_SENSE_DATA_MAX];
1422 * Status codes for SCSI passthrough commands. Since they are based on ASPI,
1423 * they also exactly match CAM status codes in both enumeration and meaning.
1424 * They seem to also be used as status codes for synchronous FIBs.
1427 AAC_SRB_STS_PENDING = 0x00,
1428 AAC_SRB_STS_SUCCESS,
1429 AAC_SRB_STS_ABORTED,
1430 AAC_SRB_STS_ABORT_FAILED,
1433 AAC_SRB_STS_INVALID_REQUEST,
1434 AAC_SRB_STS_INVALID_PATH_ID,
1435 AAC_SRB_STS_NO_DEVICE,
1436 AAC_SRB_STS_TIMEOUT,
1437 AAC_SRB_STS_SELECTION_TIMEOUT,
1438 AAC_SRB_STS_COMMAND_TIMEOUT,
1439 AAC_SRB_STS_MESSAGE_REJECTED = 0x0D,
1440 AAC_SRB_STS_BUS_RESET,
1441 AAC_SRB_STS_PARITY_ERROR,
1442 AAC_SRB_STS_REQUEST_SENSE_FAILED,
1444 AAC_SRB_STS_DATA_OVERRUN,
1445 AAC_SRB_STS_UNEXPECTED_BUS_FREE,
1446 AAC_SRB_STS_PHASE_SEQUENCE_FAILURE,
1447 AAC_SRB_STS_BAD_SRB_BLOCK_LENGTH,
1448 AAC_SRB_STS_REQUEST_FLUSHED,
1449 AAC_SRB_STS_INVALID_LUN = 0x20,
1450 AAC_SRB_STS_INVALID_TARGET_ID,
1451 AAC_SRB_STS_BAD_FUNCTION,
1452 AAC_SRB_STS_ERROR_RECOVERY
1456 * Register set for adapters based on the Falcon bridge and PPC core
1459 #define AAC_FA_DOORBELL0_CLEAR 0x00
1460 #define AAC_FA_DOORBELL1_CLEAR 0x02
1461 #define AAC_FA_DOORBELL0 0x04
1462 #define AAC_FA_DOORBELL1 0x06
1463 #define AAC_FA_MASK0_CLEAR 0x08
1464 #define AAC_FA_MASK1_CLEAR 0x0a
1465 #define AAC_FA_MASK0 0x0c
1466 #define AAC_FA_MASK1 0x0e
1467 #define AAC_FA_MAILBOX 0x10
1468 #define AAC_FA_FWSTATUS 0x2c /* Mailbox 7 */
1469 #define AAC_FA_INTSRC 0x900
1471 #define AAC_FA_HACK(sc) (void)AAC_MEM0_GETREG4(sc, AAC_FA_INTSRC)
1474 * Register definitions for the Adaptec AAC-364 'Jalapeno I/II' adapters, based
1475 * on the SA110 'StrongArm'.
1478 #define AAC_SA_DOORBELL0_CLEAR 0x98 /* doorbell 0 (adapter->host) */
1479 #define AAC_SA_DOORBELL0_SET 0x9c
1480 #define AAC_SA_DOORBELL0 0x9c
1481 #define AAC_SA_MASK0_CLEAR 0xa0
1482 #define AAC_SA_MASK0_SET 0xa4
1484 #define AAC_SA_DOORBELL1_CLEAR 0x9a /* doorbell 1 (host->adapter) */
1485 #define AAC_SA_DOORBELL1_SET 0x9e
1486 #define AAC_SA_DOORBELL1 0x9e
1487 #define AAC_SA_MASK1_CLEAR 0xa2
1488 #define AAC_SA_MASK1_SET 0xa6
1490 #define AAC_SA_MAILBOX 0xa8 /* mailbox (20 bytes) */
1491 #define AAC_SA_FWSTATUS 0xc4
1494 * Register definitions for the Adaptec 'Pablano' adapters, based on the i960Rx,
1495 * and other related adapters.
1498 #define AAC_RX_OMR0 0x18 /* outbound message register 0 */
1499 #define AAC_RX_OMR1 0x1c /* outbound message register 1 */
1500 #define AAC_RX_IDBR 0x20 /* inbound doorbell register */
1501 #define AAC_RX_IISR 0x24 /* inbound interrupt status register */
1502 #define AAC_RX_IIMR 0x28 /* inbound interrupt mask register */
1503 #define AAC_RX_ODBR 0x2c /* outbound doorbell register */
1504 #define AAC_RX_OISR 0x30 /* outbound interrupt status register */
1505 #define AAC_RX_OIMR 0x34 /* outbound interrupt mask register */
1506 #define AAC_RX_IQUE 0x40 /* inbound queue */
1507 #define AAC_RX_OQUE 0x44 /* outbound queue */
1509 #define AAC_RX_MAILBOX 0x50 /* mailbox (20 bytes) */
1510 #define AAC_RX_FWSTATUS 0x6c
1513 * Register definitions for the Adaptec 'Rocket' RAID-On-Chip adapters.
1514 * Unsurprisingly, it's quite similar to the i960!
1517 #define AAC_RKT_OMR0 0x18 /* outbound message register 0 */
1518 #define AAC_RKT_OMR1 0x1c /* outbound message register 1 */
1519 #define AAC_RKT_IDBR 0x20 /* inbound doorbell register */
1520 #define AAC_RKT_IISR 0x24 /* inbound interrupt status register */
1521 #define AAC_RKT_IIMR 0x28 /* inbound interrupt mask register */
1522 #define AAC_RKT_ODBR 0x2c /* outbound doorbell register */
1523 #define AAC_RKT_OISR 0x30 /* outbound interrupt status register */
1524 #define AAC_RKT_OIMR 0x34 /* outbound interrupt mask register */
1525 #define AAC_RKT_IQUE 0x40 /* inbound queue */
1526 #define AAC_RKT_OQUE 0x44 /* outbound queue */
1528 #define AAC_RKT_MAILBOX 0x1000 /* mailbox */
1529 #define AAC_RKT_FWSTATUS 0x101c /* Firmware Status (mailbox 7) */
1532 * Common bit definitions for the doorbell registers.
1536 * Status bits in the doorbell registers.
1538 #define AAC_DB_SYNC_COMMAND (1<<0) /* send/completed synchronous FIB */
1539 #define AAC_DB_COMMAND_READY (1<<1) /* posted one or more commands */
1540 #define AAC_DB_RESPONSE_READY (1<<2) /* one or more commands complete */
1541 #define AAC_DB_COMMAND_NOT_FULL (1<<3) /* command queue not full */
1542 #define AAC_DB_RESPONSE_NOT_FULL (1<<4) /* response queue not full */
1545 * The adapter can request the host print a message by setting the
1546 * DB_PRINTF flag in DOORBELL0. The driver responds by collecting the
1547 * message from the printf buffer, clearing the DB_PRINTF flag in
1548 * DOORBELL0 and setting it in DOORBELL1.
1549 * (ODBR and IDBR respectively for the i960Rx adapters)
1551 #define AAC_DB_PRINTF (1<<5) /* adapter requests host printf */
1552 #define AAC_PRINTF_DONE (1<<5) /* Host completed printf processing */
1555 * Mask containing the interrupt bits we care about. We don't anticipate (or
1556 * want) interrupts not in this mask.
1558 #define AAC_DB_INTERRUPTS (AAC_DB_COMMAND_READY | \
1559 AAC_DB_RESPONSE_READY | \
1561 #define AAC_DB_INT_NEW_COMM 0x08