aac.c revision 830d82f7f87041e48127cac2e92b5cb2d878202e
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Copyright 2005-06 Adaptec, Inc.
* Copyright (c) 2005-06 Adaptec Inc., Achim Leubner
* Copyright (c) 2000 Michael Smith
* Copyright (c) 2001 Scott Long
* Copyright (c) 2000 BSDi
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/ddidmareq.h>
#include <sys/byteorder.h>
#include "aac_regs.h"
#include "aac.h"
char _depends_on[] = "misc/scsi";
/*
* For minor nodes created by the SCSA framework, minor numbers are
* formed by left-shifting instance by INST_MINOR_SHIFT and OR in a
* number less than 64.
*
* To support cfgadm, need to confirm the SCSA framework by creating
* and calling scsi_hba_xxx() functions aacordingly.
*/
#define AAC_MINOR 32
#define AAC_SCSA_MINOR(x) ((x) & TRAN_MINOR_MASK)
do { \
int count = 0; \
while (!(cond)) { \
drv_usecwait(100); \
break; \
} \
count++; \
} \
#define AAC_SENSE_DATA_DESCR_LEN (sizeof (struct scsi_descr_sense_hdr) + \
sizeof (struct scsi_information_sense_descr))
/* NOTE: GETG4ADDRTL(cdbp) is int32_t */
#define AAC_CDB_INQUIRY_CMDDT 0x02
#define AAC_CDB_INQUIRY_EVPD 0x01
#define AAC_VPD_PAGE_CODE 1
#define AAC_VPD_PAGE_LENGTH 3
#define AAC_VPD_PAGE_DATA 4
#define AAC_VPD_ID_CODESET 0
#define AAC_VPD_ID_TYPE 1
#define AAC_VPD_ID_LENGTH 3
#define AAC_VPD_ID_DATA 4
#define AAC_ENABLE_INTR(softs) \
do { \
else \
#define AAC_FWSTATUS_GET(softs) \
static int aac_rx_get_fwstatus(struct aac_softstate *);
static int aac_rx_get_mailbox(struct aac_softstate *, int);
static struct aac_interface aac_rx_interface = {
};
static int aac_rkt_get_fwstatus(struct aac_softstate *);
static int aac_rkt_get_mailbox(struct aac_softstate *, int);
static struct aac_interface aac_rkt_interface = {
};
/*
* SCSA function prototypes
*/
/*
* Interrupt handler funtions
*/
/*
* Internal function in attach
*/
static int aac_check_card_type(struct aac_softstate *);
static int aac_check_firmware(struct aac_softstate *);
static int aac_common_attach(struct aac_softstate *);
static void aac_common_detach(struct aac_softstate *);
static int aac_get_container(struct aac_softstate *);
static int aac_alloc_comm_space(struct aac_softstate *);
static int aac_setup_comm_space(struct aac_softstate *);
static void aac_free_comm_space(struct aac_softstate *);
static int aac_hba_setup(struct aac_softstate *);
uint16_t);
int (*)(caddr_t));
static void aac_release_sync_fib(struct aac_softstate *);
/*
* hardware queue operation funcitons
*/
/*
* fib queue operation functions
*/
struct aac_cmd **);
/*
* slot operation functions
*/
static int aac_create_slots(struct aac_softstate *);
static void aac_destroy_slots(struct aac_softstate *);
static void aac_free_fib(struct aac_slot *);
/*
* Internal funcitons
*/
static void aac_print_scmd(struct scsi_pkt *);
static void aac_print_aif(struct aac_aif_command *);
static void aac_start_waiting_io(struct aac_softstate *);
static void aac_drain_comp_q(struct aac_softstate *);
static int aac_shutdown(struct aac_softstate *);
static int aac_reset_adapter(struct aac_softstate *);
/*
* Timeout handling thread function
*/
/*
* Timeout handling thread function
*/
static void aac_daemon(void*);
/*
* IOCTL related functions
*/
static struct cb_ops aac_cb_ops = {
aac_open, /* open */
aac_close, /* close */
nodev, /* strategy */
nodev, /* print */
nodev, /* dump */
nodev, /* read */
nodev, /* write */
aac_ioctl, /* ioctl */
nodev, /* devmap */
nodev, /* mmap */
nodev, /* segmap */
nochpoll, /* poll */
nodev, /* cb_prop_op */
NULL, /* streamtab */
CB_REV, /* cb_rev */
nodev, /* async I/O read entry point */
nodev /* async I/O write entry point */
};
static struct dev_ops aac_dev_ops = {
0,
NULL,
};
static struct modldrv aac_modldrv = {
"AAC Driver 2.0",
};
static struct modlinkage aac_modlinkage = {
};
static struct aac_softstate *aac_softstatep;
/*
* Suppoted card list
*/
static struct aac_card_type aac_cards[] = {
"Adaptec", "2200S"},
"Adaptec", "2120S"},
"Dell", "PERC 320/DC"},
"Adaptec", "2200S"},
{0, 0, 0, 0, AAC_HWIF_UNKNOWN,
};
};
static struct {
int size;
int notify;
} aac_qinfo[] = {
};
/*
* Default aac dma attributes
*/
static ddi_dma_attr_t aac_buf_dma_attr = {
0x2000ull, /* lowest usable address */
/* (2200 and 2120 cannot dma below 8192 */
0xffffffffull, /* high DMA address range */
0x0000ffffull, /* DMA counter register */
AAC_DMA_ALIGN, /* DMA address alignment */
1, /* DMA burstsizes */
1, /* min effective DMA size */
0xffffffffull, /* max DMA xfer size */
0xffffffffull, /* segment boundary */
AAC_NSEG, /* s/g list length */
512, /* granularity of device */
0, /* DMA transfer flags */
};
static ddi_dma_attr_t aac_addr_dma_attr = {
0x2000ull, /* lowest usable address */
/* (2200 and 2120 cannot dma below 8192 */
0x7fffffffull, /* high DMA address range */
0x0000ffffull, /* DMA counter register */
AAC_DMA_ALIGN, /* DMA address alignment */
1, /* DMA burstsizes */
1, /* min effective DMA size */
0x7fffffffull, /* max DMA xfer size */
0x7fffffffull, /* segment boundary */
1, /* s/g list length */
1, /* granularity of device */
0, /* DMA transfer flags */
};
int
_init(void)
{
int retval = 0;
DBCALLED(1);
sizeof (struct aac_softstate), 0)) != 0)
goto error;
ddi_soft_state_fini((void*)&aac_softstatep);
goto error;
}
ddi_soft_state_fini((void*)&aac_softstatep);
goto error;
}
return (retval);
return (retval);
}
int
{
DBCALLED(1);
}
/*
* An HBA driver cannot be unload unless you reboot,
* so this function will be of no use.
*/
int
_fini(void)
{
int err;
DBCALLED(1);
goto error;
ddi_soft_state_fini((void*)&aac_softstatep);
return (0);
return (err);
}
static int
{
int instance;
struct aac_softstate *softs;
int attach_state = 0;
DBCALLED(1);
switch (cmd) {
case DDI_ATTACH:
break;
case DDI_RESUME:
return (DDI_FAILURE);
default:
return (DDI_FAILURE);
}
/* Get soft state */
goto error;
}
/* Check the card type */
goto error;
}
/* Set hardware dependent interface */
case AAC_HWIF_I960RX:
break;
case AAC_HWIF_RKT:
break;
default:
goto error;
}
/* Set up quirks */
/* We have found the right card and everything is OK */
/* Map PCI mem space */
goto error;
if (ddi_intr_hilevel(dip, 0)) {
"High level interrupt is not supported!"));
goto error;
}
/* Init mutexes */
!= DDI_SUCCESS) {
"Can not get interrupt block cookie!"));
goto error;
}
(void *)softs->iblock_cookie);
/*
* Everything has been set up till now,
* we will do some common attach.
*/
goto error;
}
goto error;
/* Connect interrupt handler */
(ddi_idevice_cookie_t *)0,
"Can not setup interrupt handler!"));
goto error;
}
goto error;
}
DDI_NT_SCSI_NEXUS, 0) != DDI_SUCCESS) {
goto error;
}
DDI_NT_SCSI_ATTACHMENT_POINT, 0) != DDI_SUCCESS) {
goto error;
}
/* create aac node for app. to issue ioctls */
goto error;
}
/* Create a thread for command timeout */
/* Common attach is OK, so we are attached! */
return (DDI_SUCCESS);
if (attach_state & AAC_ATTACH_SCSI_TRAN_SETUP) {
(void) scsi_hba_detach(dip);
}
if (attach_state & AAC_ATTACH_KMUTEX_INITED) {
}
return (DDI_FAILURE);
}
static int
{
int instance;
struct aac_softstate *softs;
DBCALLED(1);
switch (cmd) {
case DDI_DETACH:
break;
case DDI_SUSPEND:
return (DDI_FAILURE);
default:
return (DDI_FAILURE);
}
softs->timeout_id = 0;
(void) scsi_hba_detach(dip);
return (DDI_SUCCESS);
}
/*ARGSUSED*/
static int
{
struct aac_softstate *softs;
DBCALLED(1);
(void) aac_shutdown(softs);
return (DDI_SUCCESS);
}
/*
* Bring the controller down to a dormant state and detach all child devices.
* This function is called before detach or system shutdown.
* Note: we can assume that the q_wait on the controller is empty, as we
* won't allow shutdown if any device is open.
*/
static int
{
int status;
struct aac_close_command *cc;
/* flush all caches, set FW to write through mode */
sizeof (struct aac_fib_header) + \
sizeof (struct aac_close_command));
return (status);
}
static uint_t
{
struct aac_softstate *softs;
return (DDI_INTR_CLAIMED);
} else
return (DDI_INTR_UNCLAIMED);
}
/*
* Setup auto sense data for pkt
*/
void
{
struct scsi_arq_status *arqstat;
arqstat->sts_rqpkt_resid = 0;
arqstat->sts_rqpkt_statistics = 0;
if (info <= 0xffffffff) {
} else { /* 64-bit LBA */
struct scsi_descr_sense_hdr *dsp;
struct scsi_information_sense_descr *isd;
sizeof (struct scsi_information_sense_descr);
}
}
/*
* Setup auto sense data for HARDWARE ERROR
*/
static void
{
}
/*
* Setup auto sense data for UNIT ATTENTION
*/
static void
{
}
}
/*
* Send a command to the adapter in New Comm. interface
*/
static int
{
if (index == 0xffffffffUL)
if (index == 0xffffffffUL)
return (AACERR);
device += 4;
device += 4;
return (AACOK);
}
/*
* Interrupt handler for New Comm. interface
* New Comm. interface use a different mechanism for interrupt. No explict
* message queues, and driver need only accesses the mapped PCI mem space to
* find the completed FIB or AIF.
*/
static uint_t
{
struct aac_softstate *softs;
/* AACDB_PRINT((CE_NOTE, "INTR! new")); */
if (index == 0xffffffff)
if (index == 0xffffffff)
return (DDI_INTR_UNCLAIMED);
do {
if (index & 2) {
int i;
if (index == 0xfffffffe)
return (DDI_INTR_CLAIMED);
/* AIF received */
index &= ~2;
for (i = 0; i < sizeof (struct aac_fib)/4; ++i)
/*
* AIF memory is owned by the adapter, so let it
* know that we are done with it.
*/
} else {
index >>= 2;
if (fast) {
}
}
} while (index != 0xffffffff);
return (DDI_INTR_CLAIMED);
}
/*
* Interrupt handler for old interface
* Explicit message queues are used to send FIB to and get completed FIB from
* manner. The driver has to query the queues to find the completed FIB.
*/
static uint_t
{
struct aac_softstate *softs;
int rval;
/* AACDB_PRINT((CE_NOTE, "INTR! old")); */
if (status & AAC_DB_RESPONSE_READY) {
/* ACK the intr */
(void) AAC_STATUS_GET(softs);
do {
} while (rval == 0);
return (DDI_INTR_CLAIMED);
} else if (status & AAC_DB_PRINTF_READY) {
/* ACK the intr */
(void) AAC_STATUS_GET(softs);
return (DDI_INTR_CLAIMED);
} else if (status & AAC_DB_COMMAND_READY) {
(void) AAC_STATUS_GET(softs);
== AACERR)
}
return (DDI_INTR_CLAIMED);
} else if (status & AAC_DB_COMMAND_NOT_FULL) {
/*
* Without these two condition statements, the OS could hang
* after a while, especially if there are a lot of AIF's to
* handle, for instance if a drive is pulled from an array
* under heavy load.
*/
return (DDI_INTR_CLAIMED);
} else if (status & AAC_DB_RESPONSE_NOT_FULL) {
return (DDI_INTR_CLAIMED);
} else
return (DDI_INTR_UNCLAIMED);
}
/*
* Handle a finished pkt of AAC_CMD_HARD_INTR mode
*/
static void
{
}
/*
* Handle a finished pkt of non AAC_CMD_HARD_INTR mode
*/
static void
{
/* AAC_CMD_NO_INTR means no complete callback */
}
}
/*
* Handle a complete IO, common to aac_intr_new() and aac_intr_old()
*/
static void
{
if (status == 0)
else
/*
* NOTE: use ASYNC to differentiate fibcmd & sendfib,
* see ioctl_send_fib().
*/
/*
* NOTE: Both aac_ioctl_send_fib() and aac_send_raw_srb()
* may wait on softs->event, so use cv_broadcast() instead
* of cv_signal().
*/
} else {
/* Hardware error */
}
}
/*
* Access PCI space to see if the driver can support the card
*/
static int
{
int card_type_index;
int card_found;
/* Map pci configuration space */
return (AACERR);
}
card_type_index = 0;
card_found = 0;
card_found = 1;
/*
* SATA RAID adapter's DMA capability is worse
* than SCSI RAID adapter. So we need to change
* dma_attr_count_max from 0xffff to 0xfff to meet
* the requirement.
*/
0xfffull;
break;
}
}
/* Make sure we can talk to this card */
if (card_found) {
/* supported aac card */
if ((pci_cmd & PCI_COMM_ME) == 0) {
/* force the busmaster enable bit on */
pci_cmd |= PCI_COMM_ME;
pci_cmd);
if ((pci_cmd & PCI_COMM_ME) == 0) {
"?Cannot enable busmaster bit");
goto error;
}
}
if ((pci_cmd & PCI_COMM_MAE) == 0) {
goto error;
}
} else
/* Unknown aac card */
"!aac driver %d.%02d.%02d-%d, found card: " \
"%s %s(pci0x%x.%x.%x.%x) at 0x%x",
mem_base);
return (card_type_index); /* card type detected */
return (AACERR); /* no matched card found */
}
/*
* Check the firmware to determine the features to support and the FIB
* parameters to use.
*/
static int
{
char *pci_mbr;
/* Get supported options */
!= AACOK) {
if (status != AAC_SRB_STS_INVALID_REQUEST) {
"?Fatal error: request adapter info error");
return (AACERR);
}
options = 0;
atu_size = 0;
} else {
}
options = 0;
return (AACOK);
"?Fatal error: firmware changed, system needs reboot");
return (AACERR);
}
/* Process supported options */
if ((options & AAC_SUPPORTED_4GB_WINDOW) != 0 &&
}
if ((options & AAC_SUPPORTED_SGMAP_HOST64) != 0) {
}
if (options & AAC_SUPPORTED_64BIT_ARRAYSIZE) {
}
/* Read preferred settings */
max_fib_size = 0;
}
/* Enable new comm. and rawio at the same time */
(max_fib_size != 0)) {
== DDI_SUCCESS)) {
}
}
}
/* Set FIB parameters */
} else {
sizeof (struct aac_blockwrite64) +
sizeof (struct aac_sg_entry64)) /
sizeof (struct aac_sg_entry64);
else
sizeof (struct aac_blockwrite) +
sizeof (struct aac_sg_entry)) /
sizeof (struct aac_sg_entry);
}
}
"!max_fibs %d max_fibsize 0x%x max_sectors %d max_sg %d",
return (AACOK);
}
/*
* The following function comes from Adaptec:
*
* Routine to be called during initialization of communications with
* the adapter to handle possible adapter configuration issues. When
* the adapter first boots up, it examines attached drives, etc, and
* potentially comes up with a new or revised configuration (relative to
* what's stored in it's NVRAM). Additionally it may discover problems
* that make the current physical configuration unworkable (currently
* applicable only to cluster configuration issues).
*
* If there are no configuration issues or the issues are considered
* trival by the adapter, it will set it's configuration status to
* "FSACT_CONTINUE" and execute the "commit confiuguration" action
* automatically on it's own.
*
* However, if there are non-trivial issues, the adapter will set it's
* internal configuration status to "FSACT_PAUSE" or "FASCT_ABORT"
* and wait for some agent on the host to issue the "\ContainerCommand
* \VM_ContainerConfig\CT_COMMIT_CONFIG" FIB command to cause the
* un-inhibited operation. The host agent should first issue the
* "\ContainerCommand\VM_ContainerConfig\CT_GET_CONFIG_STATUS" FIB
* command to obtain information about config issues detected by
* the adapter.
*
* Normally the adapter's PC BIOS will execute on the host following
* adapter poweron and reset and will be responsible for querring the
* adapter with CT_GET_CONFIG_STATUS and issuing the CT_COMMIT_CONFIG
* command if appropriate.
*
* However, with the introduction of IOP reset support, the adapter may
* boot up without the benefit of the adapter's PC BIOS host agent.
* This routine is intended to take care of these issues in situations
* where BIOS doesn't execute following adapter poweron or reset. The
* CT_COMMIT_CONFIG command is a no-op if it's already been issued, so
* there is no harm in doing this when it's already been done.
*/
static int
{
struct aac_Container *cmd;
struct aac_Container_resp *rsp;
struct aac_cf_status_header *cfg_sts_hdr;
int status;
int ret;
/*
* Get adapter config status
*/
sizeof (struct aac_fib_header) + \
sizeof (struct aac_Container));
/*
* Commit configuration if it's reasonable to do so.
*/
if (cfg_stat_action <= CFACT_PAUSE) {
sizeof (struct aac_fib_header) + \
sizeof (struct aac_Container));
/* Successful completion */
else
/*
* Auto-commit aborted due to error(s).
*/
} else {
/*
* Auto-commit aborted due to adapter indicating
* configuration issue(s) too dangerous to auto-commit.
*/
}
} else {
}
return (ret);
}
/*
* Hardware initialization and resource allocation
*/
static int
{
int i;
DBCALLED(1);
/*
* Wait the card to complete booting up before do anything that
* attempts to communicate with it.
*/
AAC_FWUP_TIMEOUT * 1000);
goto error;
}
/* Read and set card supported options and settings */
goto error;
/* Clear out all interrupts */
AAC_STATUS_CLR(softs, ~0);
/* Setup communication space with the card */
goto error;
}
goto error;
}
/* Allocate slots */
if ((softs->total_slots == 0) &&
goto error;
}
/* Allocate FIBs */
for (i = 0; i < softs->total_slots &&
if (slotp->fib_phyaddr)
continue;
break;
softs->total_fibs++;
}
if (softs->total_fibs == 0)
goto error;
/* Perform acceptance of adapter-detected config changes if possible */
goto error;
}
/* Setup containers */
goto error;
}
return (AACOK);
return (AACERR);
if (softs->total_slots > 0)
if (softs->comm_space_dma_handle)
return (AACERR);
}
/*
* Hardware shutdown and resource release
*/
static void
{
int i;
DBCALLED(1);
(void) aac_shutdown(softs);
/* Release FIBs */
for (i = 0; i < softs->total_slots; i++) {
if (slotp->fib_phyaddr == 0)
continue;
softs->total_fibs--;
}
softs->free_io_slot_len = 0;
}
/*
* Send a synchronous command to the controller and wait for a result.
* Indicate if the controller completed the command with an error status.
*/
int
{
/* Fill in mailbox */
/* Ensure the sync command doorbell flag is cleared */
/* Then set it to signal the adapter */
/* Spin waiting for the command to complete */
AAC_IMMEDIATE_TIMEOUT * 1000);
"Sync command timed out after %d seconds (0x%x)!",
return (AACERR);
}
/* Clear the completion flag */
/* Get the command status */
if (status != AAC_SRB_STS_SUCCESS) {
"Sync command fail: status = 0x%x", status));
return (AACERR);
}
return (AACOK);
}
/*
* Send a synchronous FIB to the adapter and wait for its completion
*/
static int
{
int err;
/* Sync fib only supports 512 bytes */
if (fibsize > AAC_FIB_SIZE)
return (AACERR);
/* Setup sync fib */
/* Give the FIB to the controller, wait for a response. */
return (AACERR);
}
return (AACOK);
}
static struct aac_fib *
{
return (NULL);
} else
return (fib);
}
static void
{
}
/*
* Remove cmd from queue
*/
static struct aac_cmd *
aac_cmd_dequeue(struct aac_cmd_queue *q)
{
mutex_enter(&q->q_mutex);
if (q->q_head) {
q->q_len--;
}
mutex_exit(&q->q_mutex);
return (ac);
}
/*
* Add a cmd to the tail of q
*/
static void
{
mutex_enter(&q->q_mutex);
if (!q->q_head) /* empty queue */
else
q->q_len++;
mutex_exit(&q->q_mutex);
}
/*
* Atomically insert an entry into the nominated queue, returns 0 on success or
* AACERR if the queue is full.
*
* Note: it would be more efficient to defer notifying the controller in
* the case where we may be inserting several entries in rapid succession,
* but implementing this usefully may be difficult (it would involve a
*/
static int
{
DBCALLED(2);
/*
* Wrap the queue first before we check the queue to see
* if it is full
*/
pi = 0;
/* XXX queue full */
return (AACERR);
}
/* Fill in queue entry */
/* Update producer index */
return (AACOK);
}
/*
* Put our response to an AIF on the response queue
*/
static int
{
DBCALLED(2);
/* Tell the adapter where the FIB is */
/*
* Wrap the queue first before we check the queue to see
* if it is full
*/
pi = 0;
/* XXX queue full */
return (AACERR);
}
/* Fill in queue entry */
/* Update producer index */
return (AACOK);
}
/*
* Atomically remove one entry from the nominated queue, returns 0 on
* success or AACERR if the queue is empty.
*/
static int
{
DBCALLED(2);
/* Check for queue empty */
goto out;
}
pi = 0;
/* Check for queue full */
unfull = 1;
/*
* The controller does not wrap the queue,
* so we have to do it by ourselves
*/
ci = 0;
/* Fetch the entry */
switch (queue) {
case AAC_HOST_NORM_CMD_Q:
case AAC_HOST_HIGH_CMD_Q:
sizeof (struct aac_fib);
break;
case AAC_HOST_NORM_RESP_Q:
case AAC_HOST_HIGH_RESP_Q:
index >>= 2;
if (fast) {
}
break;
default:
break;
}
/* Update consumer index */
out:
return (error);
}
/*
* Request information of the container cid
*/
static struct aac_mntinforesp *
int cid)
{
struct aac_mntinfo *mi;
sizeof (struct aac_fib_header) + \
sizeof (struct aac_mntinfo)) == AACERR) {
return (NULL);
}
}
static struct aac_Container *
{
struct aac_Container *ct;
sizeof (struct aac_fib_header) + \
sizeof (struct aac_Container)) == AACERR)
return (NULL);
return (ct);
}
static void
{
}
static int
{
struct aac_mntinforesp *mir;
struct aac_Container *ct;
/* Loop over possible containers */
do {
goto next;
if (i == 0) /* the first time */
goto next;
goto next;
goto next;
total++;
"uid=0x%08x, size=0x%x.%08x, type=%d, name=%s",
i, uid,
next:
i++;
} while ((i < count) && (i < AAC_MAX_LD));
return (AACOK);
}
/*
* Do a rescan of all the possible containers and update the container list
*/
static void
{
int cid;
struct aac_mntinforesp *mir;
int count;
int found;
struct aac_Container *ct;
do {
goto next;
goto next;
found = 1;
== NULL)
goto next;
goto next;
} else {
#ifdef _LP64
">>> Container %u size changed to %lu",
#else
">>> Container %u size changed to %llu",
#endif
}
}
next:
sizeof (struct aac_container));
}
if (mir)
cid++;
found = 0;
continue;
sizeof (struct aac_container));
}
}
}
static int
{
/* Allocate DMA for comm. space */
if (ddi_dma_alloc_handle(
NULL,
"Cannot alloc dma handle for communication area"));
goto error;
}
if (ddi_dma_mem_alloc(
sizeof (struct aac_comm_space),
NULL,
&rlen,
"Cannot alloc mem for communication area"));
goto error;
}
NULL,
sizeof (struct aac_comm_space),
NULL,
&cookie,
&cookien) != DDI_DMA_MAPPED) {
"DMA bind failed for communication area"));
goto error;
}
/* Setup sync FIB space */
return (AACOK);
if (softs->comm_space_acc_handle) {
}
if (softs->comm_space_dma_handle) {
}
return (AACERR);
}
static void
{
}
/*
* Initialize the data structures that are required for the communication
* interface to operate
*/
static int
{
struct aac_adapter_init *initp;
int qoffset;
/* Setup adapter init struct */
/* Setup the preferred settings */
} else {
/*
* Tells the adapter about the physical location of various
* important shared data structures
*/
sizeof (struct aac_fib);
qoffset = (comm_space_phyaddr + \
if (qoffset)
/* Init queue table */
/* Init queue entries */
}
/* Send init structure to the card */
if (aac_sync_mbcommand(softs,
"Cannot send init structrue to adapter"));
return (AACERR);
}
return (AACOK);
}
static uchar_t *
{
return (buf + 8);
}
static uchar_t *
{
return (buf + 16);
}
/*
* Construct unit serial number from container uid
*/
static uchar_t *
{
int i, d;
for (i = 7; i >= 0; i--) {
d = uid & 0xf;
uid >>= 4;
}
return (buf + 8);
}
/*
* SPC-3 7.5 INQUIRY command implementation
*/
static void
{
/* Command Support Data is not supported */
return;
}
}
/* SPC-3 8.4 Vital product data parameters */
switch (page) {
case 0x00:
/* Supported VPD pages */
return;
break;
case 0x80:
/* Unit serial number page */
return;
break;
case 0x83:
/* Device identification page */
return;
/*
* SPC-3 Table 111 - Identifier type
* One recommanded method of constructing the remainder
* of identifier field is to concatenate the product
* identification field from the standard INQUIRY data
* field and the product serial number field from the
* unit serial number page.
*/
break;
default:
0x24, 0x00, 0);
break;
}
} else {
struct scsi_inquiry *inqp =
(struct scsi_inquiry *)b_addr;
if (page != 0) {
0x24, 0x00, 0);
return;
}
return;
/*
* For "sd-max-xfer-size" property which may impact performance
* when IO threads increase.
*/
}
}
/*
* SPC-3 7.10 MODE SENSE command implementation
*/
static void
{
struct mode_format *page3p;
struct mode_geometry *page4p;
struct mode_header *headerp;
unsigned int ncyl;
return;
switch (pagecode) {
/* SBC-3 7.1.3.3 Format device page */
case SD_MODE_SENSE_PAGE3_CODE:
break;
/* SBC-3 7.1.3.8 Rigid disk device geometry page */
case SD_MODE_SENSE_PAGE4_CODE:
break;
case MODEPAGE_CTRL_MODE: /* 64-bit LBA need large sense data */
struct mode_control_scsi3 *mctl;
sizeof (struct mode_control_scsi3) -
sizeof (struct mode_page);
} else
break;
default:
break;
}
}
/*ARGSUSED*/
static int
{
struct aac_softstate *softs;
DBCALLED(2);
return (DDI_FAILURE);
}
/* Only support container that has been detected and valid */
return (DDI_SUCCESS);
} else {
return (DDI_FAILURE);
}
}
/*
* Check if the firmware is Up And Running. If it is in the Kernel Panic
* state, (BlinkLED code + 1) is returned.
* 0 -- firmware up and running
* -1 -- firmware dead
* >0 -- firmware kernel panic
*/
static int
{
int ret;
if (ret & AAC_KERNEL_UP_AND_RUNNING)
ret = 0;
else if (ret & AAC_KERNEL_PANIC)
else
ret = -1;
return (ret);
}
static int
{
int count = 0;
/*
* Hold off new io commands and wait all outstanding io
* commands to complete
*/
while (aac_check_adapter_health(softs) == 0) {
break;
}
/*
* Give the adapter up to 60 more seconds to complete
* the io commands
*/
break;
count++;
}
return (ret);
}
static void
{
int i;
int reason;
/*
* NOTE: interrupt should has been fully disabled before calling this
* function
*/
/*
* Abort all pending commands:
* a) on the controller
*/
for (i = 0; i < AAC_MAX_LD; i++)
for (i = 0; i < softs->total_fibs; i++) {
/*
* Now no other will touch the free slot queue entries, so
* mutex is not necessary.
*/
continue;
/* IOCTL */
} else {
/*
* Each lun should generate a unit attention condition
* when reseted.
*/
}
}
/* b) in the waiting queues */
/* IOCTL */
}
}
}
/*
* The following function comes from Adaptec:
*
* Once do an IOP reset, basically the driver have to re-initialize the card
* as if up from a cold boot, and the driver is responsible for any IO that
* is outstanding to the adapter at the time of the IOP RESET. And prepare
* for IOP RESET by making the init code modular with the ability to call it
* from multiple places.
*/
static int
{
int health;
/* Disable interrupt */
if (health == -1)
goto finish;
if (health == 0) /* flush drives if possible */
(void) aac_shutdown(softs);
/* Execute IOP reset */
!= AACOK) {
struct aac_pause_command *pc;
if (status == AAC_SRB_STS_INVALID_REQUEST)
else /* probably timeout */
/* Unwind aac_shutdown() */
sizeof (struct aac_fib_header) + \
sizeof (struct aac_pause_command));
goto finish;
}
/*
* Re-read and renegotiate the FIB parameters, as one of the actions
* that can result from an IOP reset is the running of a new firmware
* image.
*/
goto finish;
return (rval);
}
static int
{
/*
* If a longer waiting time still can't drain all pending IOs,
* do IOP reset.
*/
return (ret);
}
/*ARGSUSED*/
static int
{
struct aac_softstate *softs;
DBCALLED(1);
/*
* Core dump is a crucial method to analyze problems after panic,
* however if tran_reset() return FAILURE to sd driver, the OS
* will not continue to dump the core. So always return SUCCESS
* when core dump is being done.
*/
if (ddi_in_panic()) {
return (0);
}
return (1);
}
return (0);
}
return (0);
return (1);
}
static int
{
struct aac_softstate *softs;
DBCALLED(1);
return (0);
/* Disable interrupt */
return (1);
}
static void
{
/* Free dma mapping */
if (ac->buf_dma_handle) {
}
}
}
static int
{
struct aac_softstate *softs;
int ret_val;
int capacity;
DBCALLED(2);
"Cannot send cmd to target t%dL%d: %s",
"adapter dead" : "target invalid"));
return (TRAN_FATAL_ERROR);
}
/* Init ac and pkt */
switch (cmd) {
case SCMD_INQUIRY: /* inquiry */
break;
case SCMD_READ_CAPACITY: /* read capacity */
struct scsi_capacity cap;
/* check 64-bit LBA */
else
} else
}
break;
case SCMD_SVC_ACTION_IN_G4: /* read capacity 16 */
/* Check if containers need 64-bit LBA support */
goto unknown;
struct scsi_capacity_16 cap16;
int cap_len = sizeof (struct scsi_capacity_16);
} else
}
break;
case SCMD_READ_G4: /* read_16 */
case SCMD_WRITE_G4: /* write_16 */
goto unknown;
}
/*FALLTHRU*/
case SCMD_READ: /* read_6 */
case SCMD_READ_G1: /* read_10 */
case SCMD_WRITE: /* write_6 */
case SCMD_WRITE_G1: /* write_10 */
break;
}
/* Fill in correct blkno */
struct aac_raw_io *io =
/* Fill in correct blkno */
struct aac_blockread64 *br =
(struct aac_blockread64 *) \
} else {
struct aac_blockwrite64 *bw =
(struct aac_blockwrite64 *) \
}
} else {
/* Fill in correct blkno */
struct aac_blockread *br =
} else {
struct aac_blockwrite *bw =
}
}
/*
* If lba > array size AND rawio, the adapter may hang. So
* check it before sending.
* NOTE: (blkno + blkcnt) may overflow
*/
/*
* Request exceed the capacity of disk set error
* block number to capacity + 1
*/
break;
}
/* Poll pkt */
} else
} else {
/* Async pkt */
else
}
break;
case SCMD_MODE_SENSE: /* mode_sense_6 */
case SCMD_MODE_SENSE_G1: /* mode_sense_10 */
else
break;
case SCMD_TEST_UNIT_READY:
case SCMD_REQUEST_SENSE:
case SCMD_FORMAT:
case SCMD_START_STOP:
case SCMD_SYNCHRONIZE_CACHE:
}
}
break;
case SCMD_DOORLOCK:
else
break;
default: /* unknown command */
break;
}
return (ret_val);
}
static int
{
int rval;
struct aac_softstate *softs;
DBCALLED(1);
/* We don't allow inquiring about capabilities for other targets */
return (-1);
}
return (-1);
}
switch (scsi_hba_lookup_capstr(cap)) {
case SCSI_CAP_ARQ: /* auto request sense */
rval = 1;
break;
case SCSI_CAP_GEOMETRY:
break;
case SCSI_CAP_SECTOR_SIZE:
break;
case SCSI_CAP_TOTAL_SECTORS:
/* Number of sectors */
else
break;
case SCSI_CAP_UNTAGGED_QING:
case SCSI_CAP_TAGGED_QING:
rval = 1;
break;
default:
rval = -1;
break;
}
return (rval);
}
/*ARGSUSED*/
static int
int whom)
{
int rval;
struct aac_softstate *softs;
DBCALLED(1);
/* We don't allow inquiring about capabilities for other targets */
return (-1);
}
return (-1);
}
switch (scsi_hba_lookup_capstr(cap)) {
case SCSI_CAP_ARQ:
break;
case SCSI_CAP_TOTAL_SECTORS:
} else {
rval = 1;
}
break;
case SCSI_CAP_SECTOR_SIZE:
rval = 0;
break;
case SCSI_CAP_UNTAGGED_QING:
case SCSI_CAP_TAGGED_QING:
break;
default:
rval = -1;
break;
}
return (rval);
}
static void
{
DBCALLED(2);
}
static struct scsi_pkt *
{
struct aac_softstate *softs;
int err;
int testflag = 0;
DBCALLED(2);
/* Allocate pkt */
testflag = 1;
/* Force auto request sense */
/* 64-bit LBA needs descriptor format sense data */
slen = (sizeof (struct scsi_extended_sense) <
(sizeof (struct scsi_arq_status) +
sizeof (struct scsi_extended_sense)) :
sizeof (struct scsi_arq_status);
return (NULL);
}
/*
* We will still use this point to fake some
* infomation in tran_start
*/
/* Set cmd flags according to pkt alloc flags */
if (flags & PKT_CONSISTENT)
if (flags & PKT_DMA_PARTIAL)
}
return (pkt);
/* We need to transfer data, so we alloc DMA resources for this pkt */
/* Set dma flags */
if (BUF_IS_READ(bp)) {
} else {
}
if (flags & PKT_CONSISTENT)
if (flags & PKT_DMA_PARTIAL)
/* Alloc buf dma handle */
err = DDI_SUCCESS;
if (!ac->buf_dma_handle)
&ac->buf_dma_handle);
if (err != DDI_SUCCESS) {
"Can't allocate DMA handle, errno=%d", err));
return (NULL);
}
/* Bind buf */
} else {
"non-aligned buffer: addr=0x%p, cnt=%lu",
if (err != DDI_SUCCESS) {
"Cannot alloc DMA to non-aligned buf"));
goto error_out;
}
}
switch (err) {
case DDI_DMA_PARTIAL_MAP:
== DDI_FAILURE) {
"Cannot get number of DMA windows"));
(void) ddi_dma_unbind_handle(
ac->buf_dma_handle);
goto error_out;
}
break;
case DDI_DMA_MAPPED:
break;
default:
}
return (NULL);
}
}
if (transfer_num == 0) {
return (NULL);
}
"bp=0x%p, xfered=%d/%d, resid=%d",
return (pkt);
}
/*
* tran_sync_pkt(9E) - explicit DMA synchronization
*/
/*ARGSUSED*/
static void
{
DBCALLED(2);
if (ac->buf_dma_handle) {
}
}
}
/*
* tran_dmafree(9E) - deallocate DMA resources allocated for command
*/
/*ARGSUSED*/
static void
{
DBCALLED(2);
}
}
/*ARGSUSED*/
static int
{
struct aac_softstate *softs;
int ret = 0;
DBCALLED(1);
goto finish;
if (aac_quiesce_adapter(softs) == 0) {
ret = 1;
}
return (ret);
}
/*ARGSUSED*/
static int
{
struct aac_softstate *softs;
DBCALLED(1);
return (0);
}
return (1);
}
static int
{
int err;
return (AACERR);
if (err != DDI_SUCCESS) {
return (AACERR);
}
return (AACOK);
}
static size_t
{
struct aac_sg_table *sgmap;
struct aac_sg_table64 *sgmap64;
struct aac_sg_tableraw *sgmapraw;
struct scsi_address *ap;
return (0); /* nothing to be transfered */
/* Fill in fib header */
AAC_FIBSTATE_FAST_RESPONSE; /* enable fast io */
/* Fill in fib data */
struct aac_raw_io *io;
*fib_datasizep += sizeof (struct aac_raw_io);
io->ContainerId =
io->BpComplete = 0;
sgelem = sizeof (struct aac_sg_entryraw);
/* Fill in fib data */
struct aac_blockread64 *br;
*fib_datasizep += sizeof (struct aac_blockread64);
br->ContainerId =
} else {
struct aac_blockwrite64 *bw;
*fib_datasizep += sizeof (struct aac_blockwrite64);
bw->ContainerId =
}
sgelem = sizeof (struct aac_sg_entry64);
} else {
/* Fill in fib data */
struct aac_blockread *br;
*fib_datasizep += sizeof (struct aac_blockread);
br->ContainerId =
} else {
struct aac_blockwrite *bw;
*fib_datasizep += sizeof (struct aac_blockwrite);
bw->ContainerId =
}
sgelem = sizeof (struct aac_sg_entry);
}
/* Move cookie and window to build s/g map */
if (cookien == 0) { /* we need to move window */
int err;
if (err != DDI_SUCCESS)
return (0);
} else
return (0);
}
count = 0;
cur_total_xfer = 0;
/*
* Cookie loop
* Note: The old DMA engine do not correctly handle dma_attr_xfer
* attribute. So we have to ensure it by ourself.
*/
} else {
}
count++;
cookien--;
if (cookien > 0)
else
break;
}
else
/* Calculate fib data size */
return (ac->total_xfer);
}
static void
{
int status;
/* Set ac and pkt */
} else
/*
* NOTE: Assigning ac to acp should be done after ac has been inited
* and before the slot being sent for aac_daemon() to check timeout.
* needed.
*/
} else {
/*
* If fib can not be enqueued, the adapter is in an abnormal
* state, there will be no interrupt to us.
*/
}
/*
* NOTE: We send command only when slots availabe, so should never
* reach here.
*/
}
}
static void
{
/* Serve as many waiting io's as possible */
/*
* Sync FIB io is served before async FIB io so that io requests
* sent by interactive userland commands get responded asap.
*/
break;
}
}
}
static void
{
switch (pkt->pkt_reason) {
case CMD_TIMEOUT:
break;
case CMD_RESET:
/* aac support only RESET_ALL */
}
break;
case CMD_ABORTED:
}
break;
}
}
}
static int
{
/* Allocate FIB dma resource */
if (ddi_dma_alloc_handle(
NULL,
"Cannot alloc dma handle for slot fib area"));
goto error;
}
if (ddi_dma_mem_alloc(
NULL,
&rlen,
"Cannot alloc mem for slot fib area"));
goto error;
}
NULL,
NULL,
&cookie,
&cookien) != DDI_DMA_MAPPED) {
"dma bind failed for slot fib area"));
goto error;
}
return (AACOK);
if (slotp->fib_acc_handle) {
}
if (slotp->fib_dma_handle) {
}
return (AACERR);
}
static void
{
slotp->fib_phyaddr = 0;
}
static int
{
int i;
return (AACERR);
}
for (i = 0; i < softs->aac_max_fibs; i++)
softs->free_io_slot_len = 0;
softs->total_fibs = 0;
return (AACOK);
}
static void
{
softs->total_slots);
softs->total_slots = 0;
}
struct aac_slot *
{
int i;
i = softs->free_io_slot_head;
}
if (slotp)
return (slotp);
}
void
{
int index;
else
}
static int
{
int ret_val;
/*
* When new comm. enabled, large FIBs are used for IO requests.
* Since sync FIB is always 512 bytes, async FIB is used with
* new comm. for poll IO.
*/
return (AACERR);
}
/*
* Interrupt is disabled in panic mode, we have to poll
* the adapter by ourselves.
*/
if (ddi_in_panic()) {
} else {
}
} else {
/* Only copy data of needed length */
}
return (ret_val);
}
/*
* Io requests have to be queued up in q_wait(_sync) to ensure that
* they are executed in order. Out-of-order execution of io requests
* is not allowed.
*/
int
{
/* Async FIB io request enters q_wait */
else
/* Sync FIB io request enters q_wait_sync */
return (retval);
}
static void
{
}
/*
* The following function comes from Adaptec:
*
* When driver sees a particular event that means containers are changed, it
* will rescan containers. However a change may not be complete until some
* other event is received. For example, creating or deleting an array will
* incur as many as six AifEnConfigChange events which would generate six
* container rescans. To diminish rescans, driver set a flag to wait for
* another particular event. When sees that events come in, it will do rescan.
*/
static int
{
struct aac_aif_command *aif;
int cid;
int devcfg_needed;
struct aac_fib_context *ctx;
return (AACERR);
}
devcfg_needed = 0;
case AifCmdDriverNotify:
case AifDenMorphComplete:
break;
}
devcfg_needed = 1;
break;
case AifCmdEventNotify:
case AifEnAddContainer:
case AifEnDeleteContainer:
break;
case AifEnContainerChange:
if (!softs->devcfg_wait_on)
break;
case AifEnContainerEvent:
devcfg_needed = 1;
break;
}
devcfg_needed = 1;
break;
case AifCmdJobProgress:
}
break;
}
if (devcfg_needed)
/* Copy AIF data to AIF queue */
if (next == 0) {
}
/* Modify AIF contexts */
if (softs->aifq_filled) {
}
}
/* Wakeup applications */
}
return (AACOK);
}
static void
aac_daemon(void* arg)
{
int i;
/* Check slot for timeout pkts */
for (i = 0; i < softs->total_slots; i++) {
continue;
continue;
}
/* Slot is being launched */
continue;
}
/* No timeout */
continue;
}
continue;
}
curtime));
softs->timeout_count++;
break;
}
/*
* Besides the firmware in unhealthy state, an overloaded adapter may
* also incur pkt timeout.
* There is a chance for an adapter with a slower IOP to take longer
* than 60 seconds to process the commands, such as when the adapter is
* doing a build on a RAID-5 while being required to perform IOs. So
* longer completion times should be tolerated.
*/
if (softs->timeout_count) {
(void) aac_do_reset(softs);
softs->timeout_count = 0;
}
if ((softs->timeout_id != 0) &&
}
/*
* Architecture dependent functions
*/
static int
{
}
static int
{
}
static void
{
}
static int
{
}
static int
{
}
static void
{
}
/*
* cb_ops functions
*/
static int
{
struct aac_softstate *softs;
int instance;
DBCALLED(1);
return (EINVAL);
if (AAC_IS_SCSA_NODE(minor))
if (instance >= AAC_MAX_ADAPTERS)
return (ENXIO);
return (ENXIO);
return (0);
}
/*ARGSUSED*/
static int
{
int instance;
DBCALLED(1);
return (EINVAL);
if (AAC_IS_SCSA_NODE(minor))
if (instance >= AAC_MAX_ADAPTERS)
return (ENXIO);
return (0);
}
static int
{
struct aac_softstate *softs;
int instance;
DBCALLED(1);
return (EPERM);
if (AAC_IS_SCSA_NODE(minor))
if (instance < AAC_MAX_ADAPTERS) {
}
return (ENXIO);
}
#ifdef AAC_DEBUG
/* -------------------------debug aid functions-------------------------- */
#define AAC_FIB_CMD_KEY_STRINGS \
TestCommandResponse, "TestCommandResponse", \
TestAdapterCommand, "TestAdapterCommand", \
LastTestCommand, "LastTestCommand", \
ReinitHostNormCommandQueue, "ReinitHostNormCommandQueue", \
ReinitHostHighCommandQueue, "ReinitHostHighCommandQueue", \
ReinitHostHighRespQueue, "ReinitHostHighRespQueue", \
ReinitHostNormRespQueue, "ReinitHostNormRespQueue", \
ReinitAdapNormCommandQueue, "ReinitAdapNormCommandQueue", \
ReinitAdapHighCommandQueue, "ReinitAdapHighCommandQueue", \
ReinitAdapHighRespQueue, "ReinitAdapHighRespQueue", \
ReinitAdapNormRespQueue, "ReinitAdapNormRespQueue", \
InterfaceShutdown, "InterfaceShutdown", \
DmaCommandFib, "DmaCommandFib", \
StartProfile, "StartProfile", \
TermProfile, "TermProfile", \
SpeedTest, "SpeedTest", \
TakeABreakPt, "TakeABreakPt", \
RequestPerfData, "RequestPerfData", \
SetInterruptDefTimer, "SetInterruptDefTimer", \
SetInterruptDefCount, "SetInterruptDefCount", \
GetInterruptDefStatus, "GetInterruptDefStatus", \
LastCommCommand, "LastCommCommand", \
NuFileSystem, "NuFileSystem", \
UFS, "UFS", \
HostFileSystem, "HostFileSystem", \
LastFileSystemCommand, "LastFileSystemCommand", \
ContainerCommand, "ContainerCommand", \
ContainerCommand64, "ContainerCommand64", \
ClusterCommand, "ClusterCommand", \
ScsiPortCommand, "ScsiPortCommand", \
ScsiPortCommandU64, "ScsiPortCommandU64", \
AifRequest, "AifRequest", \
CheckRevision, "CheckRevision", \
FsaHostShutdown, "FsaHostShutdown", \
RequestAdapterInfo, "RequestAdapterInfo", \
IsAdapterPaused, "IsAdapterPaused", \
SendHostTime, "SendHostTime", \
LastMiscCommand, "LastMiscCommand"
#define AAC_CTVM_SUBCMD_KEY_STRINGS \
VM_Null, "VM_Null", \
VM_NameServe, "VM_NameServe", \
VM_ContainerConfig, "VM_ContainerConfig", \
VM_Ioctl, "VM_Ioctl", \
VM_FilesystemIoctl, "VM_FilesystemIoctl", \
VM_CloseAll, "VM_CloseAll", \
VM_CtBlockRead, "VM_CtBlockRead", \
VM_CtBlockWrite, "VM_CtBlockWrite", \
VM_SliceBlockRead, "VM_SliceBlockRead", \
VM_SliceBlockWrite, "VM_SliceBlockWrite", \
VM_DriveBlockRead, "VM_DriveBlockRead", \
VM_DriveBlockWrite, "VM_DriveBlockWrite", \
VM_EnclosureMgt, "VM_EnclosureMgt", \
VM_Unused, "VM_Unused", \
VM_CtBlockVerify, "VM_CtBlockVerify", \
VM_CtPerf, "VM_CtPerf", \
VM_CtBlockRead64, "VM_CtBlockRead64", \
VM_CtBlockWrite64, "VM_CtBlockWrite64", \
VM_CtBlockVerify64, "VM_CtBlockVerify64", \
VM_CtHostRead64, "VM_CtHostRead64", \
VM_CtHostWrite64, "VM_CtHostWrite64", \
VM_NameServe64, "VM_NameServe64"
#define AAC_CT_SUBCMD_KEY_STRINGS \
CT_Null, "CT_Null", \
CT_GET_SLICE_COUNT, "CT_GET_SLICE_COUNT", \
CT_GET_PARTITION_COUNT, "CT_GET_PARTITION_COUNT", \
CT_GET_PARTITION_INFO, "CT_GET_PARTITION_INFO", \
CT_GET_CONTAINER_COUNT, "CT_GET_CONTAINER_COUNT", \
CT_GET_CONTAINER_INFO_OLD, "CT_GET_CONTAINER_INFO_OLD", \
CT_WRITE_MBR, "CT_WRITE_MBR", \
CT_WRITE_PARTITION, "CT_WRITE_PARTITION", \
CT_UPDATE_PARTITION, "CT_UPDATE_PARTITION", \
CT_UNLOAD_CONTAINER, "CT_UNLOAD_CONTAINER", \
CT_CONFIG_SINGLE_PRIMARY, "CT_CONFIG_SINGLE_PRIMARY", \
CT_READ_CONFIG_AGE, "CT_READ_CONFIG_AGE", \
CT_WRITE_CONFIG_AGE, "CT_WRITE_CONFIG_AGE", \
CT_READ_SERIAL_NUMBER, "CT_READ_SERIAL_NUMBER", \
CT_ZERO_PAR_ENTRY, "CT_ZERO_PAR_ENTRY", \
CT_READ_MBR, "CT_READ_MBR", \
CT_READ_PARTITION, "CT_READ_PARTITION", \
CT_DESTROY_CONTAINER, "CT_DESTROY_CONTAINER", \
CT_DESTROY2_CONTAINER, "CT_DESTROY2_CONTAINER", \
CT_SLICE_SIZE, "CT_SLICE_SIZE", \
CT_CHECK_CONFLICTS, "CT_CHECK_CONFLICTS", \
CT_MOVE_CONTAINER, "CT_MOVE_CONTAINER", \
CT_READ_LAST_DRIVE, "CT_READ_LAST_DRIVE", \
CT_WRITE_LAST_DRIVE, "CT_WRITE_LAST_DRIVE", \
CT_UNMIRROR, "CT_UNMIRROR", \
CT_MIRROR_DELAY, "CT_MIRROR_DELAY", \
CT_GEN_MIRROR, "CT_GEN_MIRROR", \
CT_GEN_MIRROR2, "CT_GEN_MIRROR2", \
CT_TEST_CONTAINER, "CT_TEST_CONTAINER", \
CT_MOVE2, "CT_MOVE2", \
CT_SPLIT, "CT_SPLIT", \
CT_SPLIT2, "CT_SPLIT2", \
CT_SPLIT_BROKEN, "CT_SPLIT_BROKEN", \
CT_SPLIT_BROKEN2, "CT_SPLIT_BROKEN2", \
CT_RECONFIG, "CT_RECONFIG", \
CT_BREAK2, "CT_BREAK2", \
CT_BREAK, "CT_BREAK", \
CT_MERGE2, "CT_MERGE2", \
CT_MERGE, "CT_MERGE", \
CT_FORCE_ERROR, "CT_FORCE_ERROR", \
CT_CLEAR_ERROR, "CT_CLEAR_ERROR", \
CT_ASSIGN_FAILOVER, "CT_ASSIGN_FAILOVER", \
CT_CLEAR_FAILOVER, "CT_CLEAR_FAILOVER", \
CT_GET_FAILOVER_DATA, "CT_GET_FAILOVER_DATA", \
CT_VOLUME_ADD, "CT_VOLUME_ADD", \
CT_VOLUME_ADD2, "CT_VOLUME_ADD2", \
CT_MIRROR_STATUS, "CT_MIRROR_STATUS", \
CT_COPY_STATUS, "CT_COPY_STATUS", \
CT_COPY, "CT_COPY", \
CT_UNLOCK_CONTAINER, "CT_UNLOCK_CONTAINER", \
CT_LOCK_CONTAINER, "CT_LOCK_CONTAINER", \
CT_MAKE_READ_ONLY, "CT_MAKE_READ_ONLY", \
CT_MAKE_READ_WRITE, "CT_MAKE_READ_WRITE", \
CT_CLEAN_DEAD, "CT_CLEAN_DEAD", \
CT_ABORT_MIRROR_COMMAND, "CT_ABORT_MIRROR_COMMAND", \
CT_SET, "CT_SET", \
CT_GET, "CT_GET", \
CT_GET_NVLOG_ENTRY, "CT_GET_NVLOG_ENTRY", \
CT_GET_DELAY, "CT_GET_DELAY", \
CT_ZERO_CONTAINER_SPACE, "CT_ZERO_CONTAINER_SPACE", \
CT_GET_ZERO_STATUS, "CT_GET_ZERO_STATUS", \
CT_SCRUB, "CT_SCRUB", \
CT_GET_SCRUB_STATUS, "CT_GET_SCRUB_STATUS", \
CT_GET_SLICE_INFO, "CT_GET_SLICE_INFO", \
CT_GET_SCSI_METHOD, "CT_GET_SCSI_METHOD", \
CT_PAUSE_IO, "CT_PAUSE_IO", \
CT_RELEASE_IO, "CT_RELEASE_IO", \
CT_SCRUB2, "CT_SCRUB2", \
CT_MCHECK, "CT_MCHECK", \
CT_CORRUPT, "CT_CORRUPT", \
CT_GET_TASK_COUNT, "CT_GET_TASK_COUNT", \
CT_PROMOTE, "CT_PROMOTE", \
CT_SET_DEAD, "CT_SET_DEAD", \
CT_CONTAINER_OPTIONS, "CT_CONTAINER_OPTIONS", \
CT_GET_NV_PARAM, "CT_GET_NV_PARAM", \
CT_GET_PARAM, "CT_GET_PARAM", \
CT_NV_PARAM_SIZE, "CT_NV_PARAM_SIZE", \
CT_COMMON_PARAM_SIZE, "CT_COMMON_PARAM_SIZE", \
CT_PLATFORM_PARAM_SIZE, "CT_PLATFORM_PARAM_SIZE", \
CT_SET_NV_PARAM, "CT_SET_NV_PARAM", \
CT_ABORT_SCRUB, "CT_ABORT_SCRUB", \
CT_GET_SCRUB_ERROR, "CT_GET_SCRUB_ERROR", \
CT_LABEL_CONTAINER, "CT_LABEL_CONTAINER", \
CT_CONTINUE_DATA, "CT_CONTINUE_DATA", \
CT_STOP_DATA, "CT_STOP_DATA", \
CT_GET_PARTITION_TABLE, "CT_GET_PARTITION_TABLE", \
CT_GET_DISK_PARTITIONS, "CT_GET_DISK_PARTITIONS", \
CT_GET_MISC_STATUS, "CT_GET_MISC_STATUS", \
CT_GET_CONTAINER_PERF_INFO, "CT_GET_CONTAINER_PERF_INFO", \
CT_GET_TIME, "CT_GET_TIME", \
CT_READ_DATA, "CT_READ_DATA", \
CT_CTR, "CT_CTR", \
CT_CTL, "CT_CTL", \
CT_DRAINIO, "CT_DRAINIO", \
CT_RELEASEIO, "CT_RELEASEIO", \
CT_GET_NVRAM, "CT_GET_NVRAM", \
CT_GET_MEMORY, "CT_GET_MEMORY", \
CT_PRINT_CT_LOG, "CT_PRINT_CT_LOG", \
CT_ADD_LEVEL, "CT_ADD_LEVEL", \
CT_NV_ZERO, "CT_NV_ZERO", \
CT_READ_SIGNATURE, "CT_READ_SIGNATURE", \
CT_THROTTLE_ON, "CT_THROTTLE_ON", \
CT_THROTTLE_OFF, "CT_THROTTLE_OFF", \
CT_GET_THROTTLE_STATS, "CT_GET_THROTTLE_STATS", \
CT_MAKE_SNAPSHOT, "CT_MAKE_SNAPSHOT", \
CT_REMOVE_SNAPSHOT, "CT_REMOVE_SNAPSHOT", \
CT_WRITE_USER_FLAGS, "CT_WRITE_USER_FLAGS", \
CT_READ_USER_FLAGS, "CT_READ_USER_FLAGS", \
CT_MONITOR, "CT_MONITOR", \
CT_GEN_MORPH, "CT_GEN_MORPH", \
CT_GET_SNAPSHOT_INFO, "CT_GET_SNAPSHOT_INFO", \
CT_CACHE_SET, "CT_CACHE_SET", \
CT_CACHE_STAT, "CT_CACHE_STAT", \
CT_TRACE_START, "CT_TRACE_START", \
CT_TRACE_STOP, "CT_TRACE_STOP", \
CT_TRACE_ENABLE, "CT_TRACE_ENABLE", \
CT_TRACE_DISABLE, "CT_TRACE_DISABLE", \
CT_FORCE_CORE_DUMP, "CT_FORCE_CORE_DUMP", \
CT_SET_SERIAL_NUMBER, "CT_SET_SERIAL_NUMBER", \
CT_RESET_SERIAL_NUMBER, "CT_RESET_SERIAL_NUMBER", \
CT_ENABLE_RAID5, "CT_ENABLE_RAID5", \
CT_CLEAR_VALID_DUMP_FLAG, "CT_CLEAR_VALID_DUMP_FLAG", \
CT_GET_MEM_STATS, "CT_GET_MEM_STATS", \
CT_GET_CORE_SIZE, "CT_GET_CORE_SIZE", \
CT_CREATE_CONTAINER_OLD, "CT_CREATE_CONTAINER_OLD", \
CT_STOP_DUMPS, "CT_STOP_DUMPS", \
CT_PANIC_ON_TAKE_A_BREAK, "CT_PANIC_ON_TAKE_A_BREAK", \
CT_GET_CACHE_STATS, "CT_GET_CACHE_STATS", \
CT_MOVE_PARTITION, "CT_MOVE_PARTITION", \
CT_FLUSH_CACHE, "CT_FLUSH_CACHE", \
CT_READ_NAME, "CT_READ_NAME", \
CT_WRITE_NAME, "CT_WRITE_NAME", \
CT_TOSS_CACHE, "CT_TOSS_CACHE", \
CT_LOCK_DRAINIO, "CT_LOCK_DRAINIO", \
CT_CONTAINER_OFFLINE, "CT_CONTAINER_OFFLINE", \
CT_SET_CACHE_SIZE, "CT_SET_CACHE_SIZE", \
CT_CLEAN_SHUTDOWN_STATUS, "CT_CLEAN_SHUTDOWN_STATUS", \
CT_CLEAR_DISKLOG_ON_DISK, "CT_CLEAR_DISKLOG_ON_DISK", \
CT_CLEAR_ALL_DISKLOG, "CT_CLEAR_ALL_DISKLOG", \
CT_CACHE_FAVOR, "CT_CACHE_FAVOR", \
CT_READ_PASSTHRU_MBR, "CT_READ_PASSTHRU_MBR", \
CT_SCRUB_NOFIX, "CT_SCRUB_NOFIX", \
CT_SCRUB2_NOFIX, "CT_SCRUB2_NOFIX", \
CT_FLUSH, "CT_FLUSH", \
CT_REBUILD, "CT_REBUILD", \
CT_FLUSH_CONTAINER, "CT_FLUSH_CONTAINER", \
CT_RESTART, "CT_RESTART", \
CT_GET_CONFIG_STATUS, "CT_GET_CONFIG_STATUS", \
CT_TRACE_FLAG, "CT_TRACE_FLAG", \
CT_RESTART_MORPH, "CT_RESTART_MORPH", \
CT_GET_TRACE_INFO, "CT_GET_TRACE_INFO", \
CT_GET_TRACE_ITEM, "CT_GET_TRACE_ITEM", \
CT_COMMIT_CONFIG, "CT_COMMIT_CONFIG", \
CT_CONTAINER_EXISTS, "CT_CONTAINER_EXISTS", \
CT_GET_SLICE_FROM_DEVT, "CT_GET_SLICE_FROM_DEVT", \
CT_OPEN_READ_WRITE, "CT_OPEN_READ_WRITE", \
CT_WRITE_MEMORY_BLOCK, "CT_WRITE_MEMORY_BLOCK", \
CT_GET_CACHE_PARAMS, "CT_GET_CACHE_PARAMS", \
CT_CRAZY_CACHE, "CT_CRAZY_CACHE", \
CT_GET_PROFILE_STRUCT, "CT_GET_PROFILE_STRUCT", \
CT_SET_IO_TRACE_FLAG, "CT_SET_IO_TRACE_FLAG", \
CT_GET_IO_TRACE_STRUCT, "CT_GET_IO_TRACE_STRUCT", \
CT_CID_TO_64BITS_UID, "CT_CID_TO_64BITS_UID", \
CT_64BITS_UID_TO_CID, "CT_64BITS_UID_TO_CID", \
CT_PAR_TO_64BITS_UID, "CT_PAR_TO_64BITS_UID", \
CT_CID_TO_32BITS_UID, "CT_CID_TO_32BITS_UID", \
CT_32BITS_UID_TO_CID, "CT_32BITS_UID_TO_CID", \
CT_PAR_TO_32BITS_UID, "CT_PAR_TO_32BITS_UID", \
CT_SET_FAILOVER_OPTION, "CT_SET_FAILOVER_OPTION", \
CT_GET_FAILOVER_OPTION, "CT_GET_FAILOVER_OPTION", \
CT_STRIPE_ADD2, "CT_STRIPE_ADD2", \
CT_CREATE_VOLUME_SET, "CT_CREATE_VOLUME_SET", \
CT_CREATE_STRIPE_SET, "CT_CREATE_STRIPE_SET", \
CT_VERIFY_CONTAINER, "CT_VERIFY_CONTAINER", \
CT_IS_CONTAINER_DEAD, "CT_IS_CONTAINER_DEAD", \
CT_GET_CONTAINER_OPTION, "CT_GET_CONTAINER_OPTION", \
CT_GET_SNAPSHOT_UNUSED_STRUCT, "CT_GET_SNAPSHOT_UNUSED_STRUCT", \
CT_CLEAR_SNAPSHOT_UNUSED_STRUCT, "CT_CLEAR_SNAPSHOT_UNUSED_STRUCT", \
CT_GET_CONTAINER_INFO, "CT_GET_CONTAINER_INFO", \
CT_CREATE_CONTAINER, "CT_CREATE_CONTAINER", \
CT_CHANGE_CREATIONINFO, "CT_CHANGE_CREATIONINFO", \
CT_CHECK_CONFLICT_UID, "CT_CHECK_CONFLICT_UID", \
CT_CONTAINER_UID_CHECK, "CT_CONTAINER_UID_CHECK", \
"CT_IS_CONTAINER_MEATADATA_STANDARD", \
CT_IS_SLICE_METADATA_STANDARD, "CT_IS_SLICE_METADATA_STANDARD", \
CT_GET_IMPORT_COUNT, "CT_GET_IMPORT_COUNT", \
CT_CANCEL_ALL_IMPORTS, "CT_CANCEL_ALL_IMPORTS", \
CT_GET_IMPORT_INFO, "CT_GET_IMPORT_INFO", \
CT_IMPORT_ARRAY, "CT_IMPORT_ARRAY", \
CT_GET_LOG_SIZE, "CT_GET_LOG_SIZE", \
CT_ALARM_GET_STATE, "CT_ALARM_GET_STATE", \
CT_ALARM_SET_STATE, "CT_ALARM_SET_STATE", \
CT_ALARM_ON_OFF, "CT_ALARM_ON_OFF", \
CT_GET_EE_OEM_ID, "CT_GET_EE_OEM_ID", \
CT_GET_PPI_HEADERS, "CT_GET_PPI_HEADERS", \
CT_GET_PPI_DATA, "CT_GET_PPI_DATA", \
CT_GET_PPI_ENTRIES, "CT_GET_PPI_ENTRIES", \
CT_DELETE_PPI_BUNDLE, "CT_DELETE_PPI_BUNDLE", \
CT_GET_PARTITION_TABLE_2, "CT_GET_PARTITION_TABLE_2", \
CT_GET_PARTITION_INFO_2, "CT_GET_PARTITION_INFO_2", \
CT_GET_DISK_PARTITIONS_2, "CT_GET_DISK_PARTITIONS_2", \
CT_QUIESCE_ADAPTER, "CT_QUIESCE_ADAPTER", \
CT_CLEAR_PPI_TABLE, "CT_CLEAR_PPI_TABLE"
#define AAC_CL_SUBCMD_KEY_STRINGS \
CL_NULL, "CL_NULL", \
DS_INIT, "DS_INIT", \
DS_RESCAN, "DS_RESCAN", \
DS_CREATE, "DS_CREATE", \
DS_DELETE, "DS_DELETE", \
DS_ADD_DISK, "DS_ADD_DISK", \
DS_REMOVE_DISK, "DS_REMOVE_DISK", \
DS_MOVE_DISK, "DS_MOVE_DISK", \
DS_TAKE_OWNERSHIP, "DS_TAKE_OWNERSHIP", \
DS_RELEASE_OWNERSHIP, "DS_RELEASE_OWNERSHIP", \
DS_FORCE_OWNERSHIP, "DS_FORCE_OWNERSHIP", \
DS_GET_DISK_SET_PARAM, "DS_GET_DISK_SET_PARAM", \
DS_GET_DRIVE_PARAM, "DS_GET_DRIVE_PARAM", \
DS_GET_SLICE_PARAM, "DS_GET_SLICE_PARAM", \
DS_GET_DISK_SETS, "DS_GET_DISK_SETS", \
DS_GET_DRIVES, "DS_GET_DRIVES", \
DS_SET_DISK_SET_PARAM, "DS_SET_DISK_SET_PARAM", \
DS_ONLINE, "DS_ONLINE", \
DS_OFFLINE, "DS_OFFLINE", \
DS_ONLINE_CONTAINERS, "DS_ONLINE_CONTAINERS", \
DS_FSAPRINT, "DS_FSAPRINT", \
CL_CFG_SET_HOST_IDS, "CL_CFG_SET_HOST_IDS", \
CL_CFG_SET_PARTNER_HOST_IDS, "CL_CFG_SET_PARTNER_HOST_IDS", \
CL_CFG_GET_CLUSTER_CONFIG, "CL_CFG_GET_CLUSTER_CONFIG", \
CC_CLI_CLEAR_MESSAGE_BUFFER, "CC_CLI_CLEAR_MESSAGE_BUFFER", \
CC_SRV_CLEAR_MESSAGE_BUFFER, "CC_SRV_CLEAR_MESSAGE_BUFFER", \
CC_CLI_SHOW_MESSAGE_BUFFER, "CC_CLI_SHOW_MESSAGE_BUFFER", \
CC_SRV_SHOW_MESSAGE_BUFFER, "CC_SRV_SHOW_MESSAGE_BUFFER", \
CC_CLI_SEND_MESSAGE, "CC_CLI_SEND_MESSAGE", \
CC_SRV_SEND_MESSAGE, "CC_SRV_SEND_MESSAGE", \
CC_CLI_GET_MESSAGE, "CC_CLI_GET_MESSAGE", \
CC_SRV_GET_MESSAGE, "CC_SRV_GET_MESSAGE", \
CC_SEND_TEST_MESSAGE, "CC_SEND_TEST_MESSAGE", \
CC_GET_BUSINFO, "CC_GET_BUSINFO", \
CC_GET_PORTINFO, "CC_GET_PORTINFO", \
CC_GET_NAMEINFO, "CC_GET_NAMEINFO", \
CC_GET_CONFIGINFO, "CC_GET_CONFIGINFO", \
CQ_QUORUM_OP, "CQ_QUORUM_OP"
#define AAC_AIF_SUBCMD_KEY_STRINGS \
AifCmdEventNotify, "AifCmdEventNotify", \
AifCmdJobProgress, "AifCmdJobProgress", \
AifCmdAPIReport, "AifCmdAPIReport", \
AifCmdDriverNotify, "AifCmdDriverNotify", \
AifReqJobList, "AifReqJobList", \
AifReqJobsForCtr, "AifReqJobsForCtr", \
AifReqJobsForScsi, "AifReqJobsForScsi", \
AifReqJobReport, "AifReqJobReport", \
AifReqTerminateJob, "AifReqTerminateJob", \
AifReqSuspendJob, "AifReqSuspendJob", \
AifReqResumeJob, "AifReqResumeJob", \
AifReqSendAPIReport, "AifReqSendAPIReport", \
AifReqAPIJobStart, "AifReqAPIJobStart", \
AifReqAPIJobUpdate, "AifReqAPIJobUpdate", \
AifReqAPIJobFinish, "AifReqAPIJobFinish"
#define AAC_IOCTL_SUBCMD_KEY_STRINGS \
Reserved_IOCTL, "Reserved_IOCTL", \
GetDeviceHandle, "GetDeviceHandle", \
BusTargetLun_to_DeviceHandle, "BusTargetLun_to_DeviceHandle", \
DeviceHandle_to_BusTargetLun, "DeviceHandle_to_BusTargetLun", \
RescanBus, "RescanBus", \
GetDeviceProbeInfo, "GetDeviceProbeInfo", \
GetDeviceCapacity, "GetDeviceCapacity", \
GetContainerProbeInfo, "GetContainerProbeInfo", \
GetRequestedMemorySize, "GetRequestedMemorySize", \
GetBusInfo, "GetBusInfo", \
GetVendorSpecific, "GetVendorSpecific", \
EnhancedGetDeviceProbeInfo, "EnhancedGetDeviceProbeInfo", \
EnhancedGetBusInfo, "EnhancedGetBusInfo", \
SetupExtendedCounters, "SetupExtendedCounters", \
GetPerformanceCounters, "GetPerformanceCounters", \
ResetPerformanceCounters, "ResetPerformanceCounters", \
ReadModePage, "ReadModePage", \
WriteModePage, "WriteModePage", \
ReadDriveParameter, "ReadDriveParameter", \
WriteDriveParameter, "WriteDriveParameter", \
ResetAdapter, "ResetAdapter", \
ResetBus, "ResetBus", \
ResetBusDevice, "ResetBusDevice", \
ExecuteSrb, "ExecuteSrb", \
Create_IO_Task, "Create_IO_Task", \
Delete_IO_Task, "Delete_IO_Task", \
Get_IO_Task_Info, "Get_IO_Task_Info", \
Check_Task_Progress, "Check_Task_Progress", \
InjectError, "InjectError", \
GetDeviceDefectCounts, "GetDeviceDefectCounts", \
GetDeviceDefectInfo, "GetDeviceDefectInfo", \
GetDeviceStatus, "GetDeviceStatus", \
ClearDeviceStatus, "ClearDeviceStatus", \
DiskSpinControl, "DiskSpinControl", \
DiskSmartControl, "DiskSmartControl", \
WriteSame, "WriteSame", \
ReadWriteLong, "ReadWriteLong", \
FormatUnit, "FormatUnit", \
TargetDeviceControl, "TargetDeviceControl", \
TargetChannelControl, "TargetChannelControl", \
FlashNewCode, "FlashNewCode", \
DiskCheck, "DiskCheck", \
RequestSense, "RequestSense", \
DiskPERControl, "DiskPERControl", \
Read10, "Read10", \
Write10, "Write10"
#define AAC_AIFEN_KEY_STRINGS \
AifEnGeneric, "Generic", \
AifEnTaskComplete, "TaskComplete", \
AifEnConfigChange, "Config change", \
AifEnContainerChange, "Container change", \
AifEnDeviceFailure, "device failed", \
AifEnMirrorFailover, "Mirror failover", \
AifEnContainerEvent, "container event", \
AifEnFileSystemChange, "File system changed", \
AifEnConfigPause, "Container pause event", \
AifEnConfigResume, "Container resume event", \
AifEnFailoverChange, "Failover space assignment changed", \
AifEnRAID5RebuildDone, "RAID5 rebuild finished", \
AifEnEnclosureManagement, "Enclosure management event", \
AifEnBatteryEvent, "battery event", \
AifEnAddContainer, "Add container", \
AifEnDeleteContainer, "Delete container", \
AifEnSMARTEvent, "SMART Event", \
AifEnBatteryNeedsRecond, "battery needs reconditioning", \
AifEnClusterEvent, "cluster event", \
AifEnDiskSetEvent, "disk set event occured", \
AifDenMorphComplete, "morph operation completed", \
AifDenVolumeExtendComplete, "VolumeExtendComplete"
struct aac_key_strings {
int key;
char *message;
};
extern struct scsi_key_strings scsi_cmds[];
static struct aac_key_strings aac_fib_cmds[] = {
-1, NULL
};
static struct aac_key_strings aac_ctvm_subcmds[] = {
-1, NULL
};
static struct aac_key_strings aac_ct_subcmds[] = {
-1, NULL
};
static struct aac_key_strings aac_cl_subcmds[] = {
-1, NULL
};
static struct aac_key_strings aac_aif_subcmds[] = {
-1, NULL
};
static struct aac_key_strings aac_ioctl_subcmds[] = {
-1, NULL
};
static struct aac_key_strings aac_aifens[] = {
-1, NULL
};
/*
* Translate command number to description string
*/
static char *
{
int i;
}
return (NULL);
}
static void
{
char *desc;
return;
}
switch (cmd) {
case SCMD_READ:
case SCMD_WRITE:
"poll" : "intr");
break;
case SCMD_READ_G1:
case SCMD_WRITE_G1:
"poll" : "intr");
break;
case SCMD_READ_G4:
case SCMD_WRITE_G4:
"poll" : "intr");
break;
default:
}
}
void
{
struct aac_Container *pContainer;
sub_cmd = -1;
switch (fib_cmd) {
case ContainerCommand:
break;
sub_cmd = -1;
switch (pContainer->Command) {
case VM_ContainerConfig:
break;
return;
case VM_Ioctl:
break;
}
break;
case ClusterCommand:
break;
case AifRequest:
break;
default:
break;
}
if (subcmdstr)
else if (cmdstr)
else
}
static void
{
char *str;
case AifCmdEventNotify:
if (str)
else
break;
case AifCmdJobProgress:
case AifJobStsSuccess:
str = "success"; break;
case AifJobStsFinished:
str = "finished"; break;
case AifJobStsAborted:
str = "aborted"; break;
case AifJobStsFailed:
str = "failed"; break;
case AifJobStsSuspended:
str = "suspended"; break;
case AifJobStsRunning:
str = "running"; break;
default:
str = "unknown"; break;
}
break;
case AifCmdAPIReport:
break;
case AifCmdDriverNotify:
break;
default:
break;
}
}
#endif