/*
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_MPI_H
#define _SYS_MPI_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* This header file is based on Version 1.2 of the MPT
* Specification by LSI Logic, Inc.
*/
/*
* MPI Version Definitions
*/
#define MPI_VERSION_MINOR_SHIFT (0)
#define MPI_HEADER_VERSION_DEV_SHIFT (0)
/* Note: The major versions of 0xe0 through 0xff are reserved */
/*
* IOC State Definitions
*/
/*
* Fault state codes (product independent range 0x8000-0xFFFF)
*/
/*
* System Doorbell
*/
/*
* PCI System Interface Registers
*/
/*
* Message Frame Descriptors
*/
/*
* Context Reply macros
*/
#define MPI_GET_CONTEXT_REPLY_TYPE(x) \
(((x) & MPI_CONTEXT_REPLY_TYPE_MASK) \
((x) = ((x) & ~MPI_CONTEXT_REPLY_TYPE_MASK) | \
(((typ) << MPI_CONTEXT_REPLY_TYPE_SHIFT) & \
/*
* Message Functions
* 0x80 -> 0x8F reserved for private message use per product
*/
/*
* Version format
*/
typedef struct mpi_version_struct {
typedef union mpi_version_format {
/*
* Scatter Gather Elements
*/
/*
* Simple element structures
*/
typedef struct sge_simple32 {
typedef struct sge_simple64 {
typedef struct sge_simple_union {
union {
} u1;
/*
* Chain element structures
*/
typedef struct sge_chain32 {
typedef struct sge_chain64 {
typedef struct sge_chain_union {
union {
} u1;
/*
* Transaction Context element
*/
typedef struct sge_transaction32 {
typedef struct sge_transaction64 {
typedef struct sge_transaction96 {
typedef struct sge_transaction128 {
typedef struct sge_transaction_union {
union {
} u1;
/*
* SGE IO types union for IO SGL's
*/
typedef struct sge_io_union {
union {
} u1;
/*
* SGE union for SGL's with Simple and Transaction elements
*/
typedef struct sge_trans_simple_union {
union {
} u1;
/*
* All SGE types union
*/
typedef struct sge_mpi_union {
union {
} u1;
/*
* SGE field definition and masks
*/
/*
* Flags field bit definitions
*/
/*
* Element Type
*/
/*
* Address location
*/
/*
* Direction
*/
/*
* Address Size
*/
/*
* Context Size
*/
/*
* SGE operation Macros
*/
/*
* SIMPLE FlagsLength manipulations...
*/
#define MPI_SGE_SET_FLAGS_LENGTH(f, l) \
(MPI_SGE_SET_FLAGS(f) | MPI_SGE_LENGTH(l))
/*
* CAUTION - The following are READ-MODIFY-WRITE!
*/
#define MPI_GET_CHAIN_OFFSET(x) \
/*
* Standard Message Structures
*/
/*
* Standard message request header for all request messages
*/
typedef struct msg_request_header {
/*
* Default Reply
*/
typedef struct msg_default_reply {
/*
* MsgFlags definition for all replies
*/
/*
* IOC Status Values
*/
/*
* Common IOCStatus values for all replies
*/
/*
* Config IOCStatus values
*/
/*
* SCSIIO Reply (SPI & FCP) initiator values
*/
/*
*/
/*
* SCSI (SPI & FCP) target values
*/
/*
* Additional FCP target values
*/
/*
* Fibre Channel Direct Access values
*/
/*
* LAN values
*/
/*
* SAS values
*/
/*
* Inband values
*/
/*
* Diagnostic Tools values
*/
/*
* IOCStatus flag to indicate that log info is available
*/
/*
* LogInfo Types
*/
/*
* SMP passthrough messages
*/
typedef struct msg_smp_passthrough {
/* SMP passthrough Reply */
typedef struct msg_smp_passthrough_reply {
#define MPI_SASSTATUS_SUCCESS 0
#ifdef __cplusplus
}
#endif
#endif /* _SYS_MPI_H */