xref: /onnv-gate/usr/src/uts/common/sys/mpt/mpi.h (revision 5754:669f42f80bce)
10Sstevel@tonic-gate /*
2*5754Sjw149990  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
30Sstevel@tonic-gate  * Use is subject to license terms.
40Sstevel@tonic-gate  */
50Sstevel@tonic-gate 
60Sstevel@tonic-gate #ifndef _SYS_MPI_H
70Sstevel@tonic-gate #define	_SYS_MPI_H
80Sstevel@tonic-gate 
90Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
100Sstevel@tonic-gate 
110Sstevel@tonic-gate #ifdef	__cplusplus
120Sstevel@tonic-gate extern "C" {
130Sstevel@tonic-gate #endif
140Sstevel@tonic-gate 
150Sstevel@tonic-gate /*
160Sstevel@tonic-gate  * This header file is based on Version 1.2 of the MPT
170Sstevel@tonic-gate  * Specification by LSI Logic, Inc.
180Sstevel@tonic-gate  */
190Sstevel@tonic-gate 
200Sstevel@tonic-gate /*
210Sstevel@tonic-gate  *  MPI Version Definitions
220Sstevel@tonic-gate  */
230Sstevel@tonic-gate #define	MPI_VERSION_MAJOR	(0x01)
240Sstevel@tonic-gate #define	MPI_VERSION_MINOR	(0x05)
250Sstevel@tonic-gate #define	MPI_VERSION_MAJOR_MASK	(0xFF00)
260Sstevel@tonic-gate #define	MPI_VERSION_MAJOR_SHIFT	(8)
270Sstevel@tonic-gate #define	MPI_VERSION_MINOR_MASK	(0x00FF)
280Sstevel@tonic-gate #define	MPI_VERSION_MINOR_SHIFT	(0)
290Sstevel@tonic-gate #define	MPI_VERSION	((MPI_VERSION_MAJOR << MPI_VERSION_MAJOR_SHIFT) |   \
300Sstevel@tonic-gate 	MPI_VERSION_MINOR)
310Sstevel@tonic-gate 
320Sstevel@tonic-gate #define	MPI_HEADER_VERSION_UNIT	(0x00)
330Sstevel@tonic-gate #define	MPI_HEADER_VERSION_DEV	(0x00)
340Sstevel@tonic-gate #define	MPI_HEADER_VERSION_UNIT_MASK	(0xFF00)
350Sstevel@tonic-gate #define	MPI_HEADER_VERSION_UNIT_SHIFT	(8)
360Sstevel@tonic-gate #define	MPI_HEADER_VERSION_DEV_MASK	(0x00FF)
370Sstevel@tonic-gate #define	MPI_HEADER_VERSION_DEV_SHIFT	(0)
380Sstevel@tonic-gate #define	MPI_HEADER_VERSION ((MPI_HEADER_VERSION_UNIT << 8) |  \
390Sstevel@tonic-gate 	MPI_HEADER_VERSION_DEV)
400Sstevel@tonic-gate /* Note: The major versions of 0xe0 through 0xff are reserved */
410Sstevel@tonic-gate 
420Sstevel@tonic-gate /*
430Sstevel@tonic-gate  * IOC State Definitions
440Sstevel@tonic-gate  */
450Sstevel@tonic-gate #define	MPI_IOC_STATE_RESET			0x00000000
460Sstevel@tonic-gate #define	MPI_IOC_STATE_READY			0x10000000
470Sstevel@tonic-gate #define	MPI_IOC_STATE_OPERATIONAL		0x20000000
480Sstevel@tonic-gate #define	MPI_IOC_STATE_FAULT			0x40000000
490Sstevel@tonic-gate 
500Sstevel@tonic-gate #define	MPI_IOC_STATE_MASK			0xF0000000
510Sstevel@tonic-gate #define	MPI_IOC_STATE_SHIFT			28
520Sstevel@tonic-gate 
530Sstevel@tonic-gate /*
540Sstevel@tonic-gate  * Fault state codes (product independent range 0x8000-0xFFFF)
550Sstevel@tonic-gate  */
560Sstevel@tonic-gate #define	MPI_FAULT_REQUEST_MESSAGE_PCI_PARITY_ERROR	0x8111
570Sstevel@tonic-gate #define	MPI_FAULT_REQUEST_MESSAGE_PCI_BUS_FAULT		0x8112
580Sstevel@tonic-gate #define	MPI_FAULT_REPLY_MESSAGE_PCI_PARITY_ERROR	0x8113
590Sstevel@tonic-gate #define	MPI_FAULT_REPLY_MESSAGE_PCI_BUS_FAULT		0x8114
600Sstevel@tonic-gate #define	MPI_FAULT_DATA_SEND_PCI_PARITY_ERROR		0x8115
610Sstevel@tonic-gate #define	MPI_FAULT_DATA_SEND_PCI_BUS_FAULT		0x8116
620Sstevel@tonic-gate #define	MPI_FAULT_DATA_RECEIVE_PCI_PARITY_ERROR		0x8117
630Sstevel@tonic-gate #define	MPI_FAULT_DATA_RECEIVE_PCI_BUS_FAULT		0x8118
640Sstevel@tonic-gate 
650Sstevel@tonic-gate 
660Sstevel@tonic-gate /*
670Sstevel@tonic-gate  * System Doorbell
680Sstevel@tonic-gate  */
690Sstevel@tonic-gate #define	MPI_DOORBELL_OFFSET			0x00000000
700Sstevel@tonic-gate #define	MPI_DOORBELL_ACTIVE			0x08000000
710Sstevel@tonic-gate #define	MPI_DOORBELL_USED			MPI_DOORBELL_ACTIVE
720Sstevel@tonic-gate #define	MPI_DOORBELL_ACTIVE_SHIFT		27
730Sstevel@tonic-gate #define	MPI_DOORBELL_WHO_INIT_MASK		0x07000000
740Sstevel@tonic-gate #define	MPI_DOORBELL_WHO_INIT_SHIFT		24
750Sstevel@tonic-gate #define	MPI_DOORBELL_FUNCTION_MASK		0xFF000000
760Sstevel@tonic-gate #define	MPI_DOORBELL_FUNCTION_SHIFT		24
770Sstevel@tonic-gate #define	MPI_DOORBELL_ADD_DWORDS_MASK		0x00FF0000
780Sstevel@tonic-gate #define	MPI_DOORBELL_ADD_DWORDS_SHIFT		16
790Sstevel@tonic-gate #define	MPI_DOORBELL_DATA_MASK			0x0000FFFF
800Sstevel@tonic-gate 
810Sstevel@tonic-gate 
820Sstevel@tonic-gate /*
830Sstevel@tonic-gate  * PCI System Interface Registers
840Sstevel@tonic-gate  */
850Sstevel@tonic-gate #define	MPI_WRITE_SEQUENCE_OFFSET		0x00000004
860Sstevel@tonic-gate #define	MPI_WRSEQ_KEY_VALUE_MASK		0x0000000F
870Sstevel@tonic-gate #define	MPI_WRSEQ_1ST_KEY_VALUE			0x04
880Sstevel@tonic-gate #define	MPI_WRSEQ_2ND_KEY_VALUE			0x0B
890Sstevel@tonic-gate #define	MPI_WRSEQ_3RD_KEY_VALUE			0x02
900Sstevel@tonic-gate #define	MPI_WRSEQ_4TH_KEY_VALUE			0x07
910Sstevel@tonic-gate #define	MPI_WRSEQ_5TH_KEY_VALUE			0x0D
920Sstevel@tonic-gate 
930Sstevel@tonic-gate #define	MPI_DIAGNOSTIC_OFFSET			0x00000008
940Sstevel@tonic-gate #define	MPI_DIAG_CLEAR_FLASH_BAD_SIG		0x00000400
950Sstevel@tonic-gate #define	MPI_DIAG_PREVENT_IOC_BOOT		0x00000200
960Sstevel@tonic-gate #define	MPI_DIAG_DRWE				0x00000080
970Sstevel@tonic-gate #define	MPI_DIAG_FLASH_BAD_SIG			0x00000040
980Sstevel@tonic-gate #define	MPI_DIAG_RESET_HISTORY			0x00000020
990Sstevel@tonic-gate #define	MPI_DIAG_RW_ENABLE			0x00000010
1000Sstevel@tonic-gate #define	MPI_DIAG_RESET_ADAPTER			0x00000004
1010Sstevel@tonic-gate #define	MPI_DIAG_DISABLE_ARM			0x00000002
1020Sstevel@tonic-gate #define	MPI_DIAG_MEM_ENABLE			0x00000001
1030Sstevel@tonic-gate 
1040Sstevel@tonic-gate #define	MPI_TEST_BASE_ADDRESS_OFFSET		0x0000000C
1050Sstevel@tonic-gate 
1060Sstevel@tonic-gate #define	MPI_DIAG_RW_DATA_OFFSET			0x00000010
1070Sstevel@tonic-gate 
1080Sstevel@tonic-gate #define	MPI_DIAG_RW_ADDRESS_OFFSET		0x00000014
1090Sstevel@tonic-gate 
1100Sstevel@tonic-gate #define	MPI_HOST_INTERRUPT_STATUS_OFFSET	0x00000030
1110Sstevel@tonic-gate #define	MPI_HIS_IOP_DOORBELL_STATUS		0x80000000
1120Sstevel@tonic-gate #define	MPI_HIS_REPLY_MESSAGE_INTERRUPT		0x00000008
1130Sstevel@tonic-gate #define	MPI_HIS_DOORBELL_INTERRUPT		0x00000001
1140Sstevel@tonic-gate 
1150Sstevel@tonic-gate #define	MPI_HOST_INTERRUPT_MASK_OFFSET		0x00000034
1160Sstevel@tonic-gate #define	MPI_HIM_RIM				0x00000008
1170Sstevel@tonic-gate #define	MPI_HIM_DIM				0x00000001
1180Sstevel@tonic-gate 
1190Sstevel@tonic-gate #define	MPI_REQUEST_QUEUE_OFFSET		0x00000040
1200Sstevel@tonic-gate #define	MPI_REQUEST_POST_FIFO_OFFSET		0x00000040
1210Sstevel@tonic-gate 
1220Sstevel@tonic-gate #define	MPI_REPLY_QUEUE_OFFSET			0x00000044
1230Sstevel@tonic-gate #define	MPI_REPLY_POST_FIFO_OFFSET		0x00000044
1240Sstevel@tonic-gate #define	MPI_REPLY_FREE_FIFO_OFFSET		0x00000044
1250Sstevel@tonic-gate 
1260Sstevel@tonic-gate #define	MPI_HI_PRI_REQUEST_QUEUE_OFFSET		0x00000048
1270Sstevel@tonic-gate 
1280Sstevel@tonic-gate /*
1290Sstevel@tonic-gate  * Message Frame Descriptors
1300Sstevel@tonic-gate  */
1310Sstevel@tonic-gate #define	MPI_REQ_MF_DESCRIPTOR_NB_MASK		0x00000003
1320Sstevel@tonic-gate #define	MPI_REQ_MF_DESCRIPTOR_F_BIT		0x00000004
1330Sstevel@tonic-gate #define	MPI_REQ_MF_DESCRIPTOR_ADDRESS_MASK	0xFFFFFFF8
1340Sstevel@tonic-gate 
1350Sstevel@tonic-gate #define	MPI_ADDRESS_REPLY_A_BIT			0x80000000
1360Sstevel@tonic-gate #define	MPI_ADDRESS_REPLY_ADDRESS_MASK		0x7FFFFFFF
1370Sstevel@tonic-gate 
1380Sstevel@tonic-gate #define	MPI_CONTEXT_REPLY_A_BIT			0x80000000
1390Sstevel@tonic-gate #define	MPI_CONTEXT_REPLY_TYPE_MASK		0x60000000
1400Sstevel@tonic-gate #define	MPI_CONTEXT_REPLY_TYPE_SCSI_INIT	0x00
1410Sstevel@tonic-gate #define	MPI_CONTEXT_REPLY_TYPE_SCSI_TARGET	0x01
1420Sstevel@tonic-gate #define	MPI_CONTEXT_REPLY_TYPE_LAN		0x02
1430Sstevel@tonic-gate #define	MPI_CONTEXT_REPLY_TYPE_SHIFT		29
1440Sstevel@tonic-gate #define	MPI_CONTEXT_REPLY_CONTEXT_MASK		0x1FFFFFFF
1450Sstevel@tonic-gate 
1460Sstevel@tonic-gate 
1470Sstevel@tonic-gate /*
1480Sstevel@tonic-gate  * Context Reply macros
1490Sstevel@tonic-gate  */
1500Sstevel@tonic-gate #define	MPI_GET_CONTEXT_REPLY_TYPE(x)  \
1510Sstevel@tonic-gate 	(((x) & MPI_CONTEXT_REPLY_TYPE_MASK) \
1520Sstevel@tonic-gate 		>> MPI_CONTEXT_REPLY_TYPE_SHIFT)
1530Sstevel@tonic-gate 
1540Sstevel@tonic-gate #define	MPI_SET_CONTEXT_REPLY_TYPE(x, typ) \
1550Sstevel@tonic-gate 	((x) = ((x) & ~MPI_CONTEXT_REPLY_TYPE_MASK) | \
1560Sstevel@tonic-gate 		(((typ) << MPI_CONTEXT_REPLY_TYPE_SHIFT) & \
1570Sstevel@tonic-gate 			MPI_CONTEXT_REPLY_TYPE_MASK))
1580Sstevel@tonic-gate 
1590Sstevel@tonic-gate 
1600Sstevel@tonic-gate /*
1610Sstevel@tonic-gate  * Message Functions
1620Sstevel@tonic-gate  *     0x80 -> 0x8F reserved for private message use per product
1630Sstevel@tonic-gate  */
1640Sstevel@tonic-gate #define	MPI_FUNCTION_SCSI_IO_REQUEST			0x00
1650Sstevel@tonic-gate #define	MPI_FUNCTION_SCSI_TASK_MGMT			0x01
1660Sstevel@tonic-gate #define	MPI_FUNCTION_IOC_INIT				0x02
1670Sstevel@tonic-gate #define	MPI_FUNCTION_IOC_FACTS				0x03
1680Sstevel@tonic-gate #define	MPI_FUNCTION_CONFIG				0x04
1690Sstevel@tonic-gate #define	MPI_FUNCTION_PORT_FACTS				0x05
1700Sstevel@tonic-gate #define	MPI_FUNCTION_PORT_ENABLE			0x06
1710Sstevel@tonic-gate #define	MPI_FUNCTION_EVENT_NOTIFICATION			0x07
1720Sstevel@tonic-gate #define	MPI_FUNCTION_EVENT_ACK				0x08
1730Sstevel@tonic-gate #define	MPI_FUNCTION_FW_DOWNLOAD			0x09
1740Sstevel@tonic-gate #define	MPI_FUNCTION_TARGET_CMD_BUFFER_POST		0x0A
1750Sstevel@tonic-gate #define	MPI_FUNCTION_TARGET_ASSIST			0x0B
1760Sstevel@tonic-gate #define	MPI_FUNCTION_TARGET_STATUS_SEND			0x0C
1770Sstevel@tonic-gate #define	MPI_FUNCTION_TARGET_MODE_ABORT			0x0D
1780Sstevel@tonic-gate #define	MPI_FUNCTION_FC_LINK_SRVC_BUF_POST		0x0E
1790Sstevel@tonic-gate #define	MPI_FUNCTION_FC_LINK_SRVC_RSP			0x0F
1800Sstevel@tonic-gate #define	MPI_FUNCTION_FC_EX_LINK_SRVC_SEND		0x10
1810Sstevel@tonic-gate #define	MPI_FUNCTION_FC_ABORT				0x11
1820Sstevel@tonic-gate #define	MPI_FUNCTION_FW_UPLOAD				0x12
1830Sstevel@tonic-gate #define	MPI_FUNCTION_FC_COMMON_TRANSPORT_SEND		0x13
1840Sstevel@tonic-gate #define	MPI_FUNCTION_FC_PRIMITIVE_SEND			0x14
1850Sstevel@tonic-gate 
1860Sstevel@tonic-gate #define	MPI_FUNCTION_RAID_ACTION			0x15
1870Sstevel@tonic-gate #define	MPI_FUNCTION_RAID_SCSI_IO_PASSTHROUGH		0x16
1880Sstevel@tonic-gate 
1890Sstevel@tonic-gate #define	MPI_FUNCTION_TOOLBOX				0x17
1900Sstevel@tonic-gate 
1910Sstevel@tonic-gate #define	MPI_FUNCTION_SCSI_ENCLOSURE_PROCESSOR		0x18
1920Sstevel@tonic-gate 
1930Sstevel@tonic-gate #define	MPI_FUNCTION_MAILBOX				0x19
1940Sstevel@tonic-gate 
1950Sstevel@tonic-gate #define	MPI_FUNCTION_SMP_PASSTHROUGH			0x1A
1960Sstevel@tonic-gate #define	MPI_FUNCTION_SAS_IO_UNIT_CONTROL		0x1B
1970Sstevel@tonic-gate 
1980Sstevel@tonic-gate #define	MPI_DIAG_BUFFER_POST				0x1D
1990Sstevel@tonic-gate #define	MPI_DIAG_RELEASE				0x1E
2000Sstevel@tonic-gate 
2010Sstevel@tonic-gate #define	MPI_FUNCTION_SCSI_IO_32				0x1F
2020Sstevel@tonic-gate 
2030Sstevel@tonic-gate #define	MPI_FUNCTION_LAN_SEND				0x20
2040Sstevel@tonic-gate #define	MPI_FUNCTION_LAN_RECEIVE			0x21
2050Sstevel@tonic-gate #define	MPI_FUNCTION_LAN_RESET				0x22
2060Sstevel@tonic-gate 
2070Sstevel@tonic-gate #define	MPI_FUNCTION_INBAND_BUFFER_POST			0x28
2080Sstevel@tonic-gate #define	MPI_FUNCTION_INBAND_SEND			0x29
2090Sstevel@tonic-gate #define	MPI_FUNCTION_INBAND_RSP				0x2A
2100Sstevel@tonic-gate #define	MPI_FUNCTION_INBAND_ABORT			0x2B
2110Sstevel@tonic-gate 
2120Sstevel@tonic-gate #define	MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET		0x40
2130Sstevel@tonic-gate #define	MPI_FUNCTION_IO_UNIT_RESET			0x41
2140Sstevel@tonic-gate #define	MPI_FUNCTION_HANDSHAKE				0x42
2150Sstevel@tonic-gate #define	MPI_FUNCTION_REPLY_FRAME_REMOVAL		0x43
2160Sstevel@tonic-gate #define	MPI_FUNCTION_HOST_PAGEBUF_ACCESS_CONTROL	0x44
2170Sstevel@tonic-gate 
2180Sstevel@tonic-gate /*
2190Sstevel@tonic-gate  * Version format
2200Sstevel@tonic-gate  */
2210Sstevel@tonic-gate typedef struct mpi_version_struct {
2220Sstevel@tonic-gate 	uint8_t		Dev;
2230Sstevel@tonic-gate 	uint8_t		Unit;
2240Sstevel@tonic-gate 	uint8_t		Minor;
2250Sstevel@tonic-gate 	uint8_t		Major;
2260Sstevel@tonic-gate } mpi_version_struct_t;
2270Sstevel@tonic-gate 
2280Sstevel@tonic-gate typedef union mpi_version_format {
2290Sstevel@tonic-gate 	mpi_version_struct_t	Struct;
2300Sstevel@tonic-gate 	uint32_t		Word;
2310Sstevel@tonic-gate } mpi_version_format_t;
2320Sstevel@tonic-gate 
2330Sstevel@tonic-gate /*
2340Sstevel@tonic-gate  * Scatter Gather Elements
2350Sstevel@tonic-gate  */
2360Sstevel@tonic-gate 
2370Sstevel@tonic-gate /*
2380Sstevel@tonic-gate  * Simple element structures
2390Sstevel@tonic-gate  */
2400Sstevel@tonic-gate typedef struct sge_simple32 {
2410Sstevel@tonic-gate 	uint32_t	FlagsLength;
2420Sstevel@tonic-gate 	uint32_t	Address;
2430Sstevel@tonic-gate } sge_simple32_t;
2440Sstevel@tonic-gate 
2450Sstevel@tonic-gate typedef struct sge_simple64 {
2460Sstevel@tonic-gate 	uint32_t	FlagsLength;
2470Sstevel@tonic-gate 	uint32_t	Address_Low;
2480Sstevel@tonic-gate 	uint32_t	Address_High;
2490Sstevel@tonic-gate } sge_simple64_t;
2500Sstevel@tonic-gate 
2510Sstevel@tonic-gate typedef struct sge_simple_union {
2520Sstevel@tonic-gate 	uint32_t	FlagsLength;
2530Sstevel@tonic-gate 	union {
2540Sstevel@tonic-gate 		uint32_t	Address32;
2550Sstevel@tonic-gate 		uint32_t	Address64_Low;
2560Sstevel@tonic-gate 		uint32_t	Address64_High;
2570Sstevel@tonic-gate 	} u1;
2580Sstevel@tonic-gate } sge_simple_union_t;
2590Sstevel@tonic-gate 
2600Sstevel@tonic-gate /*
2610Sstevel@tonic-gate  * Chain element structures
2620Sstevel@tonic-gate  */
2630Sstevel@tonic-gate typedef struct sge_chain32 {
2640Sstevel@tonic-gate 	uint16_t	Length;
2650Sstevel@tonic-gate 	uint8_t		NextChainOffset;
2660Sstevel@tonic-gate 	uint8_t		Flags;
2670Sstevel@tonic-gate 	uint32_t	Address;
2680Sstevel@tonic-gate } sge_chain32_t;
2690Sstevel@tonic-gate 
2700Sstevel@tonic-gate typedef struct sge_chain64 {
2710Sstevel@tonic-gate 	uint16_t	Length;
2720Sstevel@tonic-gate 	uint8_t		NextChainOffset;
2730Sstevel@tonic-gate 	uint8_t		Flags;
2740Sstevel@tonic-gate 	uint32_t	Address64_Low;
2750Sstevel@tonic-gate 	uint32_t	Address64_High;
2760Sstevel@tonic-gate } sge_chain64_t;
2770Sstevel@tonic-gate 
2780Sstevel@tonic-gate typedef struct sge_chain_union {
2790Sstevel@tonic-gate 	uint16_t	Length;
2800Sstevel@tonic-gate 	uint8_t		NextChainOffset;
2810Sstevel@tonic-gate 	uint8_t		Flags;
2820Sstevel@tonic-gate 	union {
2830Sstevel@tonic-gate 		uint32_t	Address32;
2840Sstevel@tonic-gate 		uint32_t	Address64_Low;
2850Sstevel@tonic-gate 		uint32_t	Address64_High;
2860Sstevel@tonic-gate 	} u1;
2870Sstevel@tonic-gate } sge_chain_union_t;
2880Sstevel@tonic-gate 
2890Sstevel@tonic-gate /*
2900Sstevel@tonic-gate  *  Transaction Context element
2910Sstevel@tonic-gate  */
2920Sstevel@tonic-gate typedef struct sge_transaction32 {
2930Sstevel@tonic-gate 	uint8_t		Reserved;
2940Sstevel@tonic-gate 	uint8_t		ContextSize;
2950Sstevel@tonic-gate 	uint8_t		DetailsLength;
2960Sstevel@tonic-gate 	uint8_t		Flags;
2970Sstevel@tonic-gate 	uint32_t	TransactionContext[1];
2980Sstevel@tonic-gate 	uint32_t	TransactionDetails[1];
2990Sstevel@tonic-gate } sge_transaction32_t;
3000Sstevel@tonic-gate 
3010Sstevel@tonic-gate typedef struct sge_transaction64 {
3020Sstevel@tonic-gate 	uint8_t		Reserved;
3030Sstevel@tonic-gate 	uint8_t		ContextSize;
3040Sstevel@tonic-gate 	uint8_t		DetailsLength;
3050Sstevel@tonic-gate 	uint8_t		Flags;
3060Sstevel@tonic-gate 	uint32_t	TransactionContext[2];
3070Sstevel@tonic-gate 	uint32_t	TransactionDetails[1];
3080Sstevel@tonic-gate } sge_transaction64_t;
3090Sstevel@tonic-gate 
3100Sstevel@tonic-gate typedef struct sge_transaction96 {
3110Sstevel@tonic-gate 	uint8_t		Reserved;
3120Sstevel@tonic-gate 	uint8_t		ContextSize;
3130Sstevel@tonic-gate 	uint8_t		DetailsLength;
3140Sstevel@tonic-gate 	uint8_t		Flags;
3150Sstevel@tonic-gate 	uint32_t	TransactionContext[3];
3160Sstevel@tonic-gate 	uint32_t	TransactionDetails[1];
3170Sstevel@tonic-gate } sge_transaction96_t;
3180Sstevel@tonic-gate 
3190Sstevel@tonic-gate typedef struct sge_transaction128 {
3200Sstevel@tonic-gate 	uint8_t		Reserved;
3210Sstevel@tonic-gate 	uint8_t		ContextSize;
3220Sstevel@tonic-gate 	uint8_t		DetailsLength;
3230Sstevel@tonic-gate 	uint8_t		Flags;
3240Sstevel@tonic-gate 	uint32_t	TransactionContext[4];
3250Sstevel@tonic-gate 	uint32_t	TransactionDetails[1];
3260Sstevel@tonic-gate } sge_transaction128_t;
3270Sstevel@tonic-gate 
3280Sstevel@tonic-gate typedef struct sge_transaction_union {
3290Sstevel@tonic-gate 	uint8_t		Reserved;
3300Sstevel@tonic-gate 	uint8_t		ContextSize;
3310Sstevel@tonic-gate 	uint8_t		DetailsLength;
3320Sstevel@tonic-gate 	uint8_t		Flags;
3330Sstevel@tonic-gate 	union {
3340Sstevel@tonic-gate 		uint32_t	TransactionContext32[1];
3350Sstevel@tonic-gate 		uint32_t	TransactionContext64[2];
3360Sstevel@tonic-gate 		uint32_t	TransactionContext96[3];
3370Sstevel@tonic-gate 		uint32_t	TransactionContext128[4];
3380Sstevel@tonic-gate 	} u1;
3390Sstevel@tonic-gate 	uint32_t	TransactionDetails[1];
3400Sstevel@tonic-gate } sge_transaction_union_t;
3410Sstevel@tonic-gate 
3420Sstevel@tonic-gate 
3430Sstevel@tonic-gate /*
3440Sstevel@tonic-gate  * SGE IO types union  for IO SGL's
3450Sstevel@tonic-gate  */
3460Sstevel@tonic-gate typedef struct sge_io_union {
3470Sstevel@tonic-gate 	union {
3480Sstevel@tonic-gate 		sge_simple_union_t	Simple;
3490Sstevel@tonic-gate 		sge_chain_union_t	Chain;
3500Sstevel@tonic-gate 	} u1;
3510Sstevel@tonic-gate } sge_io_union_t;
3520Sstevel@tonic-gate 
3530Sstevel@tonic-gate /*
3540Sstevel@tonic-gate  * SGE union for SGL's with Simple and Transaction elements
3550Sstevel@tonic-gate  */
3560Sstevel@tonic-gate typedef struct sge_trans_simple_union {
3570Sstevel@tonic-gate 	union {
3580Sstevel@tonic-gate 		sge_simple_union_t	Simple;
3590Sstevel@tonic-gate 		sge_transaction_union_t	Transaction;
3600Sstevel@tonic-gate 	} u1;
3610Sstevel@tonic-gate } sge_trans_simple_union_t;
3620Sstevel@tonic-gate 
3630Sstevel@tonic-gate /*
3640Sstevel@tonic-gate  * All SGE types union
3650Sstevel@tonic-gate  */
3660Sstevel@tonic-gate typedef struct sge_mpi_union {
3670Sstevel@tonic-gate 	union {
3680Sstevel@tonic-gate 		sge_simple_union_t	Simple;
3690Sstevel@tonic-gate 		sge_chain_union_t	Chain;
3700Sstevel@tonic-gate 		sge_transaction_union_t	Transaction;
3710Sstevel@tonic-gate 	} u1;
3720Sstevel@tonic-gate } sge_mpi_union_t;
3730Sstevel@tonic-gate 
3740Sstevel@tonic-gate 
3750Sstevel@tonic-gate /*
3760Sstevel@tonic-gate  * SGE field definition and masks
3770Sstevel@tonic-gate  */
3780Sstevel@tonic-gate 
3790Sstevel@tonic-gate /*
3800Sstevel@tonic-gate  * Flags field bit definitions
3810Sstevel@tonic-gate  */
3820Sstevel@tonic-gate #define	MPI_SGE_FLAGS_LAST_ELEMENT		0x80
3830Sstevel@tonic-gate #define	MPI_SGE_FLAGS_END_OF_BUFFER		0x40
3840Sstevel@tonic-gate #define	MPI_SGE_FLAGS_ELEMENT_TYPE_MASK		0x30
3850Sstevel@tonic-gate #define	MPI_SGE_FLAGS_LOCAL_ADDRESS		0x08
3860Sstevel@tonic-gate #define	MPI_SGE_FLAGS_DIRECTION			0x04
3870Sstevel@tonic-gate #define	MPI_SGE_FLAGS_ADDRESS_SIZE		0x02
3880Sstevel@tonic-gate #define	MPI_SGE_FLAGS_END_OF_LIST		0x01
3890Sstevel@tonic-gate 
3900Sstevel@tonic-gate #define	MPI_SGE_FLAGS_SHIFT			24
3910Sstevel@tonic-gate 
3920Sstevel@tonic-gate #define	MPI_SGE_LENGTH_MASK			0x00FFFFFF
3930Sstevel@tonic-gate #define	MPI_SGE_CHAIN_LENGTH_MASK		0x0000FFFF
3940Sstevel@tonic-gate 
3950Sstevel@tonic-gate /*
3960Sstevel@tonic-gate  * Element Type
3970Sstevel@tonic-gate  */
3980Sstevel@tonic-gate #define	MPI_SGE_FLAGS_TRANSACTION_ELEMENT	0x00
3990Sstevel@tonic-gate #define	MPI_SGE_FLAGS_SIMPLE_ELEMENT		0x10
4000Sstevel@tonic-gate #define	MPI_SGE_FLAGS_CHAIN_ELEMENT		0x30
4010Sstevel@tonic-gate #define	MPI_SGE_FLAGS_ELEMENT_MASK		0x30
4020Sstevel@tonic-gate 
4030Sstevel@tonic-gate /*
4040Sstevel@tonic-gate  * Address location
4050Sstevel@tonic-gate  */
4060Sstevel@tonic-gate #define	MPI_SGE_FLAGS_SYSTEM_ADDRESS		0x00
4070Sstevel@tonic-gate 
4080Sstevel@tonic-gate /*
4090Sstevel@tonic-gate  * Direction
4100Sstevel@tonic-gate  */
4110Sstevel@tonic-gate #define	MPI_SGE_FLAGS_IOC_TO_HOST		0x00
4120Sstevel@tonic-gate #define	MPI_SGE_FLAGS_HOST_TO_IOC		0x04
4130Sstevel@tonic-gate 
4140Sstevel@tonic-gate /*
4150Sstevel@tonic-gate  * Address Size
4160Sstevel@tonic-gate  */
4170Sstevel@tonic-gate #define	MPI_SGE_FLAGS_32_BIT_ADDRESSING		0x00
4180Sstevel@tonic-gate #define	MPI_SGE_FLAGS_64_BIT_ADDRESSING		0x02
4190Sstevel@tonic-gate 
4200Sstevel@tonic-gate /*
4210Sstevel@tonic-gate  * Context Size
4220Sstevel@tonic-gate  */
4230Sstevel@tonic-gate #define	MPI_SGE_FLAGS_32_BIT_CONTEXT		0x00
4240Sstevel@tonic-gate #define	MPI_SGE_FLAGS_64_BIT_CONTEXT		0x02
4250Sstevel@tonic-gate #define	MPI_SGE_FLAGS_96_BIT_CONTEXT		0x04
4260Sstevel@tonic-gate #define	MPI_SGE_FLAGS_128_BIT_CONTEXT		0x06
4270Sstevel@tonic-gate 
4280Sstevel@tonic-gate #define	MPI_SGE_CHAIN_OFFSET_MASK		0x00FF0000
4290Sstevel@tonic-gate #define	MPI_SGE_CHAIN_OFFSET_SHIFT		16
4300Sstevel@tonic-gate 
4310Sstevel@tonic-gate 
4320Sstevel@tonic-gate /*
4330Sstevel@tonic-gate  * SGE operation Macros
4340Sstevel@tonic-gate  */
4350Sstevel@tonic-gate 
4360Sstevel@tonic-gate /*
4370Sstevel@tonic-gate  * SIMPLE FlagsLength manipulations...
4380Sstevel@tonic-gate  */
4390Sstevel@tonic-gate #define	MPI_SGE_SET_FLAGS(f)		((uint32_t)(f) << MPI_SGE_FLAGS_SHIFT)
4400Sstevel@tonic-gate #define	MPI_SGE_GET_FLAGS(fl) \
4410Sstevel@tonic-gate 	(((fl) & ~MPI_SGE_LENGTH_MASK) >> MPI_SGE_FLAGS_SHIFT)
4420Sstevel@tonic-gate #define	MPI_SGE_LENGTH(fl)		((fl) & MPI_SGE_LENGTH_MASK)
4430Sstevel@tonic-gate #define	MPI_SGE_CHAIN_LENGTH(fl)	((fl) & MPI_SGE_CHAIN_LENGTH_MASK)
4440Sstevel@tonic-gate 
4450Sstevel@tonic-gate #define	MPI_SGE_SET_FLAGS_LENGTH(f, l) \
4460Sstevel@tonic-gate 	(MPI_SGE_SET_FLAGS(f) | MPI_SGE_LENGTH(l))
4470Sstevel@tonic-gate 
4480Sstevel@tonic-gate #define	MPI_pSGE_GET_FLAGS(psg)		MPI_SGE_GET_FLAGS((psg)->FlagsLength)
4490Sstevel@tonic-gate #define	MPI_pSGE_GET_LENGTH(psg)	MPI_SGE_LENGTH((psg)->FlagsLength)
4500Sstevel@tonic-gate #define	MPI_pSGE_SET_FLAGS_LENGTH(psg, f, l) \
4510Sstevel@tonic-gate 	(psg)->FlagsLength = MPI_SGE_SET_FLAGS_LENGTH(f, l)
4520Sstevel@tonic-gate 
4530Sstevel@tonic-gate /*
4540Sstevel@tonic-gate  * CAUTION - The following are READ-MODIFY-WRITE!
4550Sstevel@tonic-gate  */
4560Sstevel@tonic-gate #define	MPI_pSGE_SET_FLAGS(psg, f) \
4570Sstevel@tonic-gate 	(psg)->FlagsLength |= MPI_SGE_SET_FLAGS(f)
4580Sstevel@tonic-gate #define	MPI_pSGE_SET_LENGTH(psg, l) \
4590Sstevel@tonic-gate 	(psg)->FlagsLength |= MPI_SGE_LENGTH(l)
4600Sstevel@tonic-gate 
4610Sstevel@tonic-gate #define	MPI_GET_CHAIN_OFFSET(x) \
4620Sstevel@tonic-gate 	((x&MPI_SGE_CHAIN_OFFSET_MASK)>>MPI_SGE_CHAIN_OFFSET_SHIFT)
4630Sstevel@tonic-gate 
4640Sstevel@tonic-gate 
4650Sstevel@tonic-gate /*
4660Sstevel@tonic-gate  * Standard Message Structures
4670Sstevel@tonic-gate  */
4680Sstevel@tonic-gate 
4690Sstevel@tonic-gate /*
4700Sstevel@tonic-gate  * Standard message request header for all request messages
4710Sstevel@tonic-gate  */
4720Sstevel@tonic-gate typedef struct msg_request_header {
4730Sstevel@tonic-gate 	uint8_t		Reserved[2];	/* function specific */
4740Sstevel@tonic-gate 	uint8_t		ChainOffset;
4750Sstevel@tonic-gate 	uint8_t		Function;
4760Sstevel@tonic-gate 	uint8_t		Reserved1[3];	/* function specific */
4770Sstevel@tonic-gate 	uint8_t		MsgFlags;
4780Sstevel@tonic-gate 	uint32_t	MsgContext;
4790Sstevel@tonic-gate } msg_request_header_t;
4800Sstevel@tonic-gate 
4810Sstevel@tonic-gate 
4820Sstevel@tonic-gate /*
4830Sstevel@tonic-gate  * Default Reply
4840Sstevel@tonic-gate  */
4850Sstevel@tonic-gate typedef struct msg_default_reply {
4860Sstevel@tonic-gate 	uint8_t		Reserved[2];	/* function specific */
4870Sstevel@tonic-gate 	uint8_t		MsgLength;
4880Sstevel@tonic-gate 	uint8_t		Function;
4890Sstevel@tonic-gate 	uint8_t		Reserved1[3];	/* function specific */
4900Sstevel@tonic-gate 	uint8_t		MsgFlags;
4910Sstevel@tonic-gate 	uint32_t	MsgContext;
4920Sstevel@tonic-gate 	uint8_t		Reserved2[2];	/* function specific */
4930Sstevel@tonic-gate 	uint16_t	IOCStatus;
4940Sstevel@tonic-gate 	uint32_t	IOCLogInfo;
4950Sstevel@tonic-gate } msg_default_reply_t;
4960Sstevel@tonic-gate 
4970Sstevel@tonic-gate /*
4980Sstevel@tonic-gate  * MsgFlags definition for all replies
4990Sstevel@tonic-gate  */
5000Sstevel@tonic-gate #define	MPI_MSGFLAGS_CONTINUATION_REPLY		0x80
5010Sstevel@tonic-gate 
5020Sstevel@tonic-gate 
5030Sstevel@tonic-gate /*
5040Sstevel@tonic-gate  * IOC Status Values
5050Sstevel@tonic-gate  */
5060Sstevel@tonic-gate 
5070Sstevel@tonic-gate /*
5080Sstevel@tonic-gate  * Common IOCStatus values for all replies
5090Sstevel@tonic-gate  */
5100Sstevel@tonic-gate #define	MPI_IOCSTATUS_SUCCESS				0x0000
5110Sstevel@tonic-gate #define	MPI_IOCSTATUS_INVALID_FUNCTION			0x0001
5120Sstevel@tonic-gate #define	MPI_IOCSTATUS_BUSY				0x0002
5130Sstevel@tonic-gate #define	MPI_IOCSTATUS_INVALID_SGL			0x0003
5140Sstevel@tonic-gate #define	MPI_IOCSTATUS_INTERNAL_ERROR			0x0004
5150Sstevel@tonic-gate #define	MPI_IOCSTATUS_RESERVED				0x0005
5160Sstevel@tonic-gate #define	MPI_IOCSTATUS_INSUFFICIENT_RESOURCES		0x0006
5170Sstevel@tonic-gate #define	MPI_IOCSTATUS_INVALID_FIELD			0x0007
5180Sstevel@tonic-gate #define	MPI_IOCSTATUS_INVALID_STATE			0x0008
5190Sstevel@tonic-gate #define	MPI_IOCSTATUS_OP_STATE_NOT_SUPPORTED		0x0009
5200Sstevel@tonic-gate 
5210Sstevel@tonic-gate /*
5220Sstevel@tonic-gate  * Config IOCStatus values
5230Sstevel@tonic-gate  */
5240Sstevel@tonic-gate #define	MPI_IOCSTATUS_CONFIG_INVALID_ACTION		0x0020
5250Sstevel@tonic-gate #define	MPI_IOCSTATUS_CONFIG_INVALID_TYPE		0x0021
5260Sstevel@tonic-gate #define	MPI_IOCSTATUS_CONFIG_INVALID_PAGE		0x0022
5270Sstevel@tonic-gate #define	MPI_IOCSTATUS_CONFIG_INVALID_DATA		0x0023
5280Sstevel@tonic-gate #define	MPI_IOCSTATUS_CONFIG_NO_DEFAULTS		0x0024
5290Sstevel@tonic-gate #define	MPI_IOCSTATUS_CONFIG_CANT_COMMIT		0x0025
5300Sstevel@tonic-gate 
5310Sstevel@tonic-gate /*
5320Sstevel@tonic-gate  * SCSIIO Reply (SPI & FCP) initiator values
5330Sstevel@tonic-gate  */
5340Sstevel@tonic-gate #define	MPI_IOCSTATUS_SCSI_RECOVERED_ERROR		0x0040
5350Sstevel@tonic-gate #define	MPI_IOCSTATUS_SCSI_INVALID_BUS			0x0041
5360Sstevel@tonic-gate #define	MPI_IOCSTATUS_SCSI_INVALID_TARGETID		0x0042
5370Sstevel@tonic-gate #define	MPI_IOCSTATUS_SCSI_DEVICE_NOT_THERE		0x0043
5380Sstevel@tonic-gate #define	MPI_IOCSTATUS_SCSI_DATA_OVERRUN			0x0044
5390Sstevel@tonic-gate #define	MPI_IOCSTATUS_SCSI_DATA_UNDERRUN		0x0045
5400Sstevel@tonic-gate #define	MPI_IOCSTATUS_SCSI_IO_DATA_ERROR		0x0046
5410Sstevel@tonic-gate #define	MPI_IOCSTATUS_SCSI_PROTOCOL_ERROR		0x0047
5420Sstevel@tonic-gate #define	MPI_IOCSTATUS_SCSI_TASK_TERMINATED		0x0048
5430Sstevel@tonic-gate #define	MPI_IOCSTATUS_SCSI_RESIDUAL_MISMATCH		0x0049
5440Sstevel@tonic-gate #define	MPI_IOCSTATUS_SCSI_TASK_MGMT_FAILED		0x004A
5450Sstevel@tonic-gate #define	MPI_IOCSTATUS_SCSI_IOC_TERMINATED		0x004B
5460Sstevel@tonic-gate #define	MPI_IOCSTATUS_SCSI_EXT_TERMINATED		0x004C
5470Sstevel@tonic-gate 
5480Sstevel@tonic-gate /*
5490Sstevel@tonic-gate  * SCSI Initiator/Target end-to-end data protection
5500Sstevel@tonic-gate  */
5510Sstevel@tonic-gate #define	MPI_IOCSTATUS_EEDP_CRC_ERROR			0x004D
5520Sstevel@tonic-gate #define	MPI_IOCSTATUS_EEDP_LBA_TAG_ERROR		0x004E
5530Sstevel@tonic-gate #define	MPI_IOCSTATUS_EEDP_APP_TAG_ERROR		0x004F
5540Sstevel@tonic-gate /*
5550Sstevel@tonic-gate  * SCSI (SPI & FCP) target values
5560Sstevel@tonic-gate  */
5570Sstevel@tonic-gate #define	MPI_IOCSTATUS_TARGET_PRIORITY_IO		0x0060
5580Sstevel@tonic-gate #define	MPI_IOCSTATUS_TARGET_INVALID_PORT		0x0061
5590Sstevel@tonic-gate #define	MPI_IOCSTATUS_TARGET_INVALID_IOCINDEX		0x0062
5600Sstevel@tonic-gate #define	MPI_IOCSTATUS_TARGET_ABORTED			0x0063
5610Sstevel@tonic-gate #define	MPI_IOCSTATUS_TARGET_NO_CONN_RETRYABLE		0x0064
5620Sstevel@tonic-gate #define	MPI_IOCSTATUS_TARGET_NO_CONNECTION		0x0065
5630Sstevel@tonic-gate #define	MPI_IOCSTATUS_TARGET_XFER_COUNT_MISMATCH	0x006A
5640Sstevel@tonic-gate #define	MPI_IOCSTATUS_TARGET_STS_DATA_NOT_SENT		0x006B
5650Sstevel@tonic-gate 
5660Sstevel@tonic-gate /*
5670Sstevel@tonic-gate  * Additional FCP target values
5680Sstevel@tonic-gate  */
5690Sstevel@tonic-gate #define	MPI_IOCSTATUS_TARGET_FC_ABORTED			0x0066	/* obsolete */
5700Sstevel@tonic-gate #define	MPI_IOCSTATUS_TARGET_FC_RX_ID_INVALID		0x0067	/* obsolete */
5710Sstevel@tonic-gate #define	MPI_IOCSTATUS_TARGET_FC_DID_INVALID		0x0068	/* obsolete */
5720Sstevel@tonic-gate #define	MPI_IOCSTATUS_TARGET_FC_NODE_LOGGED_OUT		0x0069	/* obsolete */
5730Sstevel@tonic-gate 
5740Sstevel@tonic-gate /*
5750Sstevel@tonic-gate  * Fibre Channel Direct Access values
5760Sstevel@tonic-gate  */
5770Sstevel@tonic-gate #define	MPI_IOCSTATUS_FC_ABORTED			0x0066
5780Sstevel@tonic-gate #define	MPI_IOCSTATUS_FC_RX_ID_INVALID			0x0067
5790Sstevel@tonic-gate #define	MPI_IOCSTATUS_FC_DID_INVALID			0x0068
5800Sstevel@tonic-gate #define	MPI_IOCSTATUS_FC_NODE_LOGGED_OUT		0x0069
5810Sstevel@tonic-gate #define	MPI_IOCSTATUS_FC_EXCHANGE_CANCELED		0x006C
5820Sstevel@tonic-gate 
5830Sstevel@tonic-gate /*
5840Sstevel@tonic-gate  * LAN values
5850Sstevel@tonic-gate  */
5860Sstevel@tonic-gate #define	MPI_IOCSTATUS_LAN_DEVICE_NOT_FOUND		0x0080
5870Sstevel@tonic-gate #define	MPI_IOCSTATUS_LAN_DEVICE_FAILURE		0x0081
5880Sstevel@tonic-gate #define	MPI_IOCSTATUS_LAN_TRANSMIT_ERROR		0x0082
5890Sstevel@tonic-gate #define	MPI_IOCSTATUS_LAN_TRANSMIT_ABORTED		0x0083
5900Sstevel@tonic-gate #define	MPI_IOCSTATUS_LAN_RECEIVE_ERROR			0x0084
5910Sstevel@tonic-gate #define	MPI_IOCSTATUS_LAN_RECEIVE_ABORTED		0x0085
5920Sstevel@tonic-gate #define	MPI_IOCSTATUS_LAN_PARTIAL_PACKET		0x0086
5930Sstevel@tonic-gate #define	MPI_IOCSTATUS_LAN_CANCELED			0x0087
5940Sstevel@tonic-gate 
5950Sstevel@tonic-gate /*
5960Sstevel@tonic-gate  * SAS values
5970Sstevel@tonic-gate  */
5980Sstevel@tonic-gate #define	MPI_IOCSTATUS_SAS_SMP_REQUEST_FAILED		0x0090
599*5754Sjw149990 #define	MPI_IOCSTATUS_SAS_SMP_DATA_OVERRUN		0x0091
6000Sstevel@tonic-gate 
6010Sstevel@tonic-gate /*
6020Sstevel@tonic-gate  * Inband values
6030Sstevel@tonic-gate  */
6040Sstevel@tonic-gate #define	MPI_IOCSTATUS_INBAND_ABORTED			0x0098
6050Sstevel@tonic-gate #define	MPI_IOCSTATUS_INBAND_NO_CONNECTION		0x0099
6060Sstevel@tonic-gate 
6070Sstevel@tonic-gate /*
6080Sstevel@tonic-gate  * Diagnostic Tools values
6090Sstevel@tonic-gate  */
6100Sstevel@tonic-gate #define	MPI_IOCSTATUS_DIAGNOSTIC_RELEASED		0x00A0
6110Sstevel@tonic-gate 
6120Sstevel@tonic-gate /*
6130Sstevel@tonic-gate  * IOCStatus flag to indicate that log info is available
6140Sstevel@tonic-gate  */
6150Sstevel@tonic-gate #define	MPI_IOCSTATUS_FLAG_LOG_INFO_AVAILABLE		0x8000
6160Sstevel@tonic-gate #define	MPI_IOCSTATUS_MASK				0x7FFF
6170Sstevel@tonic-gate 
6180Sstevel@tonic-gate /*
6190Sstevel@tonic-gate  * LogInfo Types
6200Sstevel@tonic-gate  */
6210Sstevel@tonic-gate #define	MPI_IOCLOGINFO_TYPE_MASK			0xF0000000
6220Sstevel@tonic-gate #define	MPI_IOCLOGINFO_TYPE_NONE			0x0
6230Sstevel@tonic-gate #define	MPI_IOCLOGINFO_TYPE_SCSI			0x1
6240Sstevel@tonic-gate #define	MPI_IOCLOGINFO_TYPE_FC				0x2
6250Sstevel@tonic-gate #define	MPI_IOCLOGINFO_TYPE_SAS				0x3
6260Sstevel@tonic-gate #define	MPI_IOCLOGINFO_TYPE_ISCSI			0x4
6270Sstevel@tonic-gate #define	MPI_IOCLOGINFO_LOG_DATA_MASK			0x0FFFFFFF
6280Sstevel@tonic-gate 
629*5754Sjw149990 /*
630*5754Sjw149990  * SMP passthrough messages
631*5754Sjw149990  */
632*5754Sjw149990 typedef struct msg_smp_passthrough {
633*5754Sjw149990 	uint8_t			Flags;
634*5754Sjw149990 	uint8_t			PhysicalPort;
635*5754Sjw149990 	uint8_t			ChainOffset;
636*5754Sjw149990 	uint8_t			Function;
637*5754Sjw149990 	uint16_t		RequestDataLength;
638*5754Sjw149990 	uint8_t			ConnectionRate;
639*5754Sjw149990 	uint8_t			MsgFlags;
640*5754Sjw149990 	uint32_t		MsgContext;
641*5754Sjw149990 	uint8_t			Reserved[4];
642*5754Sjw149990 	uint64_t		SASAddress;
643*5754Sjw149990 	uint8_t			Reserved1[8];
644*5754Sjw149990 } msg_smp_passthrough_t;
645*5754Sjw149990 
646*5754Sjw149990 
647*5754Sjw149990 /* SMP passthrough Reply */
648*5754Sjw149990 
649*5754Sjw149990 typedef struct msg_smp_passthrough_reply {
650*5754Sjw149990 	uint8_t			Flags;
651*5754Sjw149990 	uint8_t			PhysicalPort;
652*5754Sjw149990 	uint8_t			MsgLength;
653*5754Sjw149990 	uint8_t			Function;
654*5754Sjw149990 	uint16_t		ResponseDataLength;
655*5754Sjw149990 	uint8_t			Reserved;
656*5754Sjw149990 	uint8_t			MsgFlags;
657*5754Sjw149990 	uint32_t		MsgContext;
658*5754Sjw149990 	uint8_t			Reserved1;
659*5754Sjw149990 	uint8_t			SASStatus;
660*5754Sjw149990 	uint16_t		IOCStatus;
661*5754Sjw149990 	uint32_t		IOCLogInfo;
662*5754Sjw149990 	uint8_t			Reserved2[4];
663*5754Sjw149990 } msg_smp_passthrough_reply_t;
664*5754Sjw149990 
665*5754Sjw149990 #define	MPI_SMP_PT_REQ_CONNECT_RATE_NEGOTIATED	(0x00)
666*5754Sjw149990 #define	MPI_SMP_PT_REQ_CONNECT_RATE_1_5		(0x08)
667*5754Sjw149990 #define	MPI_SMP_PT_REQ_CONNECT_RATE_3_0		(0x09)
668*5754Sjw149990 #define	MPI_SASSTATUS_SUCCESS			0
669*5754Sjw149990 
6700Sstevel@tonic-gate #ifdef	__cplusplus
6710Sstevel@tonic-gate }
6720Sstevel@tonic-gate #endif
6730Sstevel@tonic-gate 
6740Sstevel@tonic-gate #endif	/* _SYS_MPI_H */
675