825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan * CDDL HEADER START
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan * The contents of this file are subject to the terms of the
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan * Common Development and Distribution License (the "License").
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan * You may not use this file except in compliance with the License.
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld * You can obtain a copy of the license at
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld * http://www.opensource.org/licenses/cddl1.txt.
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan * See the License for the specific language governing permissions
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan * and limitations under the License.
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan * When distributing Covered Code, include this CDDL HEADER in each
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan * If applicable, add the following below this CDDL HEADER, with the
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan * fields enclosed by brackets "[]" replaced with your own identifying
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan * information: Portions Copyright [yyyy] [name of copyright owner]
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan * CDDL HEADER END
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld * Copyright (c) 2004-2012 Emulex. All rights reserved.
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan * Use is subject to license terms.
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* SLI 2/3 Mailbox defines */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#endif /* MBOX_EXT_SUPPORT */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* ==== Mailbox Commands ==== */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define MBX_SHUTDOWN 0x00 /* terminate testing */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define MBX_UNREG_LOGIN 0x14 /* SLI2/3 */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan * Define Status
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Driver special codes */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define MBX_DRIVER_RESERVED 0xF9 /* Set to lowest drv status */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan * flags for EMLXS_SLI_ISSUE_MBOX_CMD()
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define MBX_POLL 0x01 /* poll mailbox till command done, */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan /* then return */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define MBX_SLEEP 0x02 /* sleep till mailbox intr cmpl */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan /* wakes thread up */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define MBX_WAIT 0x03 /* wait for comand done, then return */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define MBX_NOWAIT 0x04 /* issue command then return immediately */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define MBX_BOOTSTRAP 0x80 /* issue a command on the bootstrap mbox */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan * Begin Structure Definitions for Mailbox Commands
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t ldflag:1; /* Set in SRAM descriptor */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t ldcount:7; /* For use by program load */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t kver:4; /* Kernel compatibility version */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t SMver:4; /* Sequence Manager version */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan /* 0 if none */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t ENDECver:4; /* ENDEC+ version, 0 if none */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t BIUver:4; /* BIU version, 0 if none */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t BIUver:4; /* BIU version, 0 if none */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t ENDECver:4; /* ENDEC+ version, 0 if none */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t SMver:4; /* Sequence Manager version */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan /* 0 if none */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t kver:4; /* Kernel compatibility version */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t ldcount:7; /* For use by program load */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t ldflag:1; /* Set in SRAM descriptor */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure used for a HBQ entry */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t HBQ_num_mask; /* number of mask entries in */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan /* port array */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t HBQ_recvNotify; /* Rcv buffer notification */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t HBQ_numEntries; /* # of entries in HBQ */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t HBQ_headerLen; /* 0 if not profile 4 or 5 */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t HBQ_logEntry; /* Set to 1 if this HBQ used */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan /* for LogEntry */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t HBQ_profile; /* Selection profile 0=all, */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan /* 7=logentry */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t HBQ_ringMask; /* Binds HBQ to a ring e.g. */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan /* Ring0=b0001, ring2=b0100 */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t HBQ_id; /* index of this hbq in ring */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan /* of HBQs[] */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t HBQ_PutIdx_next; /* Index to next HBQ slot to */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t HBQ_PutIdx; /* HBQ slot to use */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t HBQ_GetIdx; /* Local copy of Get index */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan /* from Port */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint16_t HBQ_PostBufCnt; /* Current number of entries */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan MATCHMAP *HBQ_PostBufs[EMLXS_MAX_HBQ_BUFFERS];
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan MATCHMAP HBQ_host_buf; /* HBQ host buffer for HBQEs */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command LOAD_SM and DOWN_LOAD */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define PROGRAM_FLASH 0 /* erase_or_prog */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command READ_NVPARM (02) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Good for SLI2/3 and SLI4 */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t rsvd1[3]; /* Read as all one's */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t rsvd2; /* Read as all zero's */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t rsvd3[21]; /* Read as all one's */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command WRITE_NVPARMS (03) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Good for SLI2/3 and SLI4 */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t rsvd1[3]; /* Must be all one's */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t rsvd2; /* Must be all zero's */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t rsvd3[21]; /* Must be all one's */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command RUN_BIU_DIAG64 (0x84) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Good for SLI2/3 and SLI4 */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command INIT_LINK (05) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Good for SLI2/3 and SLI4 */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t lipsr_AL_PA:8; /* AL_PA to issue Lip Selective */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan /* Reset to */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t lipsr_AL_PA:8; /* AL_PA to issue Lip Selective */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan /* Reset to */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint8_t fabric_AL_PA; /* If using a Fabric Assigned AL_PA */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint8_t fabric_AL_PA; /* If using a Fabric Assigned AL_PA */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define FLAGS_LOCAL_LB 0x01 /* link_flags (=1) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan /* ENDEC loopback */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define FLAGS_TOPOLOGY_MODE_LOOP_PT 0x00 /* Attempt loop then pt-pt */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define FLAGS_TOPOLOGY_MODE_PT_PT 0x02 /* Attempt pt-pt only */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define FLAGS_TOPOLOGY_MODE_LOOP 0x04 /* Attempt loop only */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define FLAGS_TOPOLOGY_MODE_PT_LOOP 0x06 /* Attempt pt-pt then loop */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define FLAGS_LIRP_LILP 0x80 /* LIRP / LILP is disabled */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define FLAGS_TOPOLOGY_FAILOVER 0x0400 /* Bit 10 */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define FLAGS_LINK_SPEED 0x0800 /* Bit 11 */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define FLAGS_PREABORT_RETURN 0x4000 /* Bit 14 */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define LINK_SPEED_AUTO 0 /* Auto selection */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command DOWN_LINK (06) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Good for SLI2/3 and SLI4 */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command CONFIG_LINK (07) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command PART_SLIM (08) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command CONFIG_RING (09) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command RESET_RING (10) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command READ_CONFIG (11) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Good for SLI2/3 only */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan /* Defines for topology (defined previously) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* E2E supported on adapters >= 8GB */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define LMT_E2E_CAPABLE (LMT_8GB_CAPABLE|LMT_10GB_CAPABLE)
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command READ_CONFIG(0x11) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Good for SLI4 only */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command READ_RCONFIG (12) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command READ_SPARM (13) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command READ_SPARM64 (0x8D) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Good for SLI2/3 and SLI4 */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan ULP_BDE sp; /* This BDE points to SERV_PARM */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan /* structure */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command READ_STATUS (14) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Good for SLI2/3 and SLI4 */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command READ_RPI (15) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command READ_RPI64 (0x8F) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command READ_XRI (16) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command READ_REV (17) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Good for SLI2/3 only */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command READ_REV (17) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Good for SLI4 only */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define EMLXS_DCBX_MODE_CIN 0 /* Mapped to nonFIP mode */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define EMLXS_DCBX_MODE_CEE 1 /* Mapped to FIP mode */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command READ_LINK_STAT (18) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Good for SLI2/3 and SLI4 */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command REG_LOGIN (19) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command REG_LOGIN64 (0x93) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command REG_RPI (0x93) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Good for SLI2/3 and SLI4 */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Word 30 contents for REG_LOGIN */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command UNREG_LOGIN (0x14) - SLI2/3 */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command UNREG_RPI (0x14) - SLI4 */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command REG_FCFI (0xA0) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Good for SLI4 only */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Defines for mam */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define EMLXS_REG_FCFI_MAM_SPMA 1 /* Server Provided MAC Address */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define EMLXS_REG_FCFI_MAM_FPMA 2 /* Fabric Provided MAC Address */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command UNREG_FCFI (0xA2) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Good for SLI4 only */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command RESUME_RPI (0x9E) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Good for SLI4 only */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command UNREG_D_ID (0x23) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command READ_LA (21) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command READ_LA64 (0x95) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define AT_RESERVED 0x00 /* Reserved - attType */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define AT_LINK_DOWN 0x02 /* Link is down */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define LT_PORT_INIT 0x00 /* An L_PORT initing (F7, AL_PS) - lipType */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define LT_PORT_ERR 0x01 /* Err @L_PORT rcv'er (F8, AL_PS) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define LT_RESET_APORT 0x02 /* Lip Reset of some other port */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define LT_RESET_MYPORT 0x03 /* Lip Reset of my port */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan /* topology */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define TOPOLOGY_PT_PT 0x01 /* Topology is pt-pt / pt-fabric */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define TOPOLOGY_LOOP 0x02 /* Topology is FC-AL (private) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan ULP_BDE lilpBde; /* This BDE points to a */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan /* 128 byte buffer to store */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan /* the LILP AL_PA position */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan /* map into */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define LA_10GHZ_LINK 0x40 /* lnkSpeed */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command CLEAR_LA (22) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command DUMP */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Good for SLI2/3 only */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command DUMP */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Good for SLI4 only */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan * Dump region ID
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command UPDATE_CFG */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Good for SLI2/3 and SLI4 */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command DEL_LD_ENTRY (29) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command LOAD_AREA (81) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command LOAD_EXP_ROM (9C) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command CONFIG_HBQ (7C) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t recvNotify:1; /* Receive Notification */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t numMask:8; /* # Mask Entries */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t profile:8; /* Selection Profile */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t profile:8; /* Selection Profile */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t numMask:8; /* # Mask Entries */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t recvNotify:1; /* Receive Notification */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command REG_VPI(0x96) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Good for SLI2/3 and SLI4 */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command INIT_VPI(0xA3) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Good for SLI4 only */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command UNREG_VPI (0x97) */
e2ca2865a6870e9c6cbef6becbcc68cafde64537Sukumar Swaminathan/* Good for SLI2/3 */
e2ca2865a6870e9c6cbef6becbcc68cafde64537Sukumar Swaminathan/* Structure for MB Command UNREG_VPI (0x97) */
e2ca2865a6870e9c6cbef6becbcc68cafde64537Sukumar Swaminathan/* Good for SLI4 */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command REG_VFI(0x9F) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Good for SLI4 only */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* CHANGE with next firmware drop */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* CHANGE with next firmware drop */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command INIT_VFI(0xA4) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Good for SLI4 only */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command UNREG_VFI (0xA1) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Good for SLI4 only */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command CONFIG_PORT (0x88) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t pcbLen:24; /* bit 23:0 of memory based port */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan /* config block */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t pcbLen:24; /* bit 23:0 of memory based port */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan /* config block */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t pcbLow; /* bit 31:0 of memory based port */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan /* config block */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t pcbHigh; /* bit 63:32 of memory based port */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan /* config block */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t hps:1; /* Host pointers in SLIM */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t hps:1; /* Host pointers in SLIM */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t cmv:1; /* Configure Max VPIs */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t ccrp:1; /* Config Command Ring Polling */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t csah:1; /* Configure Synchronous Abort */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan /* Handling */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t chbs:1; /* Cofigure Host Backing store */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t cinb:1; /* Enable Interrupt Notification */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t cerbm:1; /* Configure Enhanced Receive */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan /* Buffer Management */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t cmx:1; /* Configure Max XRIs */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t cmr:1; /* Configure Max RPIs */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t cmr:1; /* Configure Max RPIs */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t cmx:1; /* Configure Max XRIs */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t cerbm:1; /* Configure Enhanced Receive */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan /* Buffer Management */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t cinb:1; /* Enable Interrupt Notification */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t chbs:1; /* Cofigure Host Backing store */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t csah:1; /* Configure Synchronous Abort */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan /* Handling */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t ccrp:1; /* Config Command Ring Polling */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t cmv:1; /* Configure Max VPIs */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld uint32_t gdss:1; /* Configure Data Security SLI */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t gcrp:1; /* Grant Command Ring Polling */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t gsah:1; /* Grant Synchronous Abort Handling */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t ghbs:1; /* Grant Host Backing Store */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t ginb:1; /* Grant Interrupt Notification Block */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t gerbm:1; /* Grant ERBM Request */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t gerbm:1; /* Grant ERBM Request */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t ginb:1; /* Grant Interrupt Notification Block */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t ghbs:1; /* Grant Host Backing Store */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t gsah:1; /* Grant Synchronous Abort Handling */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t gcrp:1; /* Grant Command Ring Polling */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld uint32_t gdss:1; /* Configure Data Security SLI */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t max_rpi:16; /* Max RPIs Port should configure */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t max_xri:16; /* Max XRIs Port should configure */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t max_xri:16; /* Max XRIs Port should configure */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t max_rpi:16; /* Max RPIs Port should configure */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t max_hbq:16; /* Max HBQs Host expect to configure */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld uint32_t rsvd4:16; /* Max HBQs Host expect to configure */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld uint32_t rsvd4:16; /* Max HBQs Host expect to configure */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t max_hbq:16; /* Max HBQs Host expect to configure */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t vpi_max:16; /* Max number of virt N-Ports */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t vpi_max:16; /* Max number of virt N-Ports */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command REQUEST_FEATURES (0x9D) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Good for SLI4 only */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld#define SLI4_FEATURE_INHIBIT_AUTO_ABTS_R 0x0200
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* SLI-2 Port Control Block */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* SLIM POINTER */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* NEW_FEATURE */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* NEW_FEATURE */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* NEW_FEATURE */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Union of all Mailbox Command types */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan LOAD_SM_VAR varLdSM; /* cmd = 1 (LOAD_SM) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan READ_NV_VAR varRDnvp; /* cmd = 2 (READ_NVPARMS) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan WRITE_NV_VAR varWTnvp; /* cmd = 3 (WRITE_NVPARMS) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan BIU_DIAG_VAR varBIUdiag; /* cmd = 4 (RUN_BIU_DIAG) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan INIT_LINK_VAR varInitLnk; /* cmd = 5 (INIT_LINK) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan DOWN_LINK_VAR varDwnLnk; /* cmd = 6 (DOWN_LINK) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan CONFIG_LINK varCfgLnk; /* cmd = 7 (CONFIG_LINK) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan PART_SLIM_VAR varSlim; /* cmd = 8 (PART_SLIM) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan CONFIG_RING_VAR varCfgRing; /* cmd = 9 (CONFIG_RING) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan RESET_RING_VAR varRstRing; /* cmd = 10 (RESET_RING) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan READ_CONFIG_VAR varRdConfig; /* cmd = 11 (READ_CONFIG) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan READ_RCONF_VAR varRdRConfig; /* cmd = 12 (READ_RCONFIG) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan READ_SPARM_VAR varRdSparm; /* cmd = 13 (READ_SPARM(64)) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan READ_STATUS_VAR varRdStatus; /* cmd = 14 (READ_STATUS) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan READ_RPI_VAR varRdRPI; /* cmd = 15 (READ_RPI(64)) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan READ_XRI_VAR varRdXRI; /* cmd = 16 (READ_XRI) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan READ_REV_VAR varRdRev; /* cmd = 17 (READ_REV) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan READ_LNK_VAR varRdLnk; /* cmd = 18 (READ_LNK_STAT) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan REG_LOGIN_VAR varRegLogin; /* cmd = 19 (REG_LOGIN(64)) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan UNREG_LOGIN_VAR varUnregLogin; /* cmd = 20 (UNREG_LOGIN) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan READ_LA_VAR varReadLA; /* cmd = 21 (READ_LA(64)) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan CLEAR_LA_VAR varClearLA; /* cmd = 22 (CLEAR_LA) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan DUMP_VAR varDmp; /* Warm Start DUMP mbx cmd */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan UPDATE_CFG_VAR varUpdateCfg; /* cmd = 0x1b Warm Start */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan /* UPDATE_CFG cmd */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan DEL_LD_ENTRY_VAR varDelLdEntry; /* cmd = 0x1d (DEL_LD_ENTRY) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan UNREG_D_ID_VAR varUnregDID; /* cmd = 0x23 (UNREG_D_ID) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan CONFIG_FARP_VAR varCfgFarp; /* cmd = 0x25 (CONFIG_FARP) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan CONFIG_MSI_VAR varCfgMSI; /* cmd = 0x90 (CONFIG_MSI) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan CONFIG_MSIX_VAR varCfgMSIX; /* cmd = 0x30 (CONFIG_MSIX) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan CONFIG_HBQ_VAR varCfgHbq; /* cmd = 0x7C (CONFIG_HBQ) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan LOAD_AREA_VAR varLdArea; /* cmd = 0x81 (LOAD_AREA) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan CONFIG_PORT_VAR varCfgPort; /* cmd = 0x88 (CONFIG_PORT) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan LOAD_EXP_ROM_VAR varLdExpRom; /* cmd = 0x9C (LOAD_XP_ROM) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan REG_VPI_VAR varRegVpi; /* cmd = 0x96 (REG_VPI) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan UNREG_VPI_VAR varUnregVpi; /* cmd = 0x97 (UNREG_VPI) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan READ_EVT_LOG_VAR varRdEvtLog; /* cmd = 0x38 (READ_EVT_LOG) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan LOG_STATUS_VAR varLogStat; /* cmd = 0x37 */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan * SLI-2 specific structures
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathantypedef volatile struct
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint8_t mbxOwner:1; /* Low order bit first word */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint8_t mbxOwner:1; /* Low order bit first word */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* SLI4 IOCTL Mailbox */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* ALL SLI4 specific mbox commands have a standard request /response header */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Word 0 is just like SLI 3 */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define EMLXS_MAX_NONEMBED_SIZE (1024 * 64)
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* SLI_CONFIG Mailbox commands */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define COMMON_OPCODE_WRITE_FLASHROM 0x07
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define COMMON_OPCODE_GET_CNTL_ATTRIB 0x20
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define COMMON_OPCODE_QUERY_FIRMWARE_CONFIG 0x3A
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld#define COMMON_OPCODE_SET_PHYSICAL_LINK_CFG_V1 0x3E
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld#define COMMON_OPCODE_GET_PHYSICAL_LINK_CFG_V1 0x47
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld#define COMMON_OPCODE_GET_CNTL_ADDL_ATTRIB 0x79
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld#define COMMON_OPCODE_GET_MR_PROFILE_CAPS 0xA2
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld#define COMMON_OPCODE_SET_MR_PROFILE_CAPS 0xA3
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld#define COMMON_OPCODE_SET_FACTORY_PROFILE_CFG 0xA9
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define FCOE_OPCODE_CFG_POST_SGL_PAGES 0x03
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define FCOE_OPCODE_POST_HDR_TEMPLATES 0x0B
a9800beb32c1006bb21c8da39e0180ea440b7badGarrett D'Amore#define FCOE_OPCODE_REDISCOVER_FCF_TABLE 0x10
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define MGMT_FLASHROM_OPTYPE_ISCSI_FIRMWARE 0
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define MGMT_FLASHROM_OPTYPE_ISCSI_BIOS 2
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define MGMT_FLASHROM_OPTYPE_ROM_OFFSET 7
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define MGMT_FLASHROM_OPTYPE_ISCSI_BACKUP 9
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define MGMT_FLASHROM_OPTYPE_FCOE_FIRMWARE 10
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define MGMT_FLASHROM_OPTYPE_FCOE_BACKUP 11
a9800beb32c1006bb21c8da39e0180ea440b7badGarrett D'Amore#define MGMT_FLASHROM_OPTYPE_NCSI_FIRMWARE 13
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld#define MGMT_FLASHROM_OPTYPE_PHY_FIRMWARE 0xff /* Driver defined */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t data_buffer_size; /* Align to 4KB */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t data_buffer; /* image starts here */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeldtypedef struct
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld/* phy_type */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld#define PHY_AEL_2020 0x1 /* eluris/Netlogic */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld#define PHY_LSI_BRCM1 0x2 /* Peak pre-production board */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld#define PHY_LSI_BRCM2 0x3 /* Peak production board */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld#define PHY_SOLARFLARE 0x4 /* Dell recommended */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld#define PHY_BRCM_5931 0x7 /* Broadcom Phy used by HP LOM */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld#define PHY_BE3_INTERNAL_10GB 0x8 /* Internal 10GbPHY in BE3 */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld#define PHY_BE3_INTERNAL_1GB 0x9 /* Internal 1Gb PHY in BE3 */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld#define PHY_TN_2022 0xa /* Teranetics dual port 65nm PHY */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld#define PHY_MARVELL_88E1340 0xb /* Marvel 1G PHY */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld#define PHY_MARVELL_88E1322 0xc /* Marvel 1G PHY */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld#define PHY_TN_8022 0xd /* Teranetics dual port 40nm PHY */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld/* interface_type */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld#define INTERFACE_10GB_DISABLED 0xff /* Interface type not supported */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeldtypedef struct
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeldtypedef struct
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeldtypedef struct
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld char object_name[(4 * 26)]; /* word 6 - 31 */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeldtypedef struct
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld char object_name[(4 * 26)]; /* word 6 - 31 */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeldtypedef struct
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* IOCTL_COMMON_QUERY_FIRMWARE_CONFIG */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathantypedef struct _IOCTL_COMMON_QUERY_FIRMWARE_CONFIG
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* IOCTL_FCOE_READ_FCF_TABLE */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* defines for mac_address_provider */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define EMLXS_MAM_BOTH 0 /* Both SPMA and FPMA */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define EMLXS_MAM_FPMA 1 /* Fabric Provided MAC Address */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define EMLXS_MAM_SPMA 2 /* Server Provided MAC Address */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* IOCTL_FCOE_ADD_FCF_TABLE */
a9800beb32c1006bb21c8da39e0180ea440b7badGarrett D'Amore/* IOCTL_FCOE_DELETE_FCF_TABLE */
a9800beb32c1006bb21c8da39e0180ea440b7badGarrett D'Amoretypedef struct
a9800beb32c1006bb21c8da39e0180ea440b7badGarrett D'Amore/* IOCTL_FCOE_REDISCOVER_FCF_TABLE */
a9800beb32c1006bb21c8da39e0180ea440b7badGarrett D'Amoretypedef struct
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* IOCTL_COMMON_NOP */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Context for EQ create */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* define for Count field */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* define for Size field */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* define for DelayMullt - used for interrupt coalescing */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Context for CQ create */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* define for Count field */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Context for MQ create */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* define for Size field */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Context for RQ create */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld/* RQ PageSize */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* IOCTL_COMMON_EQ_CREATE */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeldtypedef struct
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld/* SliFamily values */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld/* IOCTL_COMMON_SLI4_PARAMS */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeldtypedef struct
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld/* IOCTL_COMMON_EXTENTS */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeldtypedef struct
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* IOCTL_COMMON_CQ_CREATE */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld/* IOCTL_COMMON_CQ_CREATE_V2 */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeldtypedef struct
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* IOCTL_COMMON_MQ_CREATE */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld/* IOCTL_COMMON_MQ_CREATE_EXT */
a9800beb32c1006bb21c8da39e0180ea440b7badGarrett D'Amoretypedef struct
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld/* IOCTL_COMMON_MQ_CREATE_EXT_V1 */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeldtypedef struct
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* IOCTL_FCOE_RQ_CREATE */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld/* IOCTL_FCOE_RQ_CREATE_V1 */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeldtypedef struct
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* IOCTL_FCOE_WQ_CREATE */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld/* IOCTL_FCOE_WQ_CREATE_V1 */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeldtypedef struct
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld/* PageSize */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* IOCTL_FCOE_CFG_POST_SGL_PAGES */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan BE_PHYS_ADDR sgl_page0; /* 1st page per XRI */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan BE_PHYS_ADDR sgl_page1; /* 2nd page per XRI */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* IOCTL_FCOE_POST_HDR_TEMPLATES */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathantypedef struct _IOCTL_FCOE_POST_HDR_TEMPLATES
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define EMLXS_IOCTL_DCBX_MODE_CEE 0 /* Mapped to FIP mode */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define EMLXS_IOCTL_DCBX_MODE_CIN 1 /* Mapped to nonFIP mode */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* IOCTL_DCBX_GET_DCBX_MODE */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* IOCTL_DCBX_SET_DCBX_MODE */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* IOCTL_COMMON_GET_CNTL_ATTRIB */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan MGMT_CONTROLLER_ATTRIB cntl_attributes_info;
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld IOCTL_COMMON_MQ_CREATE_EXT_V1 MQCreateExtVar1;
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan IOCTL_FCOE_CFG_POST_SGL_PAGES PostSGLVar;
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan IOCTL_COMMON_GET_CNTL_ATTRIB GetCntlAttributesVar;
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan IOCTL_FCOE_READ_FCF_TABLE ReadFCFTableVar;
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan IOCTL_FCOE_ADD_FCF_TABLE AddFCFTableVar;
a9800beb32c1006bb21c8da39e0180ea440b7badGarrett D'Amore IOCTL_FCOE_REDISCOVER_FCF_TABLE RediscoverFCFTableVar;
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Structure for MB Command SLI_CONFIG(0x9b) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* Good for SLI4 only */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define IOCTL_HEADER_SZ (4 * sizeof (uint32_t))
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan READ_NV_VAR varRDnvp; /* cmd = x02 (READ_NVPARMS) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan INIT_LINK_VAR varInitLnk; /* cmd = x05 (INIT_LINK) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan CONFIG_LINK varCfgLnk; /* cmd = x07 (CONFIG_LINK) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan READ_REV4_VAR varRdRev4; /* cmd = x11 (READ_REV) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan READ_LNK_VAR varRdLnk; /* cmd = x12 (READ_LNK_STAT) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan DUMP4_VAR varDmp4; /* cmd = x17 (DUMP) */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld UPDATE_CFG_VAR varUpdateCfg; /* cmd = x1b (update Cfg) */
8f23e9fa8abcb5857661066b954e63400d589b65Hans Rosenfeld BIU_DIAG_VAR varBIUdiag; /* cmd = x84 (RUN_BIU_DIAG64) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan READ_SPARM_VAR varRdSparm; /* cmd = x8D (READ_SPARM64) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan REG_FCFI_VAR varRegFCFI; /* cmd = xA0 (REG_FCFI) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan UNREG_FCFI_VAR varUnRegFCFI; /* cmd = xA2 (UNREG_FCFI) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan READ_LA_VAR varReadLA; /* cmd = x95 (READ_LA64) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan READ_CONFIG4_VAR varRdConfig4; /* cmd = x0B (READ_CONFIG) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan RESUME_RPI_VAR varResumeRPI; /* cmd = x9E (RESUME_RPI) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan REG_LOGIN_VAR varRegLogin; /* cmd = x93 (REG_RPI) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan UNREG_LOGIN_VAR varUnregLogin; /* cmd = x14 (UNREG_RPI) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan REG_VPI_VAR varRegVPI4; /* cmd = x96 (REG_VPI) */
e2ca2865a6870e9c6cbef6becbcc68cafde64537Sukumar Swaminathan UNREG_VPI_VAR4 varUnRegVPI4; /* cmd = x97 (UNREG_VPI) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan REG_VFI_VAR varRegVFI4; /* cmd = x9F (REG_VFI) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan UNREG_VFI_VAR varUnRegVFI4; /* cmd = xA1 (UNREG_VFI) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan REQUEST_FEATURES_VAR varReqFeatures; /* cmd = x9D (REQ_FEATURES) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan SLI_CONFIG_VAR varSLIConfig; /* cmd = x9B (SLI_CONFIG) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan INIT_VPI_VAR varInitVPI4; /* cmd = xA3 (INIT_VPI) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan INIT_VFI_VAR varInitVFI4; /* cmd = xA4 (INIT_VFI) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathantypedef volatile struct
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint8_t mbxOwner:1; /* Low order bit first word */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint8_t mbxOwner:1; /* Low order bit first word */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan * End Structure Definitions for Mailbox Commands
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan volatile uint32_t mbox[MAILBOX_CMD_MAX_WSIZE];
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan /* Defferred handling pointers */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan /* structure */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan /* structure */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan /* structure */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan /* structure */
a9800beb32c1006bb21c8da39e0180ea440b7badGarrett D'Amore void *context; /* ptr to mbox context data */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#define MBQ_COMPLETED 0x00010000 /* Used for MBX_SLEEP */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint8_t *extbuf; /* ptr to mailbox ext buffer */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan uint32_t extsize; /* size of mailbox ext buffer */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#endif /* MBOX_EXT_SUPPORT */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* We currently do not support IOCBs in SLI1 mode */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#endif /* MBOX_EXT_SUPPORT */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan (sizeof (MAILBOX) + MBOX_EXTENSION_SIZE))];
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#endif /* MBOX_EXT_SUPPORT */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan/* def for new 2MB Flash (Pegasus ...) */
825277341c15b6b0d2c4b8b622ae7b1d2bdc0390Sukumar Swaminathan#endif /* _EMLXS_MBOX_H */