Print this page
space aac_key_strings initialiser in aac.c
7127  remove -Wno-missing-braces from Makefile.uts


 451         aac_getinfo,
 452         nulldev,
 453         nulldev,
 454         aac_attach,
 455         aac_detach,
 456         aac_reset,
 457         &aac_cb_ops,
 458         NULL,
 459         NULL,
 460         aac_quiesce,
 461 };
 462 
 463 static struct modldrv aac_modldrv = {
 464         &mod_driverops,
 465         "AAC Driver " AAC_DRIVER_VERSION,
 466         &aac_dev_ops,
 467 };
 468 
 469 static struct modlinkage aac_modlinkage = {
 470         MODREV_1,
 471         &aac_modldrv,
 472         NULL
 473 };
 474 
 475 static struct aac_softstate  *aac_softstatep;
 476 
 477 /*
 478  * Supported card list
 479  * ordered in vendor id, subvendor id, subdevice id, and device id
 480  */
 481 static struct aac_card_type aac_cards[] = {
 482         {0x1028, 0x1, 0x1028, 0x1, AAC_HWIF_I960RX,
 483             AAC_FLAGS_NO4GB | AAC_FLAGS_34SG, AAC_TYPE_SCSI,
 484             "Dell", "PERC 3/Di"},
 485         {0x1028, 0x2, 0x1028, 0x2, AAC_HWIF_I960RX,
 486             AAC_FLAGS_NO4GB | AAC_FLAGS_34SG, AAC_TYPE_SCSI,
 487             "Dell", "PERC 3/Di"},
 488         {0x1028, 0x3, 0x1028, 0x3, AAC_HWIF_I960RX,
 489             AAC_FLAGS_NO4GB | AAC_FLAGS_34SG, AAC_TYPE_SCSI,
 490             "Dell", "PERC 3/Si"},
 491         {0x1028, 0x8, 0x1028, 0xcf, AAC_HWIF_I960RX,
 492             AAC_FLAGS_NO4GB | AAC_FLAGS_34SG, AAC_TYPE_SCSI,


7524                         mutex_enter(&softs->io_lock);
7525                         (void) aac_do_reset(softs);
7526                         mutex_exit(&softs->io_lock);
7527 
7528                         (void) ndi_devi_offline(dip, NDI_DEVI_REMOVE);
7529                         AACDB_PRINT(softs, CE_NOTE, "c%dt%dL%d offlined",
7530                             softs->instance, tgt, lun);
7531                 }
7532                 break;
7533         }
7534 
7535         mutex_enter(&softs->io_lock);
7536         return (AACOK);
7537 }
7538 
7539 #ifdef DEBUG
7540 
7541 /* -------------------------debug aid functions-------------------------- */
7542 
7543 #define AAC_FIB_CMD_KEY_STRINGS \
7544         TestCommandResponse, "TestCommandResponse", \
7545         TestAdapterCommand, "TestAdapterCommand", \
7546         LastTestCommand, "LastTestCommand", \
7547         ReinitHostNormCommandQueue, "ReinitHostNormCommandQueue", \
7548         ReinitHostHighCommandQueue, "ReinitHostHighCommandQueue", \
7549         ReinitHostHighRespQueue, "ReinitHostHighRespQueue", \
7550         ReinitHostNormRespQueue, "ReinitHostNormRespQueue", \
7551         ReinitAdapNormCommandQueue, "ReinitAdapNormCommandQueue", \
7552         ReinitAdapHighCommandQueue, "ReinitAdapHighCommandQueue", \
7553         ReinitAdapHighRespQueue, "ReinitAdapHighRespQueue", \
7554         ReinitAdapNormRespQueue, "ReinitAdapNormRespQueue", \
7555         InterfaceShutdown, "InterfaceShutdown", \
7556         DmaCommandFib, "DmaCommandFib", \
7557         StartProfile, "StartProfile", \
7558         TermProfile, "TermProfile", \
7559         SpeedTest, "SpeedTest", \
7560         TakeABreakPt, "TakeABreakPt", \
7561         RequestPerfData, "RequestPerfData", \
7562         SetInterruptDefTimer, "SetInterruptDefTimer", \
7563         SetInterruptDefCount, "SetInterruptDefCount", \
7564         GetInterruptDefStatus, "GetInterruptDefStatus", \
7565         LastCommCommand, "LastCommCommand", \
7566         NuFileSystem, "NuFileSystem", \
7567         UFS, "UFS", \
7568         HostFileSystem, "HostFileSystem", \
7569         LastFileSystemCommand, "LastFileSystemCommand", \
7570         ContainerCommand, "ContainerCommand", \
7571         ContainerCommand64, "ContainerCommand64", \
7572         ClusterCommand, "ClusterCommand", \
7573         ScsiPortCommand, "ScsiPortCommand", \
7574         ScsiPortCommandU64, "ScsiPortCommandU64", \
7575         AifRequest, "AifRequest", \
7576         CheckRevision, "CheckRevision", \
7577         FsaHostShutdown, "FsaHostShutdown", \
7578         RequestAdapterInfo, "RequestAdapterInfo", \
7579         IsAdapterPaused, "IsAdapterPaused", \
7580         SendHostTime, "SendHostTime", \
7581         LastMiscCommand, "LastMiscCommand"
7582 
7583 #define AAC_CTVM_SUBCMD_KEY_STRINGS \
7584         VM_Null, "VM_Null", \
7585         VM_NameServe, "VM_NameServe", \
7586         VM_ContainerConfig, "VM_ContainerConfig", \
7587         VM_Ioctl, "VM_Ioctl", \
7588         VM_FilesystemIoctl, "VM_FilesystemIoctl", \
7589         VM_CloseAll, "VM_CloseAll", \
7590         VM_CtBlockRead, "VM_CtBlockRead", \
7591         VM_CtBlockWrite, "VM_CtBlockWrite", \
7592         VM_SliceBlockRead, "VM_SliceBlockRead", \
7593         VM_SliceBlockWrite, "VM_SliceBlockWrite", \
7594         VM_DriveBlockRead, "VM_DriveBlockRead", \
7595         VM_DriveBlockWrite, "VM_DriveBlockWrite", \
7596         VM_EnclosureMgt, "VM_EnclosureMgt", \
7597         VM_Unused, "VM_Unused", \
7598         VM_CtBlockVerify, "VM_CtBlockVerify", \
7599         VM_CtPerf, "VM_CtPerf", \
7600         VM_CtBlockRead64, "VM_CtBlockRead64", \
7601         VM_CtBlockWrite64, "VM_CtBlockWrite64", \
7602         VM_CtBlockVerify64, "VM_CtBlockVerify64", \
7603         VM_CtHostRead64, "VM_CtHostRead64", \
7604         VM_CtHostWrite64, "VM_CtHostWrite64", \
7605         VM_NameServe64, "VM_NameServe64"
7606 
7607 #define AAC_CT_SUBCMD_KEY_STRINGS \
7608         CT_Null, "CT_Null", \
7609         CT_GET_SLICE_COUNT, "CT_GET_SLICE_COUNT", \
7610         CT_GET_PARTITION_COUNT, "CT_GET_PARTITION_COUNT", \
7611         CT_GET_PARTITION_INFO, "CT_GET_PARTITION_INFO", \
7612         CT_GET_CONTAINER_COUNT, "CT_GET_CONTAINER_COUNT", \
7613         CT_GET_CONTAINER_INFO_OLD, "CT_GET_CONTAINER_INFO_OLD", \
7614         CT_WRITE_MBR, "CT_WRITE_MBR", \
7615         CT_WRITE_PARTITION, "CT_WRITE_PARTITION", \
7616         CT_UPDATE_PARTITION, "CT_UPDATE_PARTITION", \
7617         CT_UNLOAD_CONTAINER, "CT_UNLOAD_CONTAINER", \
7618         CT_CONFIG_SINGLE_PRIMARY, "CT_CONFIG_SINGLE_PRIMARY", \
7619         CT_READ_CONFIG_AGE, "CT_READ_CONFIG_AGE", \
7620         CT_WRITE_CONFIG_AGE, "CT_WRITE_CONFIG_AGE", \
7621         CT_READ_SERIAL_NUMBER, "CT_READ_SERIAL_NUMBER", \
7622         CT_ZERO_PAR_ENTRY, "CT_ZERO_PAR_ENTRY", \
7623         CT_READ_MBR, "CT_READ_MBR", \
7624         CT_READ_PARTITION, "CT_READ_PARTITION", \
7625         CT_DESTROY_CONTAINER, "CT_DESTROY_CONTAINER", \
7626         CT_DESTROY2_CONTAINER, "CT_DESTROY2_CONTAINER", \
7627         CT_SLICE_SIZE, "CT_SLICE_SIZE", \
7628         CT_CHECK_CONFLICTS, "CT_CHECK_CONFLICTS", \
7629         CT_MOVE_CONTAINER, "CT_MOVE_CONTAINER", \
7630         CT_READ_LAST_DRIVE, "CT_READ_LAST_DRIVE", \
7631         CT_WRITE_LAST_DRIVE, "CT_WRITE_LAST_DRIVE", \
7632         CT_UNMIRROR, "CT_UNMIRROR", \
7633         CT_MIRROR_DELAY, "CT_MIRROR_DELAY", \
7634         CT_GEN_MIRROR, "CT_GEN_MIRROR", \
7635         CT_GEN_MIRROR2, "CT_GEN_MIRROR2", \
7636         CT_TEST_CONTAINER, "CT_TEST_CONTAINER", \
7637         CT_MOVE2, "CT_MOVE2", \
7638         CT_SPLIT, "CT_SPLIT", \
7639         CT_SPLIT2, "CT_SPLIT2", \
7640         CT_SPLIT_BROKEN, "CT_SPLIT_BROKEN", \
7641         CT_SPLIT_BROKEN2, "CT_SPLIT_BROKEN2", \
7642         CT_RECONFIG, "CT_RECONFIG", \
7643         CT_BREAK2, "CT_BREAK2", \
7644         CT_BREAK, "CT_BREAK", \
7645         CT_MERGE2, "CT_MERGE2", \
7646         CT_MERGE, "CT_MERGE", \
7647         CT_FORCE_ERROR, "CT_FORCE_ERROR", \
7648         CT_CLEAR_ERROR, "CT_CLEAR_ERROR", \
7649         CT_ASSIGN_FAILOVER, "CT_ASSIGN_FAILOVER", \
7650         CT_CLEAR_FAILOVER, "CT_CLEAR_FAILOVER", \
7651         CT_GET_FAILOVER_DATA, "CT_GET_FAILOVER_DATA", \
7652         CT_VOLUME_ADD, "CT_VOLUME_ADD", \
7653         CT_VOLUME_ADD2, "CT_VOLUME_ADD2", \
7654         CT_MIRROR_STATUS, "CT_MIRROR_STATUS", \
7655         CT_COPY_STATUS, "CT_COPY_STATUS", \
7656         CT_COPY, "CT_COPY", \
7657         CT_UNLOCK_CONTAINER, "CT_UNLOCK_CONTAINER", \
7658         CT_LOCK_CONTAINER, "CT_LOCK_CONTAINER", \
7659         CT_MAKE_READ_ONLY, "CT_MAKE_READ_ONLY", \
7660         CT_MAKE_READ_WRITE, "CT_MAKE_READ_WRITE", \
7661         CT_CLEAN_DEAD, "CT_CLEAN_DEAD", \
7662         CT_ABORT_MIRROR_COMMAND, "CT_ABORT_MIRROR_COMMAND", \
7663         CT_SET, "CT_SET", \
7664         CT_GET, "CT_GET", \
7665         CT_GET_NVLOG_ENTRY, "CT_GET_NVLOG_ENTRY", \
7666         CT_GET_DELAY, "CT_GET_DELAY", \
7667         CT_ZERO_CONTAINER_SPACE, "CT_ZERO_CONTAINER_SPACE", \
7668         CT_GET_ZERO_STATUS, "CT_GET_ZERO_STATUS", \
7669         CT_SCRUB, "CT_SCRUB", \
7670         CT_GET_SCRUB_STATUS, "CT_GET_SCRUB_STATUS", \
7671         CT_GET_SLICE_INFO, "CT_GET_SLICE_INFO", \
7672         CT_GET_SCSI_METHOD, "CT_GET_SCSI_METHOD", \
7673         CT_PAUSE_IO, "CT_PAUSE_IO", \
7674         CT_RELEASE_IO, "CT_RELEASE_IO", \
7675         CT_SCRUB2, "CT_SCRUB2", \
7676         CT_MCHECK, "CT_MCHECK", \
7677         CT_CORRUPT, "CT_CORRUPT", \
7678         CT_GET_TASK_COUNT, "CT_GET_TASK_COUNT", \
7679         CT_PROMOTE, "CT_PROMOTE", \
7680         CT_SET_DEAD, "CT_SET_DEAD", \
7681         CT_CONTAINER_OPTIONS, "CT_CONTAINER_OPTIONS", \
7682         CT_GET_NV_PARAM, "CT_GET_NV_PARAM", \
7683         CT_GET_PARAM, "CT_GET_PARAM", \
7684         CT_NV_PARAM_SIZE, "CT_NV_PARAM_SIZE", \
7685         CT_COMMON_PARAM_SIZE, "CT_COMMON_PARAM_SIZE", \
7686         CT_PLATFORM_PARAM_SIZE, "CT_PLATFORM_PARAM_SIZE", \
7687         CT_SET_NV_PARAM, "CT_SET_NV_PARAM", \
7688         CT_ABORT_SCRUB, "CT_ABORT_SCRUB", \
7689         CT_GET_SCRUB_ERROR, "CT_GET_SCRUB_ERROR", \
7690         CT_LABEL_CONTAINER, "CT_LABEL_CONTAINER", \
7691         CT_CONTINUE_DATA, "CT_CONTINUE_DATA", \
7692         CT_STOP_DATA, "CT_STOP_DATA", \
7693         CT_GET_PARTITION_TABLE, "CT_GET_PARTITION_TABLE", \
7694         CT_GET_DISK_PARTITIONS, "CT_GET_DISK_PARTITIONS", \
7695         CT_GET_MISC_STATUS, "CT_GET_MISC_STATUS", \
7696         CT_GET_CONTAINER_PERF_INFO, "CT_GET_CONTAINER_PERF_INFO", \
7697         CT_GET_TIME, "CT_GET_TIME", \
7698         CT_READ_DATA, "CT_READ_DATA", \
7699         CT_CTR, "CT_CTR", \
7700         CT_CTL, "CT_CTL", \
7701         CT_DRAINIO, "CT_DRAINIO", \
7702         CT_RELEASEIO, "CT_RELEASEIO", \
7703         CT_GET_NVRAM, "CT_GET_NVRAM", \
7704         CT_GET_MEMORY, "CT_GET_MEMORY", \
7705         CT_PRINT_CT_LOG, "CT_PRINT_CT_LOG", \
7706         CT_ADD_LEVEL, "CT_ADD_LEVEL", \
7707         CT_NV_ZERO, "CT_NV_ZERO", \
7708         CT_READ_SIGNATURE, "CT_READ_SIGNATURE", \
7709         CT_THROTTLE_ON, "CT_THROTTLE_ON", \
7710         CT_THROTTLE_OFF, "CT_THROTTLE_OFF", \
7711         CT_GET_THROTTLE_STATS, "CT_GET_THROTTLE_STATS", \
7712         CT_MAKE_SNAPSHOT, "CT_MAKE_SNAPSHOT", \
7713         CT_REMOVE_SNAPSHOT, "CT_REMOVE_SNAPSHOT", \
7714         CT_WRITE_USER_FLAGS, "CT_WRITE_USER_FLAGS", \
7715         CT_READ_USER_FLAGS, "CT_READ_USER_FLAGS", \
7716         CT_MONITOR, "CT_MONITOR", \
7717         CT_GEN_MORPH, "CT_GEN_MORPH", \
7718         CT_GET_SNAPSHOT_INFO, "CT_GET_SNAPSHOT_INFO", \
7719         CT_CACHE_SET, "CT_CACHE_SET", \
7720         CT_CACHE_STAT, "CT_CACHE_STAT", \
7721         CT_TRACE_START, "CT_TRACE_START", \
7722         CT_TRACE_STOP, "CT_TRACE_STOP", \
7723         CT_TRACE_ENABLE, "CT_TRACE_ENABLE", \
7724         CT_TRACE_DISABLE, "CT_TRACE_DISABLE", \
7725         CT_FORCE_CORE_DUMP, "CT_FORCE_CORE_DUMP", \
7726         CT_SET_SERIAL_NUMBER, "CT_SET_SERIAL_NUMBER", \
7727         CT_RESET_SERIAL_NUMBER, "CT_RESET_SERIAL_NUMBER", \
7728         CT_ENABLE_RAID5, "CT_ENABLE_RAID5", \
7729         CT_CLEAR_VALID_DUMP_FLAG, "CT_CLEAR_VALID_DUMP_FLAG", \
7730         CT_GET_MEM_STATS, "CT_GET_MEM_STATS", \
7731         CT_GET_CORE_SIZE, "CT_GET_CORE_SIZE", \
7732         CT_CREATE_CONTAINER_OLD, "CT_CREATE_CONTAINER_OLD", \
7733         CT_STOP_DUMPS, "CT_STOP_DUMPS", \
7734         CT_PANIC_ON_TAKE_A_BREAK, "CT_PANIC_ON_TAKE_A_BREAK", \
7735         CT_GET_CACHE_STATS, "CT_GET_CACHE_STATS", \
7736         CT_MOVE_PARTITION, "CT_MOVE_PARTITION", \
7737         CT_FLUSH_CACHE, "CT_FLUSH_CACHE", \
7738         CT_READ_NAME, "CT_READ_NAME", \
7739         CT_WRITE_NAME, "CT_WRITE_NAME", \
7740         CT_TOSS_CACHE, "CT_TOSS_CACHE", \
7741         CT_LOCK_DRAINIO, "CT_LOCK_DRAINIO", \
7742         CT_CONTAINER_OFFLINE, "CT_CONTAINER_OFFLINE", \
7743         CT_SET_CACHE_SIZE, "CT_SET_CACHE_SIZE", \
7744         CT_CLEAN_SHUTDOWN_STATUS, "CT_CLEAN_SHUTDOWN_STATUS", \
7745         CT_CLEAR_DISKLOG_ON_DISK, "CT_CLEAR_DISKLOG_ON_DISK", \
7746         CT_CLEAR_ALL_DISKLOG, "CT_CLEAR_ALL_DISKLOG", \
7747         CT_CACHE_FAVOR, "CT_CACHE_FAVOR", \
7748         CT_READ_PASSTHRU_MBR, "CT_READ_PASSTHRU_MBR", \
7749         CT_SCRUB_NOFIX, "CT_SCRUB_NOFIX", \
7750         CT_SCRUB2_NOFIX, "CT_SCRUB2_NOFIX", \
7751         CT_FLUSH, "CT_FLUSH", \
7752         CT_REBUILD, "CT_REBUILD", \
7753         CT_FLUSH_CONTAINER, "CT_FLUSH_CONTAINER", \
7754         CT_RESTART, "CT_RESTART", \
7755         CT_GET_CONFIG_STATUS, "CT_GET_CONFIG_STATUS", \
7756         CT_TRACE_FLAG, "CT_TRACE_FLAG", \
7757         CT_RESTART_MORPH, "CT_RESTART_MORPH", \
7758         CT_GET_TRACE_INFO, "CT_GET_TRACE_INFO", \
7759         CT_GET_TRACE_ITEM, "CT_GET_TRACE_ITEM", \
7760         CT_COMMIT_CONFIG, "CT_COMMIT_CONFIG", \
7761         CT_CONTAINER_EXISTS, "CT_CONTAINER_EXISTS", \
7762         CT_GET_SLICE_FROM_DEVT, "CT_GET_SLICE_FROM_DEVT", \
7763         CT_OPEN_READ_WRITE, "CT_OPEN_READ_WRITE", \
7764         CT_WRITE_MEMORY_BLOCK, "CT_WRITE_MEMORY_BLOCK", \
7765         CT_GET_CACHE_PARAMS, "CT_GET_CACHE_PARAMS", \
7766         CT_CRAZY_CACHE, "CT_CRAZY_CACHE", \
7767         CT_GET_PROFILE_STRUCT, "CT_GET_PROFILE_STRUCT", \
7768         CT_SET_IO_TRACE_FLAG, "CT_SET_IO_TRACE_FLAG", \
7769         CT_GET_IO_TRACE_STRUCT, "CT_GET_IO_TRACE_STRUCT", \
7770         CT_CID_TO_64BITS_UID, "CT_CID_TO_64BITS_UID", \
7771         CT_64BITS_UID_TO_CID, "CT_64BITS_UID_TO_CID", \
7772         CT_PAR_TO_64BITS_UID, "CT_PAR_TO_64BITS_UID", \
7773         CT_CID_TO_32BITS_UID, "CT_CID_TO_32BITS_UID", \
7774         CT_32BITS_UID_TO_CID, "CT_32BITS_UID_TO_CID", \
7775         CT_PAR_TO_32BITS_UID, "CT_PAR_TO_32BITS_UID", \
7776         CT_SET_FAILOVER_OPTION, "CT_SET_FAILOVER_OPTION", \
7777         CT_GET_FAILOVER_OPTION, "CT_GET_FAILOVER_OPTION", \
7778         CT_STRIPE_ADD2, "CT_STRIPE_ADD2", \
7779         CT_CREATE_VOLUME_SET, "CT_CREATE_VOLUME_SET", \
7780         CT_CREATE_STRIPE_SET, "CT_CREATE_STRIPE_SET", \
7781         CT_VERIFY_CONTAINER, "CT_VERIFY_CONTAINER", \
7782         CT_IS_CONTAINER_DEAD, "CT_IS_CONTAINER_DEAD", \
7783         CT_GET_CONTAINER_OPTION, "CT_GET_CONTAINER_OPTION", \
7784         CT_GET_SNAPSHOT_UNUSED_STRUCT, "CT_GET_SNAPSHOT_UNUSED_STRUCT", \
7785         CT_CLEAR_SNAPSHOT_UNUSED_STRUCT, "CT_CLEAR_SNAPSHOT_UNUSED_STRUCT", \
7786         CT_GET_CONTAINER_INFO, "CT_GET_CONTAINER_INFO", \
7787         CT_CREATE_CONTAINER, "CT_CREATE_CONTAINER", \
7788         CT_CHANGE_CREATIONINFO, "CT_CHANGE_CREATIONINFO", \
7789         CT_CHECK_CONFLICT_UID, "CT_CHECK_CONFLICT_UID", \
7790         CT_CONTAINER_UID_CHECK, "CT_CONTAINER_UID_CHECK", \
7791         CT_IS_CONTAINER_MEATADATA_STANDARD, \
7792             "CT_IS_CONTAINER_MEATADATA_STANDARD", \
7793         CT_IS_SLICE_METADATA_STANDARD, "CT_IS_SLICE_METADATA_STANDARD", \
7794         CT_GET_IMPORT_COUNT, "CT_GET_IMPORT_COUNT", \
7795         CT_CANCEL_ALL_IMPORTS, "CT_CANCEL_ALL_IMPORTS", \
7796         CT_GET_IMPORT_INFO, "CT_GET_IMPORT_INFO", \
7797         CT_IMPORT_ARRAY, "CT_IMPORT_ARRAY", \
7798         CT_GET_LOG_SIZE, "CT_GET_LOG_SIZE", \
7799         CT_ALARM_GET_STATE, "CT_ALARM_GET_STATE", \
7800         CT_ALARM_SET_STATE, "CT_ALARM_SET_STATE", \
7801         CT_ALARM_ON_OFF, "CT_ALARM_ON_OFF", \
7802         CT_GET_EE_OEM_ID, "CT_GET_EE_OEM_ID", \
7803         CT_GET_PPI_HEADERS, "CT_GET_PPI_HEADERS", \
7804         CT_GET_PPI_DATA, "CT_GET_PPI_DATA", \
7805         CT_GET_PPI_ENTRIES, "CT_GET_PPI_ENTRIES", \
7806         CT_DELETE_PPI_BUNDLE, "CT_DELETE_PPI_BUNDLE", \
7807         CT_GET_PARTITION_TABLE_2, "CT_GET_PARTITION_TABLE_2", \
7808         CT_GET_PARTITION_INFO_2, "CT_GET_PARTITION_INFO_2", \
7809         CT_GET_DISK_PARTITIONS_2, "CT_GET_DISK_PARTITIONS_2", \
7810         CT_QUIESCE_ADAPTER, "CT_QUIESCE_ADAPTER", \
7811         CT_CLEAR_PPI_TABLE, "CT_CLEAR_PPI_TABLE"
7812 
7813 #define AAC_CL_SUBCMD_KEY_STRINGS \
7814         CL_NULL, "CL_NULL", \
7815         DS_INIT, "DS_INIT", \
7816         DS_RESCAN, "DS_RESCAN", \
7817         DS_CREATE, "DS_CREATE", \
7818         DS_DELETE, "DS_DELETE", \
7819         DS_ADD_DISK, "DS_ADD_DISK", \
7820         DS_REMOVE_DISK, "DS_REMOVE_DISK", \
7821         DS_MOVE_DISK, "DS_MOVE_DISK", \
7822         DS_TAKE_OWNERSHIP, "DS_TAKE_OWNERSHIP", \
7823         DS_RELEASE_OWNERSHIP, "DS_RELEASE_OWNERSHIP", \
7824         DS_FORCE_OWNERSHIP, "DS_FORCE_OWNERSHIP", \
7825         DS_GET_DISK_SET_PARAM, "DS_GET_DISK_SET_PARAM", \
7826         DS_GET_DRIVE_PARAM, "DS_GET_DRIVE_PARAM", \
7827         DS_GET_SLICE_PARAM, "DS_GET_SLICE_PARAM", \
7828         DS_GET_DISK_SETS, "DS_GET_DISK_SETS", \
7829         DS_GET_DRIVES, "DS_GET_DRIVES", \
7830         DS_SET_DISK_SET_PARAM, "DS_SET_DISK_SET_PARAM", \
7831         DS_ONLINE, "DS_ONLINE", \
7832         DS_OFFLINE, "DS_OFFLINE", \
7833         DS_ONLINE_CONTAINERS, "DS_ONLINE_CONTAINERS", \
7834         DS_FSAPRINT, "DS_FSAPRINT", \
7835         CL_CFG_SET_HOST_IDS, "CL_CFG_SET_HOST_IDS", \
7836         CL_CFG_SET_PARTNER_HOST_IDS, "CL_CFG_SET_PARTNER_HOST_IDS", \
7837         CL_CFG_GET_CLUSTER_CONFIG, "CL_CFG_GET_CLUSTER_CONFIG", \
7838         CC_CLI_CLEAR_MESSAGE_BUFFER, "CC_CLI_CLEAR_MESSAGE_BUFFER", \
7839         CC_SRV_CLEAR_MESSAGE_BUFFER, "CC_SRV_CLEAR_MESSAGE_BUFFER", \
7840         CC_CLI_SHOW_MESSAGE_BUFFER, "CC_CLI_SHOW_MESSAGE_BUFFER", \
7841         CC_SRV_SHOW_MESSAGE_BUFFER, "CC_SRV_SHOW_MESSAGE_BUFFER", \
7842         CC_CLI_SEND_MESSAGE, "CC_CLI_SEND_MESSAGE", \
7843         CC_SRV_SEND_MESSAGE, "CC_SRV_SEND_MESSAGE", \
7844         CC_CLI_GET_MESSAGE, "CC_CLI_GET_MESSAGE", \
7845         CC_SRV_GET_MESSAGE, "CC_SRV_GET_MESSAGE", \
7846         CC_SEND_TEST_MESSAGE, "CC_SEND_TEST_MESSAGE", \
7847         CC_GET_BUSINFO, "CC_GET_BUSINFO", \
7848         CC_GET_PORTINFO, "CC_GET_PORTINFO", \
7849         CC_GET_NAMEINFO, "CC_GET_NAMEINFO", \
7850         CC_GET_CONFIGINFO, "CC_GET_CONFIGINFO", \
7851         CQ_QUORUM_OP, "CQ_QUORUM_OP"
7852 
7853 #define AAC_AIF_SUBCMD_KEY_STRINGS \
7854         AifCmdEventNotify, "AifCmdEventNotify", \
7855         AifCmdJobProgress, "AifCmdJobProgress", \
7856         AifCmdAPIReport, "AifCmdAPIReport", \
7857         AifCmdDriverNotify, "AifCmdDriverNotify", \
7858         AifReqJobList, "AifReqJobList", \
7859         AifReqJobsForCtr, "AifReqJobsForCtr", \
7860         AifReqJobsForScsi, "AifReqJobsForScsi", \
7861         AifReqJobReport, "AifReqJobReport", \
7862         AifReqTerminateJob, "AifReqTerminateJob", \
7863         AifReqSuspendJob, "AifReqSuspendJob", \
7864         AifReqResumeJob, "AifReqResumeJob", \
7865         AifReqSendAPIReport, "AifReqSendAPIReport", \
7866         AifReqAPIJobStart, "AifReqAPIJobStart", \
7867         AifReqAPIJobUpdate, "AifReqAPIJobUpdate", \
7868         AifReqAPIJobFinish, "AifReqAPIJobFinish"
7869 
7870 #define AAC_IOCTL_SUBCMD_KEY_STRINGS \
7871         Reserved_IOCTL, "Reserved_IOCTL", \
7872         GetDeviceHandle, "GetDeviceHandle", \
7873         BusTargetLun_to_DeviceHandle, "BusTargetLun_to_DeviceHandle", \
7874         DeviceHandle_to_BusTargetLun, "DeviceHandle_to_BusTargetLun", \
7875         RescanBus, "RescanBus", \
7876         GetDeviceProbeInfo, "GetDeviceProbeInfo", \
7877         GetDeviceCapacity, "GetDeviceCapacity", \
7878         GetContainerProbeInfo, "GetContainerProbeInfo", \
7879         GetRequestedMemorySize, "GetRequestedMemorySize", \
7880         GetBusInfo, "GetBusInfo", \
7881         GetVendorSpecific, "GetVendorSpecific", \
7882         EnhancedGetDeviceProbeInfo, "EnhancedGetDeviceProbeInfo", \
7883         EnhancedGetBusInfo, "EnhancedGetBusInfo", \
7884         SetupExtendedCounters, "SetupExtendedCounters", \
7885         GetPerformanceCounters, "GetPerformanceCounters", \
7886         ResetPerformanceCounters, "ResetPerformanceCounters", \
7887         ReadModePage, "ReadModePage", \
7888         WriteModePage, "WriteModePage", \
7889         ReadDriveParameter, "ReadDriveParameter", \
7890         WriteDriveParameter, "WriteDriveParameter", \
7891         ResetAdapter, "ResetAdapter", \
7892         ResetBus, "ResetBus", \
7893         ResetBusDevice, "ResetBusDevice", \
7894         ExecuteSrb, "ExecuteSrb", \
7895         Create_IO_Task, "Create_IO_Task", \
7896         Delete_IO_Task, "Delete_IO_Task", \
7897         Get_IO_Task_Info, "Get_IO_Task_Info", \
7898         Check_Task_Progress, "Check_Task_Progress", \
7899         InjectError, "InjectError", \
7900         GetDeviceDefectCounts, "GetDeviceDefectCounts", \
7901         GetDeviceDefectInfo, "GetDeviceDefectInfo", \
7902         GetDeviceStatus, "GetDeviceStatus", \
7903         ClearDeviceStatus, "ClearDeviceStatus", \
7904         DiskSpinControl, "DiskSpinControl", \
7905         DiskSmartControl, "DiskSmartControl", \
7906         WriteSame, "WriteSame", \
7907         ReadWriteLong, "ReadWriteLong", \
7908         FormatUnit, "FormatUnit", \
7909         TargetDeviceControl, "TargetDeviceControl", \
7910         TargetChannelControl, "TargetChannelControl", \
7911         FlashNewCode, "FlashNewCode", \
7912         DiskCheck, "DiskCheck", \
7913         RequestSense, "RequestSense", \
7914         DiskPERControl, "DiskPERControl", \
7915         Read10, "Read10", \
7916         Write10, "Write10"
7917 
7918 #define AAC_AIFEN_KEY_STRINGS \
7919         AifEnGeneric, "Generic", \
7920         AifEnTaskComplete, "TaskComplete", \
7921         AifEnConfigChange, "Config change", \
7922         AifEnContainerChange, "Container change", \
7923         AifEnDeviceFailure, "device failed", \
7924         AifEnMirrorFailover, "Mirror failover", \
7925         AifEnContainerEvent, "container event", \
7926         AifEnFileSystemChange, "File system changed", \
7927         AifEnConfigPause, "Container pause event", \
7928         AifEnConfigResume, "Container resume event", \
7929         AifEnFailoverChange, "Failover space assignment changed", \
7930         AifEnRAID5RebuildDone, "RAID5 rebuild finished", \
7931         AifEnEnclosureManagement, "Enclosure management event", \
7932         AifEnBatteryEvent, "battery event", \
7933         AifEnAddContainer, "Add container", \
7934         AifEnDeleteContainer, "Delete container", \
7935         AifEnSMARTEvent, "SMART Event", \
7936         AifEnBatteryNeedsRecond, "battery needs reconditioning", \
7937         AifEnClusterEvent, "cluster event", \
7938         AifEnDiskSetEvent, "disk set event occured", \
7939         AifDenMorphComplete, "morph operation completed", \
7940         AifDenVolumeExtendComplete, "VolumeExtendComplete"
7941 
7942 struct aac_key_strings {
7943         int key;
7944         char *message;
7945 };
7946 
7947 extern struct scsi_key_strings scsi_cmds[];
7948 
7949 static struct aac_key_strings aac_fib_cmds[] = {
7950         AAC_FIB_CMD_KEY_STRINGS,
7951         -1,                     NULL
7952 };
7953 
7954 static struct aac_key_strings aac_ctvm_subcmds[] = {
7955         AAC_CTVM_SUBCMD_KEY_STRINGS,
7956         -1,                     NULL
7957 };
7958 
7959 static struct aac_key_strings aac_ct_subcmds[] = {
7960         AAC_CT_SUBCMD_KEY_STRINGS,
7961         -1,                     NULL
7962 };
7963 
7964 static struct aac_key_strings aac_cl_subcmds[] = {
7965         AAC_CL_SUBCMD_KEY_STRINGS,
7966         -1,                     NULL
7967 };
7968 
7969 static struct aac_key_strings aac_aif_subcmds[] = {
7970         AAC_AIF_SUBCMD_KEY_STRINGS,
7971         -1,                     NULL
7972 };
7973 
7974 static struct aac_key_strings aac_ioctl_subcmds[] = {
7975         AAC_IOCTL_SUBCMD_KEY_STRINGS,
7976         -1,                     NULL
7977 };
7978 
7979 static struct aac_key_strings aac_aifens[] = {
7980         AAC_AIFEN_KEY_STRINGS,
7981         -1,                     NULL
7982 };
7983 
7984 /*
7985  * The following function comes from Adaptec:
7986  *
7987  * Get the firmware print buffer parameters from the firmware,
7988  * if the command was successful map in the address.
7989  */
7990 static int
7991 aac_get_fw_debug_buffer(struct aac_softstate *softs)
7992 {
7993         if (aac_sync_mbcommand(softs, AAC_MONKER_GETDRVPROP,
7994             0, 0, 0, 0, NULL) == AACOK) {
7995                 uint32_t mondrv_buf_paddrl = AAC_MAILBOX_GET(softs, 1);
7996                 uint32_t mondrv_buf_paddrh = AAC_MAILBOX_GET(softs, 2);
7997                 uint32_t mondrv_buf_size = AAC_MAILBOX_GET(softs, 3);
7998                 uint32_t mondrv_hdr_size = AAC_MAILBOX_GET(softs, 4);
7999 
8000                 if (mondrv_buf_size) {
8001                         uint32_t offset = mondrv_buf_paddrl - \




 451         aac_getinfo,
 452         nulldev,
 453         nulldev,
 454         aac_attach,
 455         aac_detach,
 456         aac_reset,
 457         &aac_cb_ops,
 458         NULL,
 459         NULL,
 460         aac_quiesce,
 461 };
 462 
 463 static struct modldrv aac_modldrv = {
 464         &mod_driverops,
 465         "AAC Driver " AAC_DRIVER_VERSION,
 466         &aac_dev_ops,
 467 };
 468 
 469 static struct modlinkage aac_modlinkage = {
 470         MODREV_1,
 471         { &aac_modldrv, NULL }

 472 };
 473 
 474 static struct aac_softstate  *aac_softstatep;
 475 
 476 /*
 477  * Supported card list
 478  * ordered in vendor id, subvendor id, subdevice id, and device id
 479  */
 480 static struct aac_card_type aac_cards[] = {
 481         {0x1028, 0x1, 0x1028, 0x1, AAC_HWIF_I960RX,
 482             AAC_FLAGS_NO4GB | AAC_FLAGS_34SG, AAC_TYPE_SCSI,
 483             "Dell", "PERC 3/Di"},
 484         {0x1028, 0x2, 0x1028, 0x2, AAC_HWIF_I960RX,
 485             AAC_FLAGS_NO4GB | AAC_FLAGS_34SG, AAC_TYPE_SCSI,
 486             "Dell", "PERC 3/Di"},
 487         {0x1028, 0x3, 0x1028, 0x3, AAC_HWIF_I960RX,
 488             AAC_FLAGS_NO4GB | AAC_FLAGS_34SG, AAC_TYPE_SCSI,
 489             "Dell", "PERC 3/Si"},
 490         {0x1028, 0x8, 0x1028, 0xcf, AAC_HWIF_I960RX,
 491             AAC_FLAGS_NO4GB | AAC_FLAGS_34SG, AAC_TYPE_SCSI,


7523                         mutex_enter(&softs->io_lock);
7524                         (void) aac_do_reset(softs);
7525                         mutex_exit(&softs->io_lock);
7526 
7527                         (void) ndi_devi_offline(dip, NDI_DEVI_REMOVE);
7528                         AACDB_PRINT(softs, CE_NOTE, "c%dt%dL%d offlined",
7529                             softs->instance, tgt, lun);
7530                 }
7531                 break;
7532         }
7533 
7534         mutex_enter(&softs->io_lock);
7535         return (AACOK);
7536 }
7537 
7538 #ifdef DEBUG
7539 
7540 /* -------------------------debug aid functions-------------------------- */
7541 
7542 #define AAC_FIB_CMD_KEY_STRINGS \
7543         {TestCommandResponse, "TestCommandResponse"}, \
7544         {TestAdapterCommand, "TestAdapterCommand"}, \
7545         {LastTestCommand, "LastTestCommand"}, \
7546         {ReinitHostNormCommandQueue, "ReinitHostNormCommandQueue"}, \
7547         {ReinitHostHighCommandQueue, "ReinitHostHighCommandQueue"}, \
7548         {ReinitHostHighRespQueue, "ReinitHostHighRespQueue"}, \
7549         {ReinitHostNormRespQueue, "ReinitHostNormRespQueue"}, \
7550         {ReinitAdapNormCommandQueue, "ReinitAdapNormCommandQueue"}, \
7551         {ReinitAdapHighCommandQueue, "ReinitAdapHighCommandQueue"}, \
7552         {ReinitAdapHighRespQueue, "ReinitAdapHighRespQueue"}, \
7553         {ReinitAdapNormRespQueue, "ReinitAdapNormRespQueue"}, \
7554         {InterfaceShutdown, "InterfaceShutdown"}, \
7555         {DmaCommandFib, "DmaCommandFib"}, \
7556         {StartProfile, "StartProfile"}, \
7557         {TermProfile, "TermProfile"}, \
7558         {SpeedTest, "SpeedTest"}, \
7559         {TakeABreakPt, "TakeABreakPt"}, \
7560         {RequestPerfData, "RequestPerfData"}, \
7561         {SetInterruptDefTimer, "SetInterruptDefTimer"}, \
7562         {SetInterruptDefCount, "SetInterruptDefCount"}, \
7563         {GetInterruptDefStatus, "GetInterruptDefStatus"}, \
7564         {LastCommCommand, "LastCommCommand"}, \
7565         {NuFileSystem, "NuFileSystem"}, \
7566         {UFS, "UFS"}, \
7567         {HostFileSystem, "HostFileSystem"}, \
7568         {LastFileSystemCommand, "LastFileSystemCommand"}, \
7569         {ContainerCommand, "ContainerCommand"}, \
7570         {ContainerCommand64, "ContainerCommand64"}, \
7571         {ClusterCommand, "ClusterCommand"}, \
7572         {ScsiPortCommand, "ScsiPortCommand"}, \
7573         {ScsiPortCommandU64, "ScsiPortCommandU64"}, \
7574         {AifRequest, "AifRequest"}, \
7575         {CheckRevision, "CheckRevision"}, \
7576         {FsaHostShutdown, "FsaHostShutdown"}, \
7577         {RequestAdapterInfo, "RequestAdapterInfo"}, \
7578         {IsAdapterPaused, "IsAdapterPaused"}, \
7579         {SendHostTime, "SendHostTime"}, \
7580         {LastMiscCommand, "LastMiscCommand"}
7581 
7582 #define AAC_CTVM_SUBCMD_KEY_STRINGS \
7583         {VM_Null, "VM_Null"}, \
7584         {VM_NameServe, "VM_NameServe"}, \
7585         {VM_ContainerConfig, "VM_ContainerConfig"}, \
7586         {VM_Ioctl, "VM_Ioctl"}, \
7587         {VM_FilesystemIoctl, "VM_FilesystemIoctl"}, \
7588         {VM_CloseAll, "VM_CloseAll"}, \
7589         {VM_CtBlockRead, "VM_CtBlockRead"}, \
7590         {VM_CtBlockWrite, "VM_CtBlockWrite"}, \
7591         {VM_SliceBlockRead, "VM_SliceBlockRead"}, \
7592         {VM_SliceBlockWrite, "VM_SliceBlockWrite"}, \
7593         {VM_DriveBlockRead, "VM_DriveBlockRead"}, \
7594         {VM_DriveBlockWrite, "VM_DriveBlockWrite"}, \
7595         {VM_EnclosureMgt, "VM_EnclosureMgt"}, \
7596         {VM_Unused, "VM_Unused"}, \
7597         {VM_CtBlockVerify, "VM_CtBlockVerify"}, \
7598         {VM_CtPerf, "VM_CtPerf"}, \
7599         {VM_CtBlockRead64, "VM_CtBlockRead64"}, \
7600         {VM_CtBlockWrite64, "VM_CtBlockWrite64"}, \
7601         {VM_CtBlockVerify64, "{VM_CtBlockVerify64"}, \
7602         {VM_CtHostRead64, "VM_CtHostRead64"}, \
7603         {VM_CtHostWrite64, "VM_CtHostWrite64"}, \
7604         {VM_NameServe64, "VM_NameServe64"}
7605 
7606 #define AAC_CT_SUBCMD_KEY_STRINGS \
7607         {CT_Null, "CT_Null"}, \
7608         {CT_GET_SLICE_COUNT, "CT_GET_SLICE_COUNT"}, \
7609         {CT_GET_PARTITION_COUNT, "CT_GET_PARTITION_COUNT"}, \
7610         {CT_GET_PARTITION_INFO, "CT_GET_PARTITION_INFO"}, \
7611         {CT_GET_CONTAINER_COUNT, "CT_GET_CONTAINER_COUNT"}, \
7612         {CT_GET_CONTAINER_INFO_OLD, "CT_GET_CONTAINER_INFO_OLD"}, \
7613         {CT_WRITE_MBR, "CT_WRITE_MBR"}, \
7614         {CT_WRITE_PARTITION, "CT_WRITE_PARTITION"}, \
7615         {CT_UPDATE_PARTITION, "CT_UPDATE_PARTITION"}, \
7616         {CT_UNLOAD_CONTAINER, "CT_UNLOAD_CONTAINER"}, \
7617         {CT_CONFIG_SINGLE_PRIMARY, "CT_CONFIG_SINGLE_PRIMARY"}, \
7618         {CT_READ_CONFIG_AGE, "CT_READ_CONFIG_AGE"}, \
7619         {CT_WRITE_CONFIG_AGE, "CT_WRITE_CONFIG_AGE"}, \
7620         {CT_READ_SERIAL_NUMBER, "CT_READ_SERIAL_NUMBER"}, \
7621         {CT_ZERO_PAR_ENTRY, "CT_ZERO_PAR_ENTRY"}, \
7622         {CT_READ_MBR, "CT_READ_MBR"}, \
7623         {CT_READ_PARTITION, "CT_READ_PARTITION"}, \
7624         {CT_DESTROY_CONTAINER, "CT_DESTROY_CONTAINER"}, \
7625         {CT_DESTROY2_CONTAINER, "CT_DESTROY2_CONTAINER"}, \
7626         {CT_SLICE_SIZE, "CT_SLICE_SIZE"}, \
7627         {CT_CHECK_CONFLICTS, "CT_CHECK_CONFLICTS"}, \
7628         {CT_MOVE_CONTAINER, "CT_MOVE_CONTAINER"}, \
7629         {CT_READ_LAST_DRIVE, "CT_READ_LAST_DRIVE"}, \
7630         {CT_WRITE_LAST_DRIVE, "CT_WRITE_LAST_DRIVE"}, \
7631         {CT_UNMIRROR, "CT_UNMIRROR"}, \
7632         {CT_MIRROR_DELAY, "CT_MIRROR_DELAY"}, \
7633         {CT_GEN_MIRROR, "CT_GEN_MIRROR"}, \
7634         {CT_GEN_MIRROR2, "CT_GEN_MIRROR2"}, \
7635         {CT_TEST_CONTAINER, "CT_TEST_CONTAINER"}, \
7636         {CT_MOVE2, "CT_MOVE2"}, \
7637         {CT_SPLIT, "CT_SPLIT"}, \
7638         {CT_SPLIT2, "CT_SPLIT2"}, \
7639         {CT_SPLIT_BROKEN, "CT_SPLIT_BROKEN"}, \
7640         {CT_SPLIT_BROKEN2, "CT_SPLIT_BROKEN2"}, \
7641         {CT_RECONFIG, "CT_RECONFIG"}, \
7642         {CT_BREAK2, "CT_BREAK2"}, \
7643         {CT_BREAK, "CT_BREAK"}, \
7644         {CT_MERGE2, "CT_MERGE2"}, \
7645         {CT_MERGE, "CT_MERGE"}, \
7646         {CT_FORCE_ERROR, "CT_FORCE_ERROR"}, \
7647         {CT_CLEAR_ERROR, "CT_CLEAR_ERROR"}, \
7648         {CT_ASSIGN_FAILOVER, "CT_ASSIGN_FAILOVER"}, \
7649         {CT_CLEAR_FAILOVER, "CT_CLEAR_FAILOVER"}, \
7650         {CT_GET_FAILOVER_DATA, "CT_GET_FAILOVER_DATA"}, \
7651         {CT_VOLUME_ADD, "CT_VOLUME_ADD"}, \
7652         {CT_VOLUME_ADD2, "CT_VOLUME_ADD2"}, \
7653         {CT_MIRROR_STATUS, "CT_MIRROR_STATUS"}, \
7654         {CT_COPY_STATUS, "CT_COPY_STATUS"}, \
7655         {CT_COPY, "CT_COPY"}, \
7656         {CT_UNLOCK_CONTAINER, "CT_UNLOCK_CONTAINER"}, \
7657         {CT_LOCK_CONTAINER, "CT_LOCK_CONTAINER"}, \
7658         {CT_MAKE_READ_ONLY, "CT_MAKE_READ_ONLY"}, \
7659         {CT_MAKE_READ_WRITE, "CT_MAKE_READ_WRITE"}, \
7660         {CT_CLEAN_DEAD, "CT_CLEAN_DEAD"}, \
7661         {CT_ABORT_MIRROR_COMMAND, "CT_ABORT_MIRROR_COMMAND"}, \
7662         {CT_SET, "CT_SET"}, \
7663         {CT_GET, "CT_GET"}, \
7664         {CT_GET_NVLOG_ENTRY, "CT_GET_NVLOG_ENTRY"}, \
7665         {CT_GET_DELAY, "CT_GET_DELAY"}, \
7666         {CT_ZERO_CONTAINER_SPACE, "CT_ZERO_CONTAINER_SPACE"}, \
7667         {CT_GET_ZERO_STATUS, "CT_GET_ZERO_STATUS"}, \
7668         {CT_SCRUB, "CT_SCRUB"}, \
7669         {CT_GET_SCRUB_STATUS, "CT_GET_SCRUB_STATUS"}, \
7670         {CT_GET_SLICE_INFO, "CT_GET_SLICE_INFO"}, \
7671         {CT_GET_SCSI_METHOD, "CT_GET_SCSI_METHOD"}, \
7672         {CT_PAUSE_IO, "CT_PAUSE_IO"}, \
7673         {CT_RELEASE_IO, "CT_RELEASE_IO"}, \
7674         {CT_SCRUB2, "CT_SCRUB2"}, \
7675         {CT_MCHECK, "CT_MCHECK"}, \
7676         {CT_CORRUPT, "CT_CORRUPT"}, \
7677         {CT_GET_TASK_COUNT, "CT_GET_TASK_COUNT"}, \
7678         {CT_PROMOTE, "CT_PROMOTE"}, \
7679         {CT_SET_DEAD, "CT_SET_DEAD"}, \
7680         {CT_CONTAINER_OPTIONS, "CT_CONTAINER_OPTIONS"}, \
7681         {CT_GET_NV_PARAM, "CT_GET_NV_PARAM"}, \
7682         {CT_GET_PARAM, "CT_GET_PARAM"}, \
7683         {CT_NV_PARAM_SIZE, "CT_NV_PARAM_SIZE"}, \
7684         {CT_COMMON_PARAM_SIZE, "CT_COMMON_PARAM_SIZE"}, \
7685         {CT_PLATFORM_PARAM_SIZE, "CT_PLATFORM_PARAM_SIZE"}, \
7686         {CT_SET_NV_PARAM, "CT_SET_NV_PARAM"}, \
7687         {CT_ABORT_SCRUB, "CT_ABORT_SCRUB"}, \
7688         {CT_GET_SCRUB_ERROR, "CT_GET_SCRUB_ERROR"}, \
7689         {CT_LABEL_CONTAINER, "CT_LABEL_CONTAINER"}, \
7690         {CT_CONTINUE_DATA, "CT_CONTINUE_DATA"}, \
7691         {CT_STOP_DATA, "CT_STOP_DATA"}, \
7692         {CT_GET_PARTITION_TABLE, "CT_GET_PARTITION_TABLE"}, \
7693         {CT_GET_DISK_PARTITIONS, "CT_GET_DISK_PARTITIONS"}, \
7694         {CT_GET_MISC_STATUS, "CT_GET_MISC_STATUS"}, \
7695         {CT_GET_CONTAINER_PERF_INFO, "CT_GET_CONTAINER_PERF_INFO"}, \
7696         {CT_GET_TIME, "CT_GET_TIME"}, \
7697         {CT_READ_DATA, "CT_READ_DATA"}, \
7698         {CT_CTR, "CT_CTR"}, \
7699         {CT_CTL, "CT_CTL"}, \
7700         {CT_DRAINIO, "CT_DRAINIO"}, \
7701         {CT_RELEASEIO, "CT_RELEASEIO"}, \
7702         {CT_GET_NVRAM, "CT_GET_NVRAM"}, \
7703         {CT_GET_MEMORY, "CT_GET_MEMORY"}, \
7704         {CT_PRINT_CT_LOG, "CT_PRINT_CT_LOG"}, \
7705         {CT_ADD_LEVEL, "CT_ADD_LEVEL"}, \
7706         {CT_NV_ZERO, "CT_NV_ZERO"}, \
7707         {CT_READ_SIGNATURE, "CT_READ_SIGNATURE"}, \
7708         {CT_THROTTLE_ON, "CT_THROTTLE_ON"}, \
7709         {CT_THROTTLE_OFF, "CT_THROTTLE_OFF"}, \
7710         {CT_GET_THROTTLE_STATS, "CT_GET_THROTTLE_STATS"}, \
7711         {CT_MAKE_SNAPSHOT, "CT_MAKE_SNAPSHOT"}, \
7712         {CT_REMOVE_SNAPSHOT, "CT_REMOVE_SNAPSHOT"}, \
7713         {CT_WRITE_USER_FLAGS, "CT_WRITE_USER_FLAGS"}, \
7714         {CT_READ_USER_FLAGS, "CT_READ_USER_FLAGS"}, \
7715         {CT_MONITOR, "CT_MONITOR"}, \
7716         {CT_GEN_MORPH, "CT_GEN_MORPH"}, \
7717         {CT_GET_SNAPSHOT_INFO, "CT_GET_SNAPSHOT_INFO"}, \
7718         {CT_CACHE_SET, "CT_CACHE_SET"}, \
7719         {CT_CACHE_STAT, "CT_CACHE_STAT"}, \
7720         {CT_TRACE_START, "CT_TRACE_START"}, \
7721         {CT_TRACE_STOP, "CT_TRACE_STOP"}, \
7722         {CT_TRACE_ENABLE, "CT_TRACE_ENABLE"}, \
7723         {CT_TRACE_DISABLE, "CT_TRACE_DISABLE"}, \
7724         {CT_FORCE_CORE_DUMP, "CT_FORCE_CORE_DUMP"}, \
7725         {CT_SET_SERIAL_NUMBER, "CT_SET_SERIAL_NUMBER"}, \
7726         {CT_RESET_SERIAL_NUMBER, "CT_RESET_SERIAL_NUMBER"}, \
7727         {CT_ENABLE_RAID5, "CT_ENABLE_RAID5"}, \
7728         {CT_CLEAR_VALID_DUMP_FLAG, "CT_CLEAR_VALID_DUMP_FLAG"}, \
7729         {CT_GET_MEM_STATS, "CT_GET_MEM_STATS"}, \
7730         {CT_GET_CORE_SIZE, "CT_GET_CORE_SIZE"}, \
7731         {CT_CREATE_CONTAINER_OLD, "CT_CREATE_CONTAINER_OLD"}, \
7732         {CT_STOP_DUMPS, "CT_STOP_DUMPS"}, \
7733         {CT_PANIC_ON_TAKE_A_BREAK, "CT_PANIC_ON_TAKE_A_BREAK"}, \
7734         {CT_GET_CACHE_STATS, "CT_GET_CACHE_STATS"}, \
7735         {CT_MOVE_PARTITION, "CT_MOVE_PARTITION"}, \
7736         {CT_FLUSH_CACHE, "CT_FLUSH_CACHE"}, \
7737         {CT_READ_NAME, "CT_READ_NAME"}, \
7738         {CT_WRITE_NAME, "CT_WRITE_NAME"}, \
7739         {CT_TOSS_CACHE, "CT_TOSS_CACHE"}, \
7740         {CT_LOCK_DRAINIO, "CT_LOCK_DRAINIO"}, \
7741         {CT_CONTAINER_OFFLINE, "CT_CONTAINER_OFFLINE"}, \
7742         {CT_SET_CACHE_SIZE, "CT_SET_CACHE_SIZE"}, \
7743         {CT_CLEAN_SHUTDOWN_STATUS, "CT_CLEAN_SHUTDOWN_STATUS"}, \
7744         {CT_CLEAR_DISKLOG_ON_DISK, "CT_CLEAR_DISKLOG_ON_DISK"}, \
7745         {CT_CLEAR_ALL_DISKLOG, "CT_CLEAR_ALL_DISKLOG"}, \
7746         {CT_CACHE_FAVOR, "CT_CACHE_FAVOR"}, \
7747         {CT_READ_PASSTHRU_MBR, "CT_READ_PASSTHRU_MBR"}, \
7748         {CT_SCRUB_NOFIX, "CT_SCRUB_NOFIX"}, \
7749         {CT_SCRUB2_NOFIX, "CT_SCRUB2_NOFIX"}, \
7750         {CT_FLUSH, "CT_FLUSH"}, \
7751         {CT_REBUILD, "CT_REBUILD"}, \
7752         {CT_FLUSH_CONTAINER, "CT_FLUSH_CONTAINER"}, \
7753         {CT_RESTART, "CT_RESTART"}, \
7754         {CT_GET_CONFIG_STATUS, "CT_GET_CONFIG_STATUS"}, \
7755         {CT_TRACE_FLAG, "CT_TRACE_FLAG"}, \
7756         {CT_RESTART_MORPH, "CT_RESTART_MORPH"}, \
7757         {CT_GET_TRACE_INFO, "CT_GET_TRACE_INFO"}, \
7758         {CT_GET_TRACE_ITEM, "CT_GET_TRACE_ITEM"}, \
7759         {CT_COMMIT_CONFIG, "CT_COMMIT_CONFIG"}, \
7760         {CT_CONTAINER_EXISTS, "CT_CONTAINER_EXISTS"}, \
7761         {CT_GET_SLICE_FROM_DEVT, "CT_GET_SLICE_FROM_DEVT"}, \
7762         {CT_OPEN_READ_WRITE, "CT_OPEN_READ_WRITE"}, \
7763         {CT_WRITE_MEMORY_BLOCK, "CT_WRITE_MEMORY_BLOCK"}, \
7764         {CT_GET_CACHE_PARAMS, "CT_GET_CACHE_PARAMS"}, \
7765         {CT_CRAZY_CACHE, "CT_CRAZY_CACHE"}, \
7766         {CT_GET_PROFILE_STRUCT, "CT_GET_PROFILE_STRUCT"}, \
7767         {CT_SET_IO_TRACE_FLAG, "CT_SET_IO_TRACE_FLAG"}, \
7768         {CT_GET_IO_TRACE_STRUCT, "CT_GET_IO_TRACE_STRUCT"}, \
7769         {CT_CID_TO_64BITS_UID, "CT_CID_TO_64BITS_UID"}, \
7770         {CT_64BITS_UID_TO_CID, "CT_64BITS_UID_TO_CID"}, \
7771         {CT_PAR_TO_64BITS_UID, "CT_PAR_TO_64BITS_UID"}, \
7772         {CT_CID_TO_32BITS_UID, "CT_CID_TO_32BITS_UID"}, \
7773         {CT_32BITS_UID_TO_CID, "CT_32BITS_UID_TO_CID"}, \
7774         {CT_PAR_TO_32BITS_UID, "CT_PAR_TO_32BITS_UID"}, \
7775         {CT_SET_FAILOVER_OPTION, "CT_SET_FAILOVER_OPTION"}, \
7776         {CT_GET_FAILOVER_OPTION, "CT_GET_FAILOVER_OPTION"}, \
7777         {CT_STRIPE_ADD2, "CT_STRIPE_ADD2"}, \
7778         {CT_CREATE_VOLUME_SET, "CT_CREATE_VOLUME_SET"}, \
7779         {CT_CREATE_STRIPE_SET, "CT_CREATE_STRIPE_SET"}, \
7780         {CT_VERIFY_CONTAINER, "CT_VERIFY_CONTAINER"}, \
7781         {CT_IS_CONTAINER_DEAD, "CT_IS_CONTAINER_DEAD"}, \
7782         {CT_GET_CONTAINER_OPTION, "CT_GET_CONTAINER_OPTION"}, \
7783         {CT_GET_SNAPSHOT_UNUSED_STRUCT, "CT_GET_SNAPSHOT_UNUSED_STRUCT"}, \
7784         {CT_CLEAR_SNAPSHOT_UNUSED_STRUCT, "CT_CLEAR_SNAPSHOT_UNUSED_STRUCT"}, \
7785         {CT_GET_CONTAINER_INFO, "CT_GET_CONTAINER_INFO"}, \
7786         {CT_CREATE_CONTAINER, "CT_CREATE_CONTAINER"}, \
7787         {CT_CHANGE_CREATIONINFO, "CT_CHANGE_CREATIONINFO"}, \
7788         {CT_CHECK_CONFLICT_UID, "CT_CHECK_CONFLICT_UID"}, \
7789         {CT_CONTAINER_UID_CHECK, "CT_CONTAINER_UID_CHECK"}, \
7790         {CT_IS_CONTAINER_MEATADATA_STANDARD, \
7791             "CT_IS_CONTAINER_MEATADATA_STANDARD"}, \
7792         {CT_IS_SLICE_METADATA_STANDARD, "CT_IS_SLICE_METADATA_STANDARD"}, \
7793         {CT_GET_IMPORT_COUNT, "CT_GET_IMPORT_COUNT"}, \
7794         {CT_CANCEL_ALL_IMPORTS, "CT_CANCEL_ALL_IMPORTS"}, \
7795         {CT_GET_IMPORT_INFO, "CT_GET_IMPORT_INFO"}, \
7796         {CT_IMPORT_ARRAY, "CT_IMPORT_ARRAY"}, \
7797         {CT_GET_LOG_SIZE, "CT_GET_LOG_SIZE"}, \
7798         {CT_ALARM_GET_STATE, "CT_ALARM_GET_STATE"}, \
7799         {CT_ALARM_SET_STATE, "CT_ALARM_SET_STATE"}, \
7800         {CT_ALARM_ON_OFF, "CT_ALARM_ON_OFF"}, \
7801         {CT_GET_EE_OEM_ID, "CT_GET_EE_OEM_ID"}, \
7802         {CT_GET_PPI_HEADERS, "CT_GET_PPI_HEADERS"}, \
7803         {CT_GET_PPI_DATA, "CT_GET_PPI_DATA"}, \
7804         {CT_GET_PPI_ENTRIES, "CT_GET_PPI_ENTRIES"}, \
7805         {CT_DELETE_PPI_BUNDLE, "CT_DELETE_PPI_BUNDLE"}, \
7806         {CT_GET_PARTITION_TABLE_2, "CT_GET_PARTITION_TABLE_2"}, \
7807         {CT_GET_PARTITION_INFO_2, "CT_GET_PARTITION_INFO_2"}, \
7808         {CT_GET_DISK_PARTITIONS_2, "CT_GET_DISK_PARTITIONS_2"}, \
7809         {CT_QUIESCE_ADAPTER, "CT_QUIESCE_ADAPTER"}, \
7810         {CT_CLEAR_PPI_TABLE, "CT_CLEAR_PPI_TABLE"}
7811 
7812 #define AAC_CL_SUBCMD_KEY_STRINGS \
7813         {CL_NULL, "CL_NULL"}, \
7814         {DS_INIT, "DS_INIT"}, \
7815         {DS_RESCAN, "DS_RESCAN"}, \
7816         {DS_CREATE, "DS_CREATE"}, \
7817         {DS_DELETE, "DS_DELETE"}, \
7818         {DS_ADD_DISK, "DS_ADD_DISK"}, \
7819         {DS_REMOVE_DISK, "DS_REMOVE_DISK"}, \
7820         {DS_MOVE_DISK, "DS_MOVE_DISK"}, \
7821         {DS_TAKE_OWNERSHIP, "DS_TAKE_OWNERSHIP"}, \
7822         {DS_RELEASE_OWNERSHIP, "DS_RELEASE_OWNERSHIP"}, \
7823         {DS_FORCE_OWNERSHIP, "DS_FORCE_OWNERSHIP"}, \
7824         {DS_GET_DISK_SET_PARAM, "DS_GET_DISK_SET_PARAM"}, \
7825         {DS_GET_DRIVE_PARAM, "DS_GET_DRIVE_PARAM"}, \
7826         {DS_GET_SLICE_PARAM, "DS_GET_SLICE_PARAM"}, \
7827         {DS_GET_DISK_SETS, "DS_GET_DISK_SETS"}, \
7828         {DS_GET_DRIVES, "DS_GET_DRIVES"}, \
7829         {DS_SET_DISK_SET_PARAM, "DS_SET_DISK_SET_PARAM"}, \
7830         {DS_ONLINE, "DS_ONLINE"}, \
7831         {DS_OFFLINE, "DS_OFFLINE"}, \
7832         {DS_ONLINE_CONTAINERS, "DS_ONLINE_CONTAINERS"}, \
7833         {DS_FSAPRINT, "DS_FSAPRINT"}, \
7834         {CL_CFG_SET_HOST_IDS, "CL_CFG_SET_HOST_IDS"}, \
7835         {CL_CFG_SET_PARTNER_HOST_IDS, "CL_CFG_SET_PARTNER_HOST_IDS"}, \
7836         {CL_CFG_GET_CLUSTER_CONFIG, "CL_CFG_GET_CLUSTER_CONFIG"}, \
7837         {CC_CLI_CLEAR_MESSAGE_BUFFER, "CC_CLI_CLEAR_MESSAGE_BUFFER"}, \
7838         {CC_SRV_CLEAR_MESSAGE_BUFFER, "CC_SRV_CLEAR_MESSAGE_BUFFER"}, \
7839         {CC_CLI_SHOW_MESSAGE_BUFFER, "CC_CLI_SHOW_MESSAGE_BUFFER"}, \
7840         {CC_SRV_SHOW_MESSAGE_BUFFER, "CC_SRV_SHOW_MESSAGE_BUFFER"}, \
7841         {CC_CLI_SEND_MESSAGE, "CC_CLI_SEND_MESSAGE"}, \
7842         {CC_SRV_SEND_MESSAGE, "CC_SRV_SEND_MESSAGE"}, \
7843         {CC_CLI_GET_MESSAGE, "CC_CLI_GET_MESSAGE"}, \
7844         {CC_SRV_GET_MESSAGE, "CC_SRV_GET_MESSAGE"}, \
7845         {CC_SEND_TEST_MESSAGE, "CC_SEND_TEST_MESSAGE"}, \
7846         {CC_GET_BUSINFO, "CC_GET_BUSINFO"}, \
7847         {CC_GET_PORTINFO, "CC_GET_PORTINFO"}, \
7848         {CC_GET_NAMEINFO, "CC_GET_NAMEINFO"}, \
7849         {CC_GET_CONFIGINFO, "CC_GET_CONFIGINFO"}, \
7850         {CQ_QUORUM_OP, "CQ_QUORUM_OP"}
7851 
7852 #define AAC_AIF_SUBCMD_KEY_STRINGS \
7853         {AifCmdEventNotify, "AifCmdEventNotify"}, \
7854         {AifCmdJobProgress, "AifCmdJobProgress"}, \
7855         {AifCmdAPIReport, "AifCmdAPIReport"}, \
7856         {AifCmdDriverNotify, "AifCmdDriverNotify"}, \
7857         {AifReqJobList, "AifReqJobList"}, \
7858         {AifReqJobsForCtr, "AifReqJobsForCtr"}, \
7859         {AifReqJobsForScsi, "AifReqJobsForScsi"}, \
7860         {AifReqJobReport, "AifReqJobReport"}, \
7861         {AifReqTerminateJob, "AifReqTerminateJob"}, \
7862         {AifReqSuspendJob, "AifReqSuspendJob"}, \
7863         {AifReqResumeJob, "AifReqResumeJob"}, \
7864         {AifReqSendAPIReport, "AifReqSendAPIReport"}, \
7865         {AifReqAPIJobStart, "AifReqAPIJobStart"}, \
7866         {AifReqAPIJobUpdate, "AifReqAPIJobUpdate"}, \
7867         {AifReqAPIJobFinish, "AifReqAPIJobFinish"}
7868 
7869 #define AAC_IOCTL_SUBCMD_KEY_STRINGS \
7870         {Reserved_IOCTL, "Reserved_IOCTL"}, \
7871         {GetDeviceHandle, "GetDeviceHandle"}, \
7872         {BusTargetLun_to_DeviceHandle, "BusTargetLun_to_DeviceHandle"}, \
7873         {DeviceHandle_to_BusTargetLun, "DeviceHandle_to_BusTargetLun"}, \
7874         {RescanBus, "RescanBus"}, \
7875         {GetDeviceProbeInfo, "GetDeviceProbeInfo"}, \
7876         {GetDeviceCapacity, "GetDeviceCapacity"}, \
7877         {GetContainerProbeInfo, "GetContainerProbeInfo"}, \
7878         {GetRequestedMemorySize, "GetRequestedMemorySize"}, \
7879         {GetBusInfo, "GetBusInfo"}, \
7880         {GetVendorSpecific, "GetVendorSpecific"}, \
7881         {EnhancedGetDeviceProbeInfo, "EnhancedGetDeviceProbeInfo"}, \
7882         {EnhancedGetBusInfo, "EnhancedGetBusInfo"}, \
7883         {SetupExtendedCounters, "SetupExtendedCounters"}, \
7884         {GetPerformanceCounters, "GetPerformanceCounters"}, \
7885         {ResetPerformanceCounters, "ResetPerformanceCounters"}, \
7886         {ReadModePage, "ReadModePage"}, \
7887         {WriteModePage, "WriteModePage"}, \
7888         {ReadDriveParameter, "ReadDriveParameter"}, \
7889         {WriteDriveParameter, "WriteDriveParameter"}, \
7890         {ResetAdapter, "ResetAdapter"}, \
7891         {ResetBus, "ResetBus"}, \
7892         {ResetBusDevice, "ResetBusDevice"}, \
7893         {ExecuteSrb, "ExecuteSrb"}, \
7894         {Create_IO_Task, "Create_IO_Task"}, \
7895         {Delete_IO_Task, "Delete_IO_Task"}, \
7896         {Get_IO_Task_Info, "Get_IO_Task_Info"}, \
7897         {Check_Task_Progress, "Check_Task_Progress"}, \
7898         {InjectError, "InjectError"}, \
7899         {GetDeviceDefectCounts, "GetDeviceDefectCounts"}, \
7900         {GetDeviceDefectInfo, "GetDeviceDefectInfo"}, \
7901         {GetDeviceStatus, "GetDeviceStatus"}, \
7902         {ClearDeviceStatus, "ClearDeviceStatus"}, \
7903         {DiskSpinControl, "DiskSpinControl"}, \
7904         {DiskSmartControl, "DiskSmartControl"}, \
7905         {WriteSame, "WriteSame"}, \
7906         {ReadWriteLong, "ReadWriteLong"}, \
7907         {FormatUnit, "FormatUnit"}, \
7908         {TargetDeviceControl, "TargetDeviceControl"}, \
7909         {TargetChannelControl, "TargetChannelControl"}, \
7910         {FlashNewCode, "FlashNewCode"}, \
7911         {DiskCheck, "DiskCheck"}, \
7912         {RequestSense, "RequestSense"}, \
7913         {DiskPERControl, "DiskPERControl"}, \
7914         {Read10, "Read10"}, \
7915         {Write10, "Write10"}
7916 
7917 #define AAC_AIFEN_KEY_STRINGS \
7918         {AifEnGeneric, "Generic"}, \
7919         {AifEnTaskComplete, "TaskComplete"}, \
7920         {AifEnConfigChange, "Config change"}, \
7921         {AifEnContainerChange, "Container change"}, \
7922         {AifEnDeviceFailure, "device failed"}, \
7923         {AifEnMirrorFailover, "Mirror failover"}, \
7924         {AifEnContainerEvent, "container event"}, \
7925         {AifEnFileSystemChange, "File system changed"}, \
7926         {AifEnConfigPause, "Container pause event"}, \
7927         {AifEnConfigResume, "Container resume event"}, \
7928         {AifEnFailoverChange, "Failover space assignment changed"}, \
7929         {AifEnRAID5RebuildDone, "RAID5 rebuild finished"}, \
7930         {AifEnEnclosureManagement, "Enclosure management event"}, \
7931         {AifEnBatteryEvent, "battery event"}, \
7932         {AifEnAddContainer, "Add container"}, \
7933         {AifEnDeleteContainer, "Delete container"}, \
7934         {AifEnSMARTEvent, "SMART Event"}, \
7935         {AifEnBatteryNeedsRecond, "battery needs reconditioning"}, \
7936         {AifEnClusterEvent, "cluster event"}, \
7937         {AifEnDiskSetEvent, "disk set event occured"}, \
7938         {AifDenMorphComplete, "morph operation completed"}, \
7939         {AifDenVolumeExtendComplete, "VolumeExtendComplete"}
7940 
7941 struct aac_key_strings {
7942         int key;
7943         char *message;
7944 };
7945 
7946 extern struct scsi_key_strings scsi_cmds[];
7947 
7948 static struct aac_key_strings aac_fib_cmds[] = {
7949         AAC_FIB_CMD_KEY_STRINGS,
7950         { -1,                   NULL }
7951 };
7952 
7953 static struct aac_key_strings aac_ctvm_subcmds[] = {
7954         AAC_CTVM_SUBCMD_KEY_STRINGS,
7955         { -1,                   NULL }
7956 };
7957 
7958 static struct aac_key_strings aac_ct_subcmds[] = {
7959         AAC_CT_SUBCMD_KEY_STRINGS,
7960         { -1,                   NULL }
7961 };
7962 
7963 static struct aac_key_strings aac_cl_subcmds[] = {
7964         AAC_CL_SUBCMD_KEY_STRINGS,
7965         { -1,                   NULL }
7966 };
7967 
7968 static struct aac_key_strings aac_aif_subcmds[] = {
7969         AAC_AIF_SUBCMD_KEY_STRINGS,
7970         { -1,                   NULL }
7971 };
7972 
7973 static struct aac_key_strings aac_ioctl_subcmds[] = {
7974         AAC_IOCTL_SUBCMD_KEY_STRINGS,
7975         { -1,                   NULL }
7976 };
7977 
7978 static struct aac_key_strings aac_aifens[] = {
7979         AAC_AIFEN_KEY_STRINGS,
7980         { -1,                   NULL }
7981 };
7982 
7983 /*
7984  * The following function comes from Adaptec:
7985  *
7986  * Get the firmware print buffer parameters from the firmware,
7987  * if the command was successful map in the address.
7988  */
7989 static int
7990 aac_get_fw_debug_buffer(struct aac_softstate *softs)
7991 {
7992         if (aac_sync_mbcommand(softs, AAC_MONKER_GETDRVPROP,
7993             0, 0, 0, 0, NULL) == AACOK) {
7994                 uint32_t mondrv_buf_paddrl = AAC_MAILBOX_GET(softs, 1);
7995                 uint32_t mondrv_buf_paddrh = AAC_MAILBOX_GET(softs, 2);
7996                 uint32_t mondrv_buf_size = AAC_MAILBOX_GET(softs, 3);
7997                 uint32_t mondrv_hdr_size = AAC_MAILBOX_GET(softs, 4);
7998 
7999                 if (mondrv_buf_size) {
8000                         uint32_t offset = mondrv_buf_paddrl - \