182527734SSukumar Swaminathan /*
282527734SSukumar Swaminathan  * CDDL HEADER START
382527734SSukumar Swaminathan  *
482527734SSukumar Swaminathan  * The contents of this file are subject to the terms of the
582527734SSukumar Swaminathan  * Common Development and Distribution License (the "License").
682527734SSukumar Swaminathan  * You may not use this file except in compliance with the License.
782527734SSukumar Swaminathan  *
8*8f23e9faSHans Rosenfeld  * You can obtain a copy of the license at
9*8f23e9faSHans Rosenfeld  * http://www.opensource.org/licenses/cddl1.txt.
1082527734SSukumar Swaminathan  * See the License for the specific language governing permissions
1182527734SSukumar Swaminathan  * and limitations under the License.
1282527734SSukumar Swaminathan  *
1382527734SSukumar Swaminathan  * When distributing Covered Code, include this CDDL HEADER in each
1482527734SSukumar Swaminathan  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1582527734SSukumar Swaminathan  * If applicable, add the following below this CDDL HEADER, with the
1682527734SSukumar Swaminathan  * fields enclosed by brackets "[]" replaced with your own identifying
1782527734SSukumar Swaminathan  * information: Portions Copyright [yyyy] [name of copyright owner]
1882527734SSukumar Swaminathan  *
1982527734SSukumar Swaminathan  * CDDL HEADER END
2082527734SSukumar Swaminathan  */
2182527734SSukumar Swaminathan 
2282527734SSukumar Swaminathan /*
23*8f23e9faSHans Rosenfeld  * Copyright (c) 2004-2011 Emulex. All rights reserved.
2482527734SSukumar Swaminathan  * Use is subject to license terms.
2582527734SSukumar Swaminathan  */
2682527734SSukumar Swaminathan 
2782527734SSukumar Swaminathan #ifndef _EMLXS_IOCB_H
2882527734SSukumar Swaminathan #define	_EMLXS_IOCB_H
2982527734SSukumar Swaminathan 
3082527734SSukumar Swaminathan #ifdef	__cplusplus
3182527734SSukumar Swaminathan extern "C" {
3282527734SSukumar Swaminathan #endif
3382527734SSukumar Swaminathan 
3482527734SSukumar Swaminathan /* ==== IOCB Commands ==== */
3582527734SSukumar Swaminathan 
3682527734SSukumar Swaminathan #define	CMD_RCV_SEQUENCE_CX	0x01
3782527734SSukumar Swaminathan #define	CMD_XMIT_SEQUENCE_CR	0x02
3882527734SSukumar Swaminathan #define	CMD_XMIT_SEQUENCE_CX	0x03
3982527734SSukumar Swaminathan #define	CMD_XMIT_BCAST_CN	0x04
4082527734SSukumar Swaminathan #define	CMD_XMIT_BCAST_CX	0x05
4182527734SSukumar Swaminathan #define	CMD_QUE_RING_BUF_CN	0x06
4282527734SSukumar Swaminathan #define	CMD_QUE_XRI_BUF_CX	0x07
4382527734SSukumar Swaminathan #define	CMD_IOCB_CONTINUE_CN	0x08
4482527734SSukumar Swaminathan #define	CMD_RET_XRI_BUF_CX	0x09
4582527734SSukumar Swaminathan #define	CMD_ELS_REQUEST_CR	0x0A
4682527734SSukumar Swaminathan #define	CMD_ELS_REQUEST_CX	0x0B
4782527734SSukumar Swaminathan #define	CMD_RCV_ELS_REQ_CX	0x0D
4882527734SSukumar Swaminathan #define	CMD_ABORT_XRI_CN	0x0E
4982527734SSukumar Swaminathan #define	CMD_ABORT_XRI_CX	0x0F
5082527734SSukumar Swaminathan #define	CMD_CLOSE_XRI_CN	0x10
5182527734SSukumar Swaminathan #define	CMD_CLOSE_XRI_CX	0x11
5282527734SSukumar Swaminathan #define	CMD_CREATE_XRI_CR	0x12
5382527734SSukumar Swaminathan #define	CMD_CREATE_XRI_CX	0x13
5482527734SSukumar Swaminathan #define	CMD_GET_RPI_CN		0x14
5582527734SSukumar Swaminathan #define	CMD_XMIT_ELS_RSP_CX	0x15
5682527734SSukumar Swaminathan #define	CMD_GET_RPI_CR		0x16
5782527734SSukumar Swaminathan #define	CMD_XRI_ABORTED_CX	0x17
5882527734SSukumar Swaminathan #define	CMD_FCP_IWRITE_CR	0x18
5982527734SSukumar Swaminathan #define	CMD_FCP_IWRITE_CX	0x19
6082527734SSukumar Swaminathan #define	CMD_FCP_IREAD_CR	0x1A
6182527734SSukumar Swaminathan #define	CMD_FCP_IREAD_CX	0x1B
6282527734SSukumar Swaminathan #define	CMD_FCP_ICMND_CR	0x1C
6382527734SSukumar Swaminathan #define	CMD_FCP_ICMND_CX	0x1D
6482527734SSukumar Swaminathan #define	CMD_FCP_TSEND_CX	0x1F	/* FCP_TARGET_MODE */
6582527734SSukumar Swaminathan #define	CMD_ADAPTER_MSG		0x20
6682527734SSukumar Swaminathan #define	CMD_FCP_TRECEIVE_CX	0x21	/* FCP_TARGET_MODE */
6782527734SSukumar Swaminathan #define	CMD_ADAPTER_DUMP	0x22
6882527734SSukumar Swaminathan #define	CMD_FCP_TRSP_CX		0x23	/* FCP_TARGET_MODE */
6982527734SSukumar Swaminathan #define	CMD_FCP_AUTO_TRSP_CX	0x29	/* FCP_TARGET_MODE */
7082527734SSukumar Swaminathan 
7182527734SSukumar Swaminathan /* LP3000 gasket IOCB Command Set */
7282527734SSukumar Swaminathan 
7382527734SSukumar Swaminathan #define	CMD_BPL_IWRITE_CR	0x48
7482527734SSukumar Swaminathan #define	CMD_BPL_IWRITE_CX	0x49
7582527734SSukumar Swaminathan #define	CMD_BPL_IREAD_CR	0x4A
7682527734SSukumar Swaminathan #define	CMD_BPL_IREAD_CX	0x4B
7782527734SSukumar Swaminathan #define	CMD_BPL_ICMND_CR	0x4C
7882527734SSukumar Swaminathan #define	CMD_BPL_ICMND_CX	0x4D
7982527734SSukumar Swaminathan 
8082527734SSukumar Swaminathan #define	CMD_ASYNC_STATUS	0x7C
8182527734SSukumar Swaminathan 
8282527734SSukumar Swaminathan /* SLI_2 IOCB Command Set */
8382527734SSukumar Swaminathan #define	CMD_RCV_SEQUENCE64_CX	0x81
8482527734SSukumar Swaminathan #define	CMD_XMIT_SEQUENCE64_CR	0x82
8582527734SSukumar Swaminathan #define	CMD_XMIT_SEQUENCE64_CX	0x83
8682527734SSukumar Swaminathan #define	CMD_XMIT_BCAST64_CN	0x84
8782527734SSukumar Swaminathan #define	CMD_XMIT_BCAST64_CX	0x85
8882527734SSukumar Swaminathan #define	CMD_QUE_RING_BUF64_CN	0x86
8982527734SSukumar Swaminathan #define	CMD_QUE_XRI_BUF64_CX	0x87
9082527734SSukumar Swaminathan #define	CMD_IOCB_CONTINUE64_CN	0x88
9182527734SSukumar Swaminathan #define	CMD_RET_XRI_BUF64_CX	0x89
9282527734SSukumar Swaminathan #define	CMD_ELS_REQUEST64_CR	0x8A
9382527734SSukumar Swaminathan #define	CMD_ELS_REQUEST64_CX	0x8B
9482527734SSukumar Swaminathan #define	CMD_RCV_ELS_REQ64_CX	0x8D
9582527734SSukumar Swaminathan #define	CMD_XMIT_ELS_RSP64_CX	0x95
9682527734SSukumar Swaminathan #define	CMD_XMIT_BLS_RSP64_CX	0x97
9782527734SSukumar Swaminathan #define	CMD_FCP_IWRITE64_CR	0x98
9882527734SSukumar Swaminathan #define	CMD_FCP_IWRITE64_CX	0x99
9982527734SSukumar Swaminathan #define	CMD_FCP_IREAD64_CR	0x9A
10082527734SSukumar Swaminathan #define	CMD_FCP_IREAD64_CX	0x9B
10182527734SSukumar Swaminathan #define	CMD_FCP_ICMND64_CR	0x9C
10282527734SSukumar Swaminathan #define	CMD_FCP_ICMND64_CX	0x9D
10382527734SSukumar Swaminathan #define	CMD_FCP_TSEND64_CX	0x9F	/* FCP_TARGET_MODE */
10482527734SSukumar Swaminathan #define	CMD_FCP_TRECEIVE64_CX	0xA1	/* FCP_TARGET_MODE */
10582527734SSukumar Swaminathan #define	CMD_FCP_TRSP64_CX	0xA3	/* FCP_TARGET_MODE */
10682527734SSukumar Swaminathan #define	CMD_RCV_SEQ64_CX	0xB5	/* SLI3 */
10782527734SSukumar Swaminathan #define	CMD_RCV_ELS64_CX	0xB7	/* SLI3 */
10882527734SSukumar Swaminathan #define	CMD_RCV_CONT64_CX	0xBB	/* SLI3 */
10982527734SSukumar Swaminathan #define	CMD_RCV_SEQ_LIST64_CX	0xC1
11082527734SSukumar Swaminathan #define	CMD_GEN_REQUEST64_CR	0xC2
11182527734SSukumar Swaminathan #define	CMD_GEN_REQUEST64_CX	0xC3
11282527734SSukumar Swaminathan #define	CMD_QUE_RING_LIST64_CN	0xC6
11382527734SSukumar Swaminathan 
11482527734SSukumar Swaminathan 
11582527734SSukumar Swaminathan /*
11682527734SSukumar Swaminathan  * Begin Structure Definitions for IOCB Commands
11782527734SSukumar Swaminathan  */
11882527734SSukumar Swaminathan 
11982527734SSukumar Swaminathan typedef struct
12082527734SSukumar Swaminathan {
12182527734SSukumar Swaminathan #ifdef EMLXS_BIG_ENDIAN
12282527734SSukumar Swaminathan 	uint8_t		statAction;
12382527734SSukumar Swaminathan 	uint8_t		statRsn;
12482527734SSukumar Swaminathan 	uint8_t		statBaExp;
12582527734SSukumar Swaminathan 	uint8_t		statLocalError;
12682527734SSukumar Swaminathan #endif
12782527734SSukumar Swaminathan #ifdef EMLXS_LITTLE_ENDIAN
12882527734SSukumar Swaminathan 	uint8_t		statLocalError;
12982527734SSukumar Swaminathan 	uint8_t		statBaExp;
13082527734SSukumar Swaminathan 	uint8_t		statRsn;
13182527734SSukumar Swaminathan 	uint8_t		statAction;
13282527734SSukumar Swaminathan #endif
13382527734SSukumar Swaminathan 	/* statAction  FBSY reason codes */
13482527734SSukumar Swaminathan #define	FBSY_RSN_MASK	0xF0	/* Rsn stored in upper nibble */
13582527734SSukumar Swaminathan #define	FBSY_FABRIC_BSY	0x10	/* F_bsy due to Fabric BSY */
13682527734SSukumar Swaminathan #define	FBSY_NPORT_BSY	0x30	/* F_bsy due to N_port BSY */
13782527734SSukumar Swaminathan 
13882527734SSukumar Swaminathan 	/* statAction  PBSY action codes */
13982527734SSukumar Swaminathan #define	PBSY_ACTION1	0x01	/* Sequence terminated - retry */
14082527734SSukumar Swaminathan #define	PBSY_ACTION2	0x02	/* Sequence active - retry */
14182527734SSukumar Swaminathan 
14282527734SSukumar Swaminathan 	/* statAction  P/FRJT action codes */
14382527734SSukumar Swaminathan #define	RJT_RETRYABLE	0x01	/* Retryable class of error */
14482527734SSukumar Swaminathan #define	RJT_NO_RETRY	0x02	/* Non-Retryable class of error */
14582527734SSukumar Swaminathan 
14682527734SSukumar Swaminathan 	/* statRsn  LS_RJT reason codes defined in LS_RJT structure */
14782527734SSukumar Swaminathan 
14882527734SSukumar Swaminathan 	/* statRsn  P_BSY reason codes */
14982527734SSukumar Swaminathan #define	PBSY_NPORT_BSY	0x01	/* Physical N_port BSY */
15082527734SSukumar Swaminathan #define	PBSY_RESRCE_BSY	0x03	/* N_port resource BSY */
15182527734SSukumar Swaminathan #define	PBSY_VU_BSY	0xFF	/* See VU field for rsn */
15282527734SSukumar Swaminathan 
15382527734SSukumar Swaminathan 	/* statRsn  P/F_RJT reason codes */
15482527734SSukumar Swaminathan #define	RJT_BAD_D_ID		0x01	/* Invalid D_ID field */
15582527734SSukumar Swaminathan #define	RJT_BAD_S_ID		0x02	/* Invalid S_ID field */
15682527734SSukumar Swaminathan #define	RJT_UNAVAIL_TEMP	0x03	/* N_Port unavailable temp. */
15782527734SSukumar Swaminathan #define	RJT_UNAVAIL_PERM	0x04	/* N_Port unavailable perm. */
15882527734SSukumar Swaminathan #define	RJT_UNSUP_CLASS		0x05	/* Class not supported */
15982527734SSukumar Swaminathan #define	RJT_DELIM_ERR		0x06	/* Delimiter usage error */
16082527734SSukumar Swaminathan #define	RJT_UNSUP_TYPE		0x07	/* Type not supported */
16182527734SSukumar Swaminathan #define	RJT_BAD_CONTROL		0x08	/* Invalid link conrtol */
16282527734SSukumar Swaminathan #define	RJT_BAD_RCTL		0x09	/* R_CTL invalid */
16382527734SSukumar Swaminathan #define	RJT_BAD_FCTL		0x0A	/* F_CTL invalid */
16482527734SSukumar Swaminathan #define	RJT_BAD_OXID		0x0B	/* OX_ID invalid */
16582527734SSukumar Swaminathan #define	RJT_BAD_RXID		0x0C	/* RX_ID invalid */
16682527734SSukumar Swaminathan #define	RJT_BAD_SEQID		0x0D	/* SEQ_ID invalid */
16782527734SSukumar Swaminathan #define	RJT_BAD_DFCTL		0x0E	/* DF_CTL invalid */
16882527734SSukumar Swaminathan #define	RJT_BAD_SEQCNT		0x0F	/* SEQ_CNT invalid */
16982527734SSukumar Swaminathan #define	RJT_BAD_PARM		0x10	/* Param. field invalid */
17082527734SSukumar Swaminathan #define	RJT_XCHG_ERR		0x11	/* Exchange error */
17182527734SSukumar Swaminathan #define	RJT_PROT_ERR		0x12	/* Protocol error */
17282527734SSukumar Swaminathan #define	RJT_BAD_LENGTH		0x13	/* Invalid Length */
17382527734SSukumar Swaminathan #define	RJT_UNEXPECTED_ACK	0x14	/* Unexpected ACK */
17482527734SSukumar Swaminathan #define	RJT_LOGIN_REQUIRED	0x16	/* Login required */
17582527734SSukumar Swaminathan #define	RJT_TOO_MANY_SEQ	0x17	/* Excessive sequences */
17682527734SSukumar Swaminathan #define	RJT_XCHG_NOT_STRT	0x18	/* Exchange not started */
17782527734SSukumar Swaminathan #define	RJT_UNSUP_SEC_HDR	0x19	/* Security hdr not supported */
17882527734SSukumar Swaminathan #define	RJT_UNAVAIL_PATH	0x1A	/* Fabric Path not available */
17982527734SSukumar Swaminathan #define	RJT_VENDOR_UNIQUE	0xFF	/* Vendor unique error */
18082527734SSukumar Swaminathan 
18182527734SSukumar Swaminathan 	/* statRsn  BA_RJT reason codes */
18282527734SSukumar Swaminathan #define	BARJT_BAD_CMD_CODE	0x01	/* Invalid command code */
18382527734SSukumar Swaminathan #define	BARJT_LOGICAL_ERR	0x03	/* Logical error */
18482527734SSukumar Swaminathan #define	BARJT_LOGICAL_BSY	0x05	/* Logical busy */
18582527734SSukumar Swaminathan #define	BARJT_PROTOCOL_ERR	0x07	/* Protocol error */
18682527734SSukumar Swaminathan #define	BARJT_VU_ERR		0xFF	/* Vendor unique error */
18782527734SSukumar Swaminathan 
18882527734SSukumar Swaminathan 	/* LS_RJT reason explanation defined in LS_RJT structure */
18982527734SSukumar Swaminathan 
19082527734SSukumar Swaminathan 	/* BA_RJT reason explanation */
19182527734SSukumar Swaminathan #define	BARJT_EXP_INVALID_ID	0x01	/* Invalid OX_ID/RX_ID */
19282527734SSukumar Swaminathan #define	BARJT_EXP_ABORT_SEQ	0x05	/* Abort SEQ, no more info */
19382527734SSukumar Swaminathan 
19482527734SSukumar Swaminathan 	/* Local Reject errors */
19582527734SSukumar Swaminathan #define	IOERR_SUCCESS			0x00
19682527734SSukumar Swaminathan #define	IOERR_MISSING_CONTINUE		0x01
19782527734SSukumar Swaminathan #define	IOERR_SEQUENCE_TIMEOUT		0x02
19882527734SSukumar Swaminathan #define	IOERR_INTERNAL_ERROR		0x03
19982527734SSukumar Swaminathan #define	IOERR_INVALID_RPI		0x04
20082527734SSukumar Swaminathan #define	IOERR_NO_XRI			0x05
20182527734SSukumar Swaminathan #define	IOERR_ILLEGAL_COMMAND		0x06
20282527734SSukumar Swaminathan #define	IOERR_XCHG_DROPPED		0x07
20382527734SSukumar Swaminathan #define	IOERR_ILLEGAL_FIELD		0x08
20482527734SSukumar Swaminathan /* RESERVED 0x09 */
20582527734SSukumar Swaminathan /* RESERVED 0x0A */
20682527734SSukumar Swaminathan #define	IOERR_RCV_BUFFER_WAITING	0x0B
20782527734SSukumar Swaminathan /* RESERVED 0x0C */
20882527734SSukumar Swaminathan #define	IOERR_TX_DMA_FAILED		0x0D
20982527734SSukumar Swaminathan #define	IOERR_RX_DMA_FAILED		0x0E
21082527734SSukumar Swaminathan #define	IOERR_ILLEGAL_FRAME		0x0F
21182527734SSukumar Swaminathan 
21282527734SSukumar Swaminathan /* RESERVED 0x10 */
21382527734SSukumar Swaminathan #define	IOERR_NO_RESOURCES		0x11
21482527734SSukumar Swaminathan /* RESERVED 0x12 */
21582527734SSukumar Swaminathan #define	IOERR_ILLEGAL_LENGTH		0x13
21682527734SSukumar Swaminathan #define	IOERR_UNSUPPORTED_FEATURE	0x14
21782527734SSukumar Swaminathan #define	IOERR_ABORT_IN_PROGRESS		0x15
21882527734SSukumar Swaminathan #define	IOERR_ABORT_REQUESTED		0x16
21982527734SSukumar Swaminathan #define	IOERR_RCV_BUFFER_TIMEOUT	0x17
22082527734SSukumar Swaminathan #define	IOERR_LOOP_OPEN_FAILURE		0x18
22182527734SSukumar Swaminathan #define	IOERR_RING_RESET		0x19
22282527734SSukumar Swaminathan #define	IOERR_LINK_DOWN			0x1A
22382527734SSukumar Swaminathan #define	IOERR_CORRUPTED_DATA		0x1B
22482527734SSukumar Swaminathan #define	IOERR_CORRUPTED_RPI		0x1C
22582527734SSukumar Swaminathan #define	IOERR_OUT_OF_ORDER_DATA		0x1D
22682527734SSukumar Swaminathan #define	IOERR_OUT_OF_ORDER_ACK		0x1E
22782527734SSukumar Swaminathan #define	IOERR_DUP_FRAME			0x1F
22882527734SSukumar Swaminathan 
22982527734SSukumar Swaminathan #define	IOERR_LINK_CONTROL_FRAME	0x20	/* ACK_N received */
23082527734SSukumar Swaminathan #define	IOERR_BAD_HOST_ADDRESS		0x21
23182527734SSukumar Swaminathan #define	IOERR_RCV_HDRBUF_WAITING	0x22
23282527734SSukumar Swaminathan #define	IOERR_MISSING_HDR_BUFFER	0x23
23382527734SSukumar Swaminathan #define	IOERR_MSEQ_CHAIN_CORRUPTED	0x24
23482527734SSukumar Swaminathan #define	IOERR_ABORTMULT_REQUESTED	0x25
23582527734SSukumar Swaminathan /* RESERVED 0x26 */
23682527734SSukumar Swaminathan /* RESERVED 0x27 */
23782527734SSukumar Swaminathan #define	IOERR_BUFFER_SHORTAGE		0x28
23882527734SSukumar Swaminathan #define	IOERR_XRIBUF_WAITING		0x29
23982527734SSukumar Swaminathan /* RESERVED 0x2A */
24082527734SSukumar Swaminathan #define	IOERR_MISSING_HBQ_ENTRY		0x2B
24182527734SSukumar Swaminathan #define	IOERR_ABORT_EXT_REQ		0x2C
24282527734SSukumar Swaminathan #define	IOERR_CLOSE_EXT_REQ		0x2D
243*8f23e9faSHans Rosenfeld #define	IOERR_INVALID_VPI		0x2E
24482527734SSukumar Swaminathan /* RESERVED 0x2F */
24582527734SSukumar Swaminathan 
24682527734SSukumar Swaminathan #define	IOERR_XRIBUF_MISSING		0x30
24782527734SSukumar Swaminathan #define	IOERR_ASSI_RSP_SUPPRESSED	0x31
24882527734SSukumar Swaminathan /* RESERVED 0x32 - 0x3F */
24982527734SSukumar Swaminathan 
25082527734SSukumar Swaminathan #define	IOERR_ROFFSET_INVAL		0x40
25182527734SSukumar Swaminathan #define	IOERR_ROFFSET_MISSING		0x41
25282527734SSukumar Swaminathan #define	IOERR_INSUF_BUFFER		0x42
25382527734SSukumar Swaminathan #define	IOERR_MISSING_SI		0x43
25482527734SSukumar Swaminathan #define	IOERR_MISSING_ES		0x44
25582527734SSukumar Swaminathan #define	IOERR_INCOMP_XFER		0x45
25682527734SSukumar Swaminathan /* RESERVED 0x46 - 0xFF */
25782527734SSukumar Swaminathan 
25882527734SSukumar Swaminathan 	/* Driver defined */
25982527734SSukumar Swaminathan #define	IOERR_ABORT_TIMEOUT		0xF0
26082527734SSukumar Swaminathan } PARM_ERR;
26182527734SSukumar Swaminathan 
26282527734SSukumar Swaminathan typedef union
26382527734SSukumar Swaminathan {
26482527734SSukumar Swaminathan 	struct
26582527734SSukumar Swaminathan 	{
26682527734SSukumar Swaminathan #ifdef EMLXS_BIG_ENDIAN
26782527734SSukumar Swaminathan 		uint8_t		Rctl;	/* R_CTL field */
26882527734SSukumar Swaminathan 		uint8_t		Type;	/* TYPE field */
26982527734SSukumar Swaminathan 		uint8_t		Dfctl;	/* DF_CTL field */
27082527734SSukumar Swaminathan 		uint8_t		Fctl;	/* Bits 0-7 of IOCB word 5 */
27182527734SSukumar Swaminathan #endif
27282527734SSukumar Swaminathan #ifdef EMLXS_LITTLE_ENDIAN
27382527734SSukumar Swaminathan 		uint8_t		Fctl;	/* Bits 0-7 of IOCB word 5 */
27482527734SSukumar Swaminathan 		uint8_t		Dfctl;	/* DF_CTL field */
27582527734SSukumar Swaminathan 		uint8_t		Type;	/* TYPE field */
27682527734SSukumar Swaminathan 		uint8_t		Rctl;	/* R_CTL field */
27782527734SSukumar Swaminathan #endif
27882527734SSukumar Swaminathan #define	FCP_RTYPE	0x08	/* FCP_TARGET_MODE Type - Rctl */
27982527734SSukumar Swaminathan 
28082527734SSukumar Swaminathan #define	BC		0x02	/* Broadcast Received  - Fctl */
28182527734SSukumar Swaminathan #define	SI		0x04	/* Sequence Initiative */
28282527734SSukumar Swaminathan #define	LA		0x08	/* Ignore Link Attention state */
28382527734SSukumar Swaminathan #define	FSEQ		0x40	/* First Sequence */
28482527734SSukumar Swaminathan #define	LSEQ		0x80	/* Last Sequence */
28582527734SSukumar Swaminathan 	} hcsw;
28682527734SSukumar Swaminathan 	uint32_t	reserved;
28782527734SSukumar Swaminathan } WORD5;
28882527734SSukumar Swaminathan 
28982527734SSukumar Swaminathan 
29082527734SSukumar Swaminathan /* IOCB Command template for a generic response */
29182527734SSukumar Swaminathan typedef struct
29282527734SSukumar Swaminathan {
29382527734SSukumar Swaminathan 	uint32_t	reserved[4];
29482527734SSukumar Swaminathan 	PARM_ERR	perr;
29582527734SSukumar Swaminathan } GENERIC_RSP;
29682527734SSukumar Swaminathan 
29782527734SSukumar Swaminathan 
29882527734SSukumar Swaminathan /* IOCB Command template for XMIT / XMIT_BCAST / RCV_SEQUENCE / XMIT_ELS */
29982527734SSukumar Swaminathan typedef struct
30082527734SSukumar Swaminathan {
30182527734SSukumar Swaminathan 	ULP_BDE		xrsqbde[2];
30282527734SSukumar Swaminathan 	uint32_t	xrsqRo;		/* Starting Relative Offset */
30382527734SSukumar Swaminathan 	WORD5		w5;		/* Header control/status word */
30482527734SSukumar Swaminathan } XR_SEQ_FIELDS;
30582527734SSukumar Swaminathan 
30682527734SSukumar Swaminathan /* IOCB Command template for ELS_REQUEST */
30782527734SSukumar Swaminathan typedef struct
30882527734SSukumar Swaminathan {
30982527734SSukumar Swaminathan 	ULP_BDE		elsReq;
31082527734SSukumar Swaminathan 	ULP_BDE		elsRsp;
31182527734SSukumar Swaminathan #ifdef EMLXS_BIG_ENDIAN
31282527734SSukumar Swaminathan 	uint32_t	word4Rsvd:7;
31382527734SSukumar Swaminathan 	uint32_t	fl:1;
31482527734SSukumar Swaminathan 	uint32_t	myID:24;
31582527734SSukumar Swaminathan 
31682527734SSukumar Swaminathan 	uint32_t	word5Rsvd:8;
31782527734SSukumar Swaminathan 	uint32_t	remoteID:24;
31882527734SSukumar Swaminathan #endif
31982527734SSukumar Swaminathan #ifdef EMLXS_LITTLE_ENDIAN
32082527734SSukumar Swaminathan 	uint32_t	myID:24;
32182527734SSukumar Swaminathan 	uint32_t	fl:1;
32282527734SSukumar Swaminathan 	uint32_t	word4Rsvd:7;
32382527734SSukumar Swaminathan 
32482527734SSukumar Swaminathan 	uint32_t	remoteID:24;
32582527734SSukumar Swaminathan 	uint32_t	word5Rsvd:8;
32682527734SSukumar Swaminathan #endif
32782527734SSukumar Swaminathan } ELS_REQUEST;
32882527734SSukumar Swaminathan 
32982527734SSukumar Swaminathan /* IOCB Command template for RCV_ELS_REQ */
33082527734SSukumar Swaminathan typedef struct
33182527734SSukumar Swaminathan {
33282527734SSukumar Swaminathan 	ULP_BDE		elsReq[2];
33382527734SSukumar Swaminathan 	uint32_t	parmRo;
33482527734SSukumar Swaminathan #ifdef EMLXS_BIG_ENDIAN
33582527734SSukumar Swaminathan 	uint32_t	word5Rsvd:8;
336