1fcf3ce44SJohn Forte /* 2fcf3ce44SJohn Forte * CDDL HEADER START 3fcf3ce44SJohn Forte * 4fcf3ce44SJohn Forte * The contents of this file are subject to the terms of the 5fcf3ce44SJohn Forte * Common Development and Distribution License (the "License"). 6fcf3ce44SJohn Forte * You may not use this file except in compliance with the License. 7fcf3ce44SJohn Forte * 8fcf3ce44SJohn Forte * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9fcf3ce44SJohn Forte * or http://www.opensolaris.org/os/licensing. 10fcf3ce44SJohn Forte * See the License for the specific language governing permissions 11fcf3ce44SJohn Forte * and limitations under the License. 12fcf3ce44SJohn Forte * 13fcf3ce44SJohn Forte * When distributing Covered Code, include this CDDL HEADER in each 14fcf3ce44SJohn Forte * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15fcf3ce44SJohn Forte * If applicable, add the following below this CDDL HEADER, with the 16fcf3ce44SJohn Forte * fields enclosed by brackets "[]" replaced with your own identifying 17fcf3ce44SJohn Forte * information: Portions Copyright [yyyy] [name of copyright owner] 18fcf3ce44SJohn Forte * 19fcf3ce44SJohn Forte * CDDL HEADER END 20fcf3ce44SJohn Forte */ 21fcf3ce44SJohn Forte 22fcf3ce44SJohn Forte /* 23*291a2b48SSukumar Swaminathan * Copyright 2009 Emulex. All rights reserved. 24fcf3ce44SJohn Forte * Use is subject to License terms. 25fcf3ce44SJohn Forte */ 26fcf3ce44SJohn Forte 27fcf3ce44SJohn Forte 28fcf3ce44SJohn Forte #ifndef _EMLXS_HW_H 29fcf3ce44SJohn Forte #define _EMLXS_HW_H 30fcf3ce44SJohn Forte 31fcf3ce44SJohn Forte #ifdef __cplusplus 32fcf3ce44SJohn Forte extern "C" { 33fcf3ce44SJohn Forte #endif 34fcf3ce44SJohn Forte 35fcf3ce44SJohn Forte #ifdef NPIV_SUPPORT 36*291a2b48SSukumar Swaminathan #define MAX_VPORTS 256 /* Max virtual ports per HBA */ 37*291a2b48SSukumar Swaminathan /* (includes physical port) */ 38fcf3ce44SJohn Forte #define MAX_VPORTS_LIMITED 101 39fcf3ce44SJohn Forte #else 40*291a2b48SSukumar Swaminathan #define MAX_VPORTS 1 /* Max virtual ports per HBA */ 41*291a2b48SSukumar Swaminathan /* (includes physical port) */ 42fcf3ce44SJohn Forte #define MAX_VPORTS_LIMITED 1 43fcf3ce44SJohn Forte #endif /* NPIV_SUPPORT */ 44fcf3ce44SJohn Forte 45fcf3ce44SJohn Forte 46*291a2b48SSukumar Swaminathan #define FC_MAX_TRANSFER 0x40000 /* Max transfer size per */ 47*291a2b48SSukumar Swaminathan /* operation */ 48fcf3ce44SJohn Forte 49fcf3ce44SJohn Forte #define MAX_RINGS_AVAILABLE 4 /* # rings available */ 50fcf3ce44SJohn Forte #define MAX_RINGS 4 /* Max # rings used */ 51fcf3ce44SJohn Forte 52fcf3ce44SJohn Forte 53fcf3ce44SJohn Forte #define PCB_SIZE 128 54fcf3ce44SJohn Forte #define MBOX_SIZE 256 55fcf3ce44SJohn Forte #define MBOX_EXTENSION_OFFSET MBOX_SIZE 56fcf3ce44SJohn Forte 57fcf3ce44SJohn Forte 58fcf3ce44SJohn Forte #ifdef MBOX_EXT_SUPPORT 59fcf3ce44SJohn Forte #define MBOX_EXTENSION_SIZE 1024 60fcf3ce44SJohn Forte #else 61fcf3ce44SJohn Forte #define MBOX_EXTENSION_SIZE 0 62*291a2b48SSukumar Swaminathan #endif /* MBOX_EXT_SUPPORT */ 63fcf3ce44SJohn Forte 64fcf3ce44SJohn Forte 65fcf3ce44SJohn Forte #define SLIM_IOCB_CMD_R0_ENTRIES 128 /* SLI FCP cmd ring entries */ 66fcf3ce44SJohn Forte #define SLIM_IOCB_RSP_R0_ENTRIES 128 /* SLI FCP rsp ring entries */ 67*291a2b48SSukumar Swaminathan #define SLIM_IOCB_CMD_R1_ENTRIES 32 /* SLI IP cmd ring entries */ 68*291a2b48SSukumar Swaminathan #define SLIM_IOCB_RSP_R1_ENTRIES 32 /* SLI IP rsp ring entries */ 69*291a2b48SSukumar Swaminathan #define SLIM_IOCB_CMD_R2_ENTRIES 16 /* SLI ELS cmd ring entries */ 70*291a2b48SSukumar Swaminathan #define SLIM_IOCB_RSP_R2_ENTRIES 16 /* SLI ELS rspe ring entries */ 71*291a2b48SSukumar Swaminathan #define SLIM_IOCB_CMD_R3_ENTRIES 8 /* SLI CT cmd ring entries */ 72*291a2b48SSukumar Swaminathan #define SLIM_IOCB_RSP_R3_ENTRIES 8 /* SLI CT rsp ring entries */ 73*291a2b48SSukumar Swaminathan 74*291a2b48SSukumar Swaminathan /* 75*291a2b48SSukumar Swaminathan * Total: 184 Cmd's + 184 Rsp's = 368 76*291a2b48SSukumar Swaminathan * Command and response entry counts are not required to be equal 77*291a2b48SSukumar Swaminathan */ 78fcf3ce44SJohn Forte 79*291a2b48SSukumar Swaminathan #define SLIM_IOCB_CMD_ENTRIES (SLIM_IOCB_CMD_R0_ENTRIES + \ 80*291a2b48SSukumar Swaminathan SLIM_IOCB_CMD_R1_ENTRIES + \ 81*291a2b48SSukumar Swaminathan SLIM_IOCB_CMD_R2_ENTRIES + \ 82*291a2b48SSukumar Swaminathan SLIM_IOCB_CMD_R3_ENTRIES) 83fcf3ce44SJohn Forte 84*291a2b48SSukumar Swaminathan #define SLIM_IOCB_RSP_ENTRIES (SLIM_IOCB_RSP_R0_ENTRIES + \ 85*291a2b48SSukumar Swaminathan SLIM_IOCB_RSP_R1_ENTRIES + \ 86*291a2b48SSukumar Swaminathan SLIM_IOCB_RSP_R2_ENTRIES + \ 87*291a2b48SSukumar Swaminathan SLIM_IOCB_RSP_R3_ENTRIES) 88fcf3ce44SJohn Forte 89*291a2b48SSukumar Swaminathan #define SLIM_IOCB_ENTRIES (SLIM_IOCB_CMD_ENTRIES + \ 90*291a2b48SSukumar Swaminathan SLIM_IOCB_RSP_ENTRIES) 91fcf3ce44SJohn Forte 92fcf3ce44SJohn Forte 93fcf3ce44SJohn Forte /* SLI1 Definitions */ 94*291a2b48SSukumar Swaminathan #define SLI_SLIM1_SIZE 4096 /* Fixed size memory */ 95fcf3ce44SJohn Forte 96fcf3ce44SJohn Forte 97fcf3ce44SJohn Forte /* SLI2 Definitions */ 98fcf3ce44SJohn Forte #define SLI2_IOCB_CMD_SIZE 32 99fcf3ce44SJohn Forte #define SLI2_IOCB_RSP_SIZE 32 100*291a2b48SSukumar Swaminathan #define SLI2_IOCB_MAX_SIZE ((SLI2_IOCB_CMD_SIZE * \ 101*291a2b48SSukumar Swaminathan SLIM_IOCB_CMD_ENTRIES) + \ 102*291a2b48SSukumar Swaminathan (SLI2_IOCB_RSP_SIZE * \ 103*291a2b48SSukumar Swaminathan SLIM_IOCB_RSP_ENTRIES)) 104*291a2b48SSukumar Swaminathan #define SLI2_SLIM2_SIZE (MBOX_SIZE + MBOX_EXTENSION_SIZE + \ 105*291a2b48SSukumar Swaminathan PCB_SIZE + SLI2_IOCB_MAX_SIZE) 106*291a2b48SSukumar Swaminathan 107fcf3ce44SJohn Forte 108fcf3ce44SJohn Forte /* SLI3 Definitions */ 109fcf3ce44SJohn Forte #define SLI3_MAX_BDE 7 110fcf3ce44SJohn Forte #define SLI3_IOCB_CMD_SIZE 128 111fcf3ce44SJohn Forte #define SLI3_IOCB_RSP_SIZE 64 112*291a2b48SSukumar Swaminathan #define SLI3_IOCB_MAX_SIZE ((SLI3_IOCB_CMD_SIZE * \ 113*291a2b48SSukumar Swaminathan SLIM_IOCB_CMD_ENTRIES) + \ 114*291a2b48SSukumar Swaminathan (SLI3_IOCB_RSP_SIZE * \ 115*291a2b48SSukumar Swaminathan SLIM_IOCB_RSP_ENTRIES)) 116*291a2b48SSukumar Swaminathan #define SLI3_SLIM2_SIZE (MBOX_SIZE + MBOX_EXTENSION_SIZE + \ 117*291a2b48SSukumar Swaminathan PCB_SIZE + SLI3_IOCB_MAX_SIZE) 118fcf3ce44SJohn Forte 119fcf3ce44SJohn Forte 120fcf3ce44SJohn Forte #ifdef SLI3_SUPPORT 121fcf3ce44SJohn Forte #define SLI_SLIM2_SIZE SLI3_SLIM2_SIZE 122fcf3ce44SJohn Forte #define SLI_IOCB_MAX_SIZE SLI3_IOCB_MAX_SIZE 123fcf3ce44SJohn Forte #else /* SLI2_SUPPORT */ 124fcf3ce44SJohn Forte #define SLI_SLIM2_SIZE SLI2_SLIM2_SIZE 125fcf3ce44SJohn Forte #define SLI_IOCB_MAX_SIZE SLI2_IOCB_MAX_SIZE 126fcf3ce44SJohn Forte #endif /* SLI3_SUPPORT */ 127fcf3ce44SJohn Forte 128fcf3ce44SJohn Forte 129fcf3ce44SJohn Forte 130fcf3ce44SJohn Forte #define FC_MAXRETRY 3 /* max retries for ELS commands */ 131*291a2b48SSukumar Swaminathan #define FC_FCP_RING 0 /* use ring 0 for FCP initiator cmds */ 132*291a2b48SSukumar Swaminathan #define FC_FCT_RING 0 /* use ring 0 for FCP target cmds */ 133fcf3ce44SJohn Forte 134fcf3ce44SJohn Forte #define FC_IP_RING 1 /* use ring 1 for IP commands */ 135fcf3ce44SJohn Forte #define FC_ELS_RING 2 /* use ring 2 for ELS commands */ 136fcf3ce44SJohn Forte #define FC_CT_RING 3 /* use ring 3 for CT commands */ 137fcf3ce44SJohn Forte 138fcf3ce44SJohn Forte #define FF_DEF_EDTOV 2000 /* Default E_D_TOV (2000ms) */ 139fcf3ce44SJohn Forte #define FF_DEF_ALTOV 15 /* Default AL_TIME (15ms) */ 140fcf3ce44SJohn Forte #define FF_DEF_RATOV 2 /* Default RA_TOV (2s) */ 141fcf3ce44SJohn Forte #define FF_DEF_ARBTOV 1900 /* Default ARB_TOV (1900ms) */ 142*291a2b48SSukumar Swaminathan #define MAX_MSG_DATA 28 /* max msg data in CMD_ADAPTER_MSG */ 143*291a2b48SSukumar Swaminathan /* iocb */ 144*291a2b48SSukumar Swaminathan #define FF_REG_AREA_SIZE 256 /* size, in bytes, of i/o register */ 145*291a2b48SSukumar Swaminathan /* area */ 146fcf3ce44SJohn Forte 147fcf3ce44SJohn Forte /* 148fcf3ce44SJohn Forte * Miscellaneous stuff.... 149fcf3ce44SJohn Forte */ 150fcf3ce44SJohn Forte /* HBA Mgmt */ 151fcf3ce44SJohn Forte #define FDMI_DID ((uint32_t)0xfffffa) 152fcf3ce44SJohn Forte #define NameServer_DID ((uint32_t)0xfffffc) 153fcf3ce44SJohn Forte #define SCR_DID ((uint32_t)0xfffffd) 154fcf3ce44SJohn Forte #define Fabric_DID ((uint32_t)0xfffffe) 155fcf3ce44SJohn Forte #define Bcast_DID ((uint32_t)0xffffff) 156fcf3ce44SJohn Forte #define Mask_DID ((uint32_t)0xffffff) 157fcf3ce44SJohn Forte #define CT_DID_MASK ((uint32_t)0xffff00) 158fcf3ce44SJohn Forte #define Fabric_DID_MASK ((uint32_t)0xfff000) 159fcf3ce44SJohn Forte #define WELL_KNOWN_DID_MASK ((uint32_t)0xfffff0) 160fcf3ce44SJohn Forte 161fcf3ce44SJohn Forte #define EMLXS_MENLO_DID ((uint32_t)0x00fc0e) 162fcf3ce44SJohn Forte 163fcf3ce44SJohn Forte 164*291a2b48SSukumar Swaminathan #define PT2PT_LocalID ((uint32_t)1) 165*291a2b48SSukumar Swaminathan #define PT2PT_RemoteID ((uint32_t)2) 166fcf3ce44SJohn Forte 167fcf3ce44SJohn Forte #define OWN_CHIP 1 /* IOCB / Mailbox is owned by FireFly */ 168fcf3ce44SJohn Forte #define OWN_HOST 0 /* IOCB / Mailbox is owned by Host */ 169*291a2b48SSukumar Swaminathan #define END_OF_CHAIN 0 170fcf3ce44SJohn Forte 171fcf3ce44SJohn Forte 172fcf3ce44SJohn Forte 173fcf3ce44SJohn Forte /* defines for type field in fc header */ 174fcf3ce44SJohn Forte #define FC_ELS_DATA 0x01 175fcf3ce44SJohn Forte #define FC_LLC_SNAP 0x05 176fcf3ce44SJohn Forte #define FC_FCP_DATA 0x08 177fcf3ce44SJohn Forte #define FC_CT_TYPE 0x20 178fcf3ce44SJohn Forte #define EMLXS_MENLO_TYPE 0xFE 179fcf3ce44SJohn Forte 180fcf3ce44SJohn Forte 181fcf3ce44SJohn Forte /* defines for rctl field in fc header */ 182fcf3ce44SJohn Forte #define FC_DEV_DATA 0x0 183fcf3ce44SJohn Forte #define FC_UNSOL_CTL 0x2 184fcf3ce44SJohn Forte #define FC_SOL_CTL 0x3 185fcf3ce44SJohn Forte #define FC_UNSOL_DATA 0x4 186fcf3ce44SJohn Forte #define FC_FCP_CMND 0x6 187fcf3ce44SJohn Forte #define FC_ELS_REQ 0x22 188fcf3ce44SJohn Forte #define FC_ELS_RSP 0x23 189fcf3ce44SJohn Forte #define FC_NET_HDR 0x20 /* network headers for Dfctl field */ 190fcf3ce44SJohn Forte 191fcf3ce44SJohn Forte /* 192fcf3ce44SJohn Forte * Common Transport structures and definitions 193fcf3ce44SJohn Forte * 194fcf3ce44SJohn Forte */ 195fcf3ce44SJohn Forte #define EMLXS_COMMAND 0 196fcf3ce44SJohn Forte #define EMLXS_RESPONSE 1 197fcf3ce44SJohn Forte 198*291a2b48SSukumar Swaminathan typedef union CtRevisionId 199*291a2b48SSukumar Swaminathan { 200fcf3ce44SJohn Forte /* Structure is in Big Endian format */ 201*291a2b48SSukumar Swaminathan struct 202*291a2b48SSukumar Swaminathan { 203*291a2b48SSukumar Swaminathan uint32_t Revision:8; 204*291a2b48SSukumar Swaminathan uint32_t InId:24; 205fcf3ce44SJohn Forte } bits; 206*291a2b48SSukumar Swaminathan uint32_t word; 207fcf3ce44SJohn Forte } CtRevisionId_t; 208fcf3ce44SJohn Forte 209*291a2b48SSukumar Swaminathan typedef union CtCommandResponse 210*291a2b48SSukumar Swaminathan { 211fcf3ce44SJohn Forte /* Structure is in Big Endian format */ 212*291a2b48SSukumar Swaminathan struct 213*291a2b48SSukumar Swaminathan { 214*291a2b48SSukumar Swaminathan uint32_t CmdRsp:16; 215*291a2b48SSukumar Swaminathan uint32_t Size:16; 216fcf3ce44SJohn Forte } bits; 217*291a2b48SSukumar Swaminathan uint32_t word; 218fcf3ce44SJohn Forte } CtCommandResponse_t; 219fcf3ce44SJohn Forte 220*291a2b48SSukumar Swaminathan typedef struct SliCtRequest 221*291a2b48SSukumar Swaminathan { 222fcf3ce44SJohn Forte /* Structure is in Big Endian format */ 223*291a2b48SSukumar Swaminathan CtRevisionId_t RevisionId; 224*291a2b48SSukumar Swaminathan uint8_t FsType; 225*291a2b48SSukumar Swaminathan uint8_t FsSubType; 226*291a2b48SSukumar Swaminathan uint8_t Options; 227*291a2b48SSukumar Swaminathan uint8_t Rsrvd1; 228*291a2b48SSukumar Swaminathan CtCommandResponse_t CommandResponse; 229*291a2b48SSukumar Swaminathan uint8_t Rsrvd2; 230*291a2b48SSukumar Swaminathan uint8_t ReasonCode; 231*291a2b48SSukumar Swaminathan uint8_t Explanation; 232*291a2b48SSukumar Swaminathan uint8_t VendorUnique; 233*291a2b48SSukumar Swaminathan 234*291a2b48SSukumar Swaminathan union 235*291a2b48SSukumar Swaminathan { 236*291a2b48SSukumar Swaminathan uint32_t data; 237*291a2b48SSukumar Swaminathan uint32_t PortID; 238*291a2b48SSukumar Swaminathan 239*291a2b48SSukumar Swaminathan struct gid 240*291a2b48SSukumar Swaminathan { 241*291a2b48SSukumar Swaminathan uint8_t PortType; /* for GID_PT requests */ 242*291a2b48SSukumar Swaminathan uint8_t DomainScope; 243*291a2b48SSukumar Swaminathan uint8_t AreaScope; 244*291a2b48SSukumar Swaminathan uint8_t Fc4Type; /* for GID_FT requests */ 245fcf3ce44SJohn Forte } gid; 246*291a2b48SSukumar Swaminathan struct rft 247*291a2b48SSukumar Swaminathan { 248*291a2b48SSukumar Swaminathan uint32_t PortId; /* For RFT_ID requests */ 249fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 250*291a2b48SSukumar Swaminathan uint32_t rsvd0:16; 251*291a2b48SSukumar Swaminathan uint32_t rsvd1:7; 252*291a2b48SSukumar Swaminathan uint32_t fcpReg:1; /* Type 8 */ 253*291a2b48SSukumar Swaminathan uint32_t rsvd2:2; 254*291a2b48SSukumar Swaminathan uint32_t ipReg:1; /* Type 5 */ 255*291a2b48SSukumar Swaminathan uint32_t rsvd3:5; 256fcf3ce44SJohn Forte #endif 257fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 258*291a2b48SSukumar Swaminathan uint32_t rsvd0:16; 259*291a2b48SSukumar Swaminathan uint32_t fcpReg:1; /* Type 8 */ 260*291a2b48SSukumar Swaminathan uint32_t rsvd1:7; 261*291a2b48SSukumar Swaminathan uint32_t rsvd3:5; 262*291a2b48SSukumar Swaminathan uint32_t ipReg:1; /* Type 5 */ 263*291a2b48SSukumar Swaminathan uint32_t rsvd2:2; 264*291a2b48SSukumar Swaminathan #endif 265*291a2b48SSukumar Swaminathan uint32_t rsvd[7]; 266fcf3ce44SJohn Forte } rft; 267fcf3ce44SJohn Forte 268*291a2b48SSukumar Swaminathan struct rsnn 269*291a2b48SSukumar Swaminathan { 270*291a2b48SSukumar Swaminathan uint8_t wwnn[8]; 271*291a2b48SSukumar Swaminathan uint8_t snn_len; 272*291a2b48SSukumar Swaminathan char snn[256]; 273fcf3ce44SJohn Forte } rsnn; 274fcf3ce44SJohn Forte 275*291a2b48SSukumar Swaminathan struct rspn 276*291a2b48SSukumar Swaminathan { 277*291a2b48SSukumar Swaminathan uint32_t PortId; 278*291a2b48SSukumar Swaminathan uint8_t spn_len; 279*291a2b48SSukumar Swaminathan char spn[256]; 280fcf3ce44SJohn Forte } rspn; 281fcf3ce44SJohn Forte } un; 282fcf3ce44SJohn Forte } SliCtRequest_t; 283fcf3ce44SJohn Forte typedef SliCtRequest_t SLI_CT_REQUEST; 284fcf3ce44SJohn Forte 285*291a2b48SSukumar Swaminathan #define SLI_CT_REVISION 1 286fcf3ce44SJohn Forte 287fcf3ce44SJohn Forte 288fcf3ce44SJohn Forte /* 289fcf3ce44SJohn Forte * FsType Definitions 290fcf3ce44SJohn Forte */ 291fcf3ce44SJohn Forte 292*291a2b48SSukumar Swaminathan #define SLI_CT_MANAGEMENT_SERVICE 0xFA 293*291a2b48SSukumar Swaminathan #define SLI_CT_TIME_SERVICE 0xFB 294*291a2b48SSukumar Swaminathan #define SLI_CT_DIRECTORY_SERVICE 0xFC 295*291a2b48SSukumar Swaminathan #define SLI_CT_FABRIC_CONTROLLER_SERVICE 0xFD 296fcf3ce44SJohn Forte 297fcf3ce44SJohn Forte /* 298fcf3ce44SJohn Forte * Directory Service Subtypes 299fcf3ce44SJohn Forte */ 300fcf3ce44SJohn Forte 301*291a2b48SSukumar Swaminathan #define SLI_CT_DIRECTORY_NAME_SERVER 0x02 302fcf3ce44SJohn Forte 303fcf3ce44SJohn Forte /* 304fcf3ce44SJohn Forte * Response Codes 305fcf3ce44SJohn Forte */ 306fcf3ce44SJohn Forte 307*291a2b48SSukumar Swaminathan #define SLI_CT_RESPONSE_FS_RJT 0x8001 308*291a2b48SSukumar Swaminathan #define SLI_CT_RESPONSE_FS_ACC 0x8002 309fcf3ce44SJohn Forte 310fcf3ce44SJohn Forte /* 311fcf3ce44SJohn Forte * Reason Codes 312fcf3ce44SJohn Forte */ 313fcf3ce44SJohn Forte 314*291a2b48SSukumar Swaminathan #define SLI_CT_NO_ADDITIONAL_EXPL 0x0 315*291a2b48SSukumar Swaminathan #define SLI_CT_INVALID_COMMAND 0x01 316*291a2b48SSukumar Swaminathan #define SLI_CT_INVALID_VERSION 0x02 317*291a2b48SSukumar Swaminathan #define SLI_CT_LOGICAL_ERROR 0x03 318*291a2b48SSukumar Swaminathan #define SLI_CT_INVALID_IU_SIZE 0x04 319*291a2b48SSukumar Swaminathan #define SLI_CT_LOGICAL_BUSY 0x05 320*291a2b48SSukumar Swaminathan #define SLI_CT_PROTOCOL_ERROR 0x07 321*291a2b48SSukumar Swaminathan #define SLI_CT_UNABLE_TO_PERFORM_REQ 0x09 322*291a2b48SSukumar Swaminathan #define SLI_CT_REQ_NOT_SUPPORTED 0x0b 323*291a2b48SSukumar Swaminathan #define SLI_CT_HBA_INFO_NOT_REGISTERED 0x10 324*291a2b48SSukumar Swaminathan #define SLI_CT_MULTIPLE_HBA_ATTR_OF_SAME_TYPE 0x11 325*291a2b48SSukumar Swaminathan #define SLI_CT_INVALID_HBA_ATTR_BLOCK_LEN 0x12 326*291a2b48SSukumar Swaminathan #define SLI_CT_HBA_ATTR_NOT_PRESENT 0x13 327*291a2b48SSukumar Swaminathan #define SLI_CT_PORT_INFO_NOT_REGISTERED 0x20 328*291a2b48SSukumar Swaminathan #define SLI_CT_MULTIPLE_PORT_ATTR_OF_SAME_TYPE 0x21 329*291a2b48SSukumar Swaminathan #define SLI_CT_INVALID_PORT_ATTR_BLOCK_LEN 0x22 330*291a2b48SSukumar Swaminathan #define SLI_CT_VENDOR_UNIQUE 0xff 331fcf3ce44SJohn Forte 332fcf3ce44SJohn Forte /* 333fcf3ce44SJohn Forte * Name Server SLI_CT_UNABLE_TO_PERFORM_REQ Explanations 334fcf3ce44SJohn Forte */ 335fcf3ce44SJohn Forte 336*291a2b48SSukumar Swaminathan #define SLI_CT_NO_PORT_ID 0x01 337*291a2b48SSukumar Swaminathan #define SLI_CT_NO_PORT_NAME 0x02 338*291a2b48SSukumar Swaminathan #define SLI_CT_NO_NODE_NAME 0x03 339*291a2b48SSukumar Swaminathan #define SLI_CT_NO_CLASS_OF_SERVICE 0x04 340*291a2b48SSukumar Swaminathan #define SLI_CT_NO_IP_ADDRESS 0x05 341*291a2b48SSukumar Swaminathan #define SLI_CT_NO_IPA 0x06 342*291a2b48SSukumar Swaminathan #define SLI_CT_NO_FC4_TYPES 0x07 343*291a2b48SSukumar Swaminathan #define SLI_CT_NO_SYMBOLIC_PORT_NAME 0x08 344*291a2b48SSukumar Swaminathan #define SLI_CT_NO_SYMBOLIC_NODE_NAME 0x09 345*291a2b48SSukumar Swaminathan #define SLI_CT_NO_PORT_TYPE 0x0A 346*291a2b48SSukumar Swaminathan #define SLI_CT_ACCESS_DENIED 0x10 347*291a2b48SSukumar Swaminathan #define SLI_CT_INVALID_PORT_ID 0x11 348*291a2b48SSukumar Swaminathan #define SLI_CT_DATABASE_EMPTY 0x12 349fcf3ce44SJohn Forte 350fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 351fcf3ce44SJohn Forte #define CT_CMD_MASK 0xffff0000 352fcf3ce44SJohn Forte #endif 353fcf3ce44SJohn Forte 354fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 355fcf3ce44SJohn Forte #define CT_CMD_MASK 0xffff 356fcf3ce44SJohn Forte #endif 357fcf3ce44SJohn Forte 358fcf3ce44SJohn Forte /* 359fcf3ce44SJohn Forte * Management Server Interface Command Codes 360fcf3ce44SJohn Forte */ 361fcf3ce44SJohn Forte 362*291a2b48SSukumar Swaminathan #define MS_GTIN 0x0100 363*291a2b48SSukumar Swaminathan #define MS_GIEL 0x0101 364*291a2b48SSukumar Swaminathan #define MS_GIET 0x0111 365*291a2b48SSukumar Swaminathan #define MS_GDID 0x0112 366*291a2b48SSukumar Swaminathan #define MS_GMID 0x0113 367*291a2b48SSukumar Swaminathan #define MS_GFN 0x0114 368*291a2b48SSukumar Swaminathan #define MS_GIELN 0x0115 369*291a2b48SSukumar Swaminathan #define MS_GMAL 0x0116 370*291a2b48SSukumar Swaminathan #define MS_GIEIL 0x0117 371*291a2b48SSukumar Swaminathan #define MS_GPL 0x0118 372*291a2b48SSukumar Swaminathan #define MS_GPT 0x0121 373*291a2b48SSukumar Swaminathan #define MS_GPPN 0x0122 374*291a2b48SSukumar Swaminathan #define MS_GAPNL 0x0124 375*291a2b48SSukumar Swaminathan #define MS_GPS 0x0126 376*291a2b48SSukumar Swaminathan #define MS_GPSC 0x0127 377*291a2b48SSukumar Swaminathan #define MS_GATIN 0x0128 378*291a2b48SSukumar Swaminathan #define MS_GSES 0x0130 379*291a2b48SSukumar Swaminathan #define MS_GPLNL 0x0191 380*291a2b48SSukumar Swaminathan #define MS_GPLT 0x0192 381*291a2b48SSukumar Swaminathan #define MS_GPLML 0x0193 382*291a2b48SSukumar Swaminathan #define MS_GPAB 0x0197 383*291a2b48SSukumar Swaminathan #define MS_GNPL 0x01A1 384*291a2b48SSukumar Swaminathan #define MS_GPNL 0x01A2 385*291a2b48SSukumar Swaminathan #define MS_GPFCP 0x01A4 386*291a2b48SSukumar Swaminathan #define MS_GPLI 0x01A5 387*291a2b48SSukumar Swaminathan #define MS_GNID 0x01B1 388*291a2b48SSukumar Swaminathan #define MS_RIELN 0x0215 389*291a2b48SSukumar Swaminathan #define MS_RPL 0x0280 390*291a2b48SSukumar Swaminathan #define MS_RPLN 0x0291 391*291a2b48SSukumar Swaminathan #define MS_RPLT 0x0292 392*291a2b48SSukumar Swaminathan #define MS_RPLM 0x0293 393*291a2b48SSukumar Swaminathan #define MS_RPAB 0x0298 394*291a2b48SSukumar Swaminathan #define MS_RPFCP 0x029A 395*291a2b48SSukumar Swaminathan #define MS_RPLI 0x029B 396*291a2b48SSukumar Swaminathan #define MS_DPL 0x0380 397*291a2b48SSukumar Swaminathan #define MS_DPLN 0x0391 398*291a2b48SSukumar Swaminathan #define MS_DPLM 0x0392 399*291a2b48SSukumar Swaminathan #define MS_DPLML 0x0393 400*291a2b48SSukumar Swaminathan #define MS_DPLI 0x0394 401*291a2b48SSukumar Swaminathan #define MS_DPAB 0x0395 402*291a2b48SSukumar Swaminathan #define MS_DPALL 0x039F 403fcf3ce44SJohn Forte 404fcf3ce44SJohn Forte 405fcf3ce44SJohn Forte /* 406fcf3ce44SJohn Forte * Name Server Command Codes 407fcf3ce44SJohn Forte */ 408*291a2b48SSukumar Swaminathan #define SLI_CTNS_GA_NXT 0x0100 409*291a2b48SSukumar Swaminathan #define SLI_CTNS_GPN_ID 0x0112 410*291a2b48SSukumar Swaminathan #define SLI_CTNS_GNN_ID 0x0113 411*291a2b48SSukumar Swaminathan #define SLI_CTNS_GCS_ID 0x0114 412*291a2b48SSukumar Swaminathan #define SLI_CTNS_GFT_ID 0x0117 413*291a2b48SSukumar Swaminathan #define SLI_CTNS_GSPN_ID 0x0118 414*291a2b48SSukumar Swaminathan #define SLI_CTNS_GPT_ID 0x011A 415*291a2b48SSukumar Swaminathan #define SLI_CTNS_GID_PN 0x0121 416*291a2b48SSukumar Swaminathan #define SLI_CTNS_GID_NN 0x0131 417*291a2b48SSukumar Swaminathan #define SLI_CTNS_GIP_NN 0x0135 418*291a2b48SSukumar Swaminathan #define SLI_CTNS_GIPA_NN 0x0136 419*291a2b48SSukumar Swaminathan #define SLI_CTNS_GSNN_NN 0x0139 420*291a2b48SSukumar Swaminathan #define SLI_CTNS_GNN_IP 0x0153 421*291a2b48SSukumar Swaminathan #define SLI_CTNS_GIPA_IP 0x0156 422*291a2b48SSukumar Swaminathan #define SLI_CTNS_GID_FT 0x0171 423*291a2b48SSukumar Swaminathan #define SLI_CTNS_GID_PT 0x01A1 424*291a2b48SSukumar Swaminathan #define SLI_CTNS_RPN_ID 0x0212 425*291a2b48SSukumar Swaminathan #define SLI_CTNS_RNN_ID 0x0213 426*291a2b48SSukumar Swaminathan #define SLI_CTNS_RCS_ID 0x0214 427*291a2b48SSukumar Swaminathan #define SLI_CTNS_RFT_ID 0x0217 428*291a2b48SSukumar Swaminathan #define SLI_CTNS_RSPN_ID 0x0218 429*291a2b48SSukumar Swaminathan #define SLI_CTNS_RPT_ID 0x021A 430*291a2b48SSukumar Swaminathan #define SLI_CTNS_RIP_NN 0x0235 431*291a2b48SSukumar Swaminathan #define SLI_CTNS_RIPA_NN 0x0236 432*291a2b48SSukumar Swaminathan #define SLI_CTNS_RSNN_NN 0x0239 433*291a2b48SSukumar Swaminathan #define SLI_CTNS_DA_ID 0x0300 434*291a2b48SSukumar Swaminathan 435*291a2b48SSukumar Swaminathan #define SLI_CT_LOOPBACK 0xFCFC 436fcf3ce44SJohn Forte 437fcf3ce44SJohn Forte 438fcf3ce44SJohn Forte /* 439fcf3ce44SJohn Forte * Port Types 440fcf3ce44SJohn Forte */ 441fcf3ce44SJohn Forte 442*291a2b48SSukumar Swaminathan #define SLI_CTPT_N_PORT 0x01 443*291a2b48SSukumar Swaminathan #define SLI_CTPT_NL_PORT 0x02 444*291a2b48SSukumar Swaminathan #define SLI_CTPT_FNL_PORT 0x03 445*291a2b48SSukumar Swaminathan #define SLI_CTPT_IP 0x04 446*291a2b48SSukumar Swaminathan #define SLI_CTPT_FCP 0x08 447*291a2b48SSukumar Swaminathan #define SLI_CTPT_NX_PORT 0x7F 448*291a2b48SSukumar Swaminathan #define SLI_CTPT_F_PORT 0x81 449*291a2b48SSukumar Swaminathan #define SLI_CTPT_FL_PORT 0x82 450*291a2b48SSukumar Swaminathan #define SLI_CTPT_E_PORT 0x84 451fcf3ce44SJohn Forte 452fcf3ce44SJohn Forte #define SLI_CT_LAST_ENTRY 0x80000000 453fcf3ce44SJohn Forte 454fcf3ce44SJohn Forte /* ===================================================================== */ 455fcf3ce44SJohn Forte 456fcf3ce44SJohn Forte /* 457fcf3ce44SJohn Forte * Start FireFly Register definitions 458fcf3ce44SJohn Forte */ 459fcf3ce44SJohn Forte 460fcf3ce44SJohn Forte /* PCI register offsets */ 461*291a2b48SSukumar Swaminathan #define MEM_ADDR_OFFSET 0x10 /* SLIM base memory address */ 462fcf3ce44SJohn Forte #define MEMH_OFFSET 0x14 /* SLIM base memory high address */ 463*291a2b48SSukumar Swaminathan #define REG_ADDR_OFFSET 0x18 /* REGISTER base memory address */ 464fcf3ce44SJohn Forte #define REGH_OFFSET 0x1c /* REGISTER base memory high address */ 465*291a2b48SSukumar Swaminathan #define IO_ADDR_OFFSET 0x20 /* BIU I/O registers */ 466*291a2b48SSukumar Swaminathan #define REGIOH_OFFSET 0x24 /* REGISTER base io high address */ 467fcf3ce44SJohn Forte 468*291a2b48SSukumar Swaminathan #define CMD_REG_OFFSET 0x4 /* PCI command configuration */ 469fcf3ce44SJohn Forte 470fcf3ce44SJohn Forte /* General PCI Register Definitions */ 471fcf3ce44SJohn Forte /* Refer To The PCI Specification For Detailed Explanations */ 472fcf3ce44SJohn Forte 473fcf3ce44SJohn Forte /* Register Offsets in little endian format */ 474*291a2b48SSukumar Swaminathan #define PCI_VENDOR_ID_REGISTER 0x00 /* PCI Vendor ID Reg */ 475*291a2b48SSukumar Swaminathan #define PCI_DEVICE_ID_REGISTER 0x02 /* PCI Device ID Reg */ 476fcf3ce44SJohn Forte #define PCI_CONFIG_ID_REGISTER 0x00 /* PCI Configuration ID Reg */ 477*291a2b48SSukumar Swaminathan #define PCI_COMMAND_REGISTER 0x04 /* PCI Command Reg */ 478*291a2b48SSukumar Swaminathan #define PCI_STATUS_REGISTER 0x06 /* PCI Status Reg */ 479*291a2b48SSukumar Swaminathan #define PCI_REV_ID_REGISTER 0x08 /* PCI Revision ID Reg */ 480*291a2b48SSukumar Swaminathan #define PCI_CLASS_CODE_REGISTER 0x09 /* PCI Class Code Reg */ 481*291a2b48SSukumar Swaminathan #define PCI_CACHE_LINE_REGISTER 0x0C /* PCI Cache Line Reg */ 482*291a2b48SSukumar Swaminathan #define PCI_LATENCY_TMR_REGISTER 0x0D /* PCI Latency Timer Reg */ 483*291a2b48SSukumar Swaminathan #define PCI_HEADER_TYPE_REGISTER 0x0E /* PCI Header Type Reg */ 484fcf3ce44SJohn Forte #define PCI_BIST_REGISTER 0x0F /* PCI Built-In SelfTest Reg */ 485fcf3ce44SJohn Forte #define PCI_BAR_0_REGISTER 0x10 /* PCI Base Address Reg 0 */ 486fcf3ce44SJohn Forte #define PCI_BAR_1_REGISTER 0x14 /* PCI Base Address Reg 1 */ 487fcf3ce44SJohn Forte #define PCI_BAR_2_REGISTER 0x18 /* PCI Base Address Reg 2 */ 488fcf3ce44SJohn Forte #define PCI_BAR_3_REGISTER 0x1C /* PCI Base Address Reg 3 */ 489fcf3ce44SJohn Forte #define PCI_BAR_4_REGISTER 0x20 /* PCI Base Address Reg 4 */ 490fcf3ce44SJohn Forte #define PCI_BAR_5_REGISTER 0x24 /* PCI Base Address Reg 5 */ 491fcf3ce44SJohn Forte #define PCI_SSID_REGISTER 0x2C 492fcf3ce44SJohn Forte #define PCI_SSVID_REGISTER 0x2C 493fcf3ce44SJohn Forte #define PCI_SSDID_REGISTER 0x2E 494fcf3ce44SJohn Forte #define PCI_EXPANSION_ROM 0x30 /* PCI Expansion ROM Base Reg */ 495fcf3ce44SJohn Forte #define PCI_CAP_POINTER 0x34 496fcf3ce44SJohn Forte #define PCI_INTR_LINE_REGISTER 0x3C /* PCI Interrupt Line Reg */ 497*291a2b48SSukumar Swaminathan #define PCI_INTR_PIN_REGISTER 0x3D /* PCI Interrupt Pin Reg */ 498*291a2b48SSukumar Swaminathan #define PCI_MIN_GNT_REGISTER 0x3E /* PCI Min-Gnt Reg */ 499*291a2b48SSukumar Swaminathan #define PCI_MAX_LAT_REGISTER 0x3F /* PCI Max_Lat Reg */ 500*291a2b48SSukumar Swaminathan #define PCI_NODE_ADDR_REGISTER 0x40 /* PCI Node Address Reg */ 501fcf3ce44SJohn Forte 502*291a2b48SSukumar Swaminathan #define PCI_PM_CONTROL_REGISTER 0x50 /* PCI Power Mgmt Control Reg */ 503fcf3ce44SJohn Forte 504fcf3ce44SJohn Forte /* PCIe adapters only */ 505*291a2b48SSukumar Swaminathan #define PCIe_MSI_CONTROL_REG0 0x60 /* MSI Control */ 506*291a2b48SSukumar Swaminathan #define PCIe_MSI_CONTROL_REG1 0x62 /* MSI Control */ 507fcf3ce44SJohn Forte 508fcf3ce44SJohn Forte /* Power management command states */ 509*291a2b48SSukumar Swaminathan #define PCI_PM_D0_STATE 0x00 /* Power up state */ 510*291a2b48SSukumar Swaminathan #define PCI_PM_D3_STATE 0x03 /* Power down state */ 511fcf3ce44SJohn Forte 512fcf3ce44SJohn Forte 513fcf3ce44SJohn Forte /* PCI access methods */ 514fcf3ce44SJohn Forte #define P_CONF_T1 1 515fcf3ce44SJohn Forte #define P_CONF_T2 2 516fcf3ce44SJohn Forte 517fcf3ce44SJohn Forte /* max number of pci buses */ 518*291a2b48SSukumar Swaminathan #define MAX_PCI_BUSES 0xFF 519fcf3ce44SJohn Forte 520fcf3ce44SJohn Forte /* number of PCI config bytes to access */ 521fcf3ce44SJohn Forte #define PCI_BYTE 1 522fcf3ce44SJohn Forte #define PCI_WORD 2 523fcf3ce44SJohn Forte #define PCI_DWORD 4 524fcf3ce44SJohn Forte 525fcf3ce44SJohn Forte /* PCI related constants */ 526fcf3ce44SJohn Forte #define CMD_IO_ENBL 0x0001 527*291a2b48SSukumar Swaminathan #define CMD_MEM_ENBL 0x0002 528*291a2b48SSukumar Swaminathan #define CMD_BUS_MASTER 0x0004 529fcf3ce44SJohn Forte #define CMD_MWI 0x0010 530*291a2b48SSukumar Swaminathan #define CMD_PARITY_CHK 0x0040 531*291a2b48SSukumar Swaminathan #define CMD_SERR_ENBL 0x0100 532fcf3ce44SJohn Forte 533*291a2b48SSukumar Swaminathan #define CMD_CFG_VALUE 0x156 /* mem enable, master, MWI, SERR, PERR */ 534fcf3ce44SJohn Forte 535fcf3ce44SJohn Forte /* PCI addresses */ 536fcf3ce44SJohn Forte #define PCI_SPACE_ENABLE 0x0CF8 537fcf3ce44SJohn Forte #define CF1_CONFIG_ADDR_REGISTER 0x0CF8 538fcf3ce44SJohn Forte #define CF1_CONFIG_DATA_REGISTER 0x0CFC 539fcf3ce44SJohn Forte #define CF2_FORWARD_REGISTER 0x0CFA 540fcf3ce44SJohn Forte #define CF2_BASE_ADDRESS 0xC000 541fcf3ce44SJohn Forte 542fcf3ce44SJohn Forte 543*291a2b48SSukumar Swaminathan #define DEFAULT_PCI_LATENCY_CLOCKS 0xf8 /* 0xF8 is a special value */ 544*291a2b48SSukumar Swaminathan /* for FF11.1N6 firmware. */ 545*291a2b48SSukumar Swaminathan /* Use 0x80 for pre-FF11.1N6 */ 546*291a2b48SSukumar Swaminathan /* &N7, etc */ 547fcf3ce44SJohn Forte #define PCI_LATENCY_VALUE 0xf8 548fcf3ce44SJohn Forte 549fcf3ce44SJohn Forte 550fcf3ce44SJohn Forte 551fcf3ce44SJohn Forte /* ==== Register Bit Definitions ==== */ 552fcf3ce44SJohn Forte 553fcf3ce44SJohn Forte /* Used by SBUS adapter */ 554fcf3ce44SJohn Forte /* SBUS Control Register */ 555fcf3ce44SJohn Forte #define SBUS_CTRL_REG_OFFSET 0 /* Word offset from reg base addr */ 556fcf3ce44SJohn Forte 557fcf3ce44SJohn Forte #define SBUS_CTRL_SBRST 0x00000001 /* Bit 0 */ 558fcf3ce44SJohn Forte #define SBUS_CTRL_BKOFF 0x00000002 /* Bit 1 */ 559fcf3ce44SJohn Forte #define SBUS_CTRL_ENP 0x00000004 /* Bit 2 */ 560fcf3ce44SJohn Forte #define SBUS_CTRL_EN64 0x00000008 /* Bit 3 */ 561*291a2b48SSukumar Swaminathan #define SBUS_CTRL_SIR_1 0x00000010 /* Bit [6:4] IRL 1, */ 562*291a2b48SSukumar Swaminathan /* lowset priority */ 563fcf3ce44SJohn Forte #define SBUS_CTRL_SIR_2 0x00000020 564fcf3ce44SJohn Forte #define SBUS_CTRL_SIR_3 0x00000030 565fcf3ce44SJohn Forte #define SBUS_CTRL_SIR_4 0x00000040 566fcf3ce44SJohn Forte #define SBUS_CTRL_SIR_5 0x00000050 567fcf3ce44SJohn Forte #define SBUS_CTRL_SIR_6 0x00000060 568fcf3ce44SJohn Forte #define SBUS_CTRL_SIR_7 0x00000070 /* IRL 7, highest priority */ 569fcf3ce44SJohn Forte 570fcf3ce44SJohn Forte /* SBUS Status Register */ 571fcf3ce44SJohn Forte #define SBUS_STAT_REG_OFFSET 1 /* Word offset from reg base addr */ 572fcf3ce44SJohn Forte #define SBUS_STAT_IP 0x00000001 /* Bit 0 */ 573fcf3ce44SJohn Forte #define SBUS_STAT_LERR 0x00000002 /* Bit 1 */ 574fcf3ce44SJohn Forte #define SBUS_STAT_SBPE 0x00000004 /* Bit 2 */ 575fcf3ce44SJohn Forte #define SBUS_STAT_TE 0x00000008 /* Bit 3 */ 576fcf3ce44SJohn Forte #define SBUS_STAT_WPE 0x00000010 /* Bit 4 */ 577fcf3ce44SJohn Forte #define SBUS_STAT_PERR 0x00000020 /* Bit 5 */ 578fcf3ce44SJohn Forte #define SBUS_STAT_SERR 0x00000040 /* Bit 6 */ 579fcf3ce44SJohn Forte #define SBUS_STAT_PTA 0x00000080 /* Bit 7 */ 580fcf3ce44SJohn Forte 581fcf3ce44SJohn Forte /* SBUS Update Register */ 582fcf3ce44SJohn Forte #define SBUS_UPDATE_REG_OFFSET 2 /* Word offfset from reg base addr */ 583fcf3ce44SJohn Forte 584fcf3ce44SJohn Forte #define SBUS_UPDATE_DATA 0x00000001 /* Bit 0 */ 585fcf3ce44SJohn Forte #define SBUS_UPDATE_SPCLK 0x00000002 /* Bit 1 */ 586fcf3ce44SJohn Forte #define SBUS_UPDATE_SPCE 0x00000004 /* Bit 2 */ 587fcf3ce44SJohn Forte #define SBUS_UPDATE_SPRST 0x00000008 /* Bit 3 */ 588fcf3ce44SJohn Forte #define SBUS_UPDATE_SPWE 0x00000010 /* Bit 4 */ 589fcf3ce44SJohn Forte #define SBUS_UPDATE_LDFPGA 0x00000080 /* Bit 7 */ 590fcf3ce44SJohn Forte 591fcf3ce44SJohn Forte /* Host Attention Register */ 592fcf3ce44SJohn Forte 593fcf3ce44SJohn Forte #define HA_REG_OFFSET 0 /* Word offset from register base address */ 594fcf3ce44SJohn Forte 595fcf3ce44SJohn Forte #define HA_R0RE_REQ 0x00000001 /* Bit 0 */ 596fcf3ce44SJohn Forte #define HA_R0CE_RSP 0x00000002 /* Bit 1 */ 597fcf3ce44SJohn Forte #define HA_R0ATT 0x00000008 /* Bit 3 */ 598fcf3ce44SJohn Forte #define HA_R1RE_REQ 0x00000010 /* Bit 4 */ 599fcf3ce44SJohn Forte #define HA_R1CE_RSP 0x00000020 /* Bit 5 */ 600fcf3ce44SJohn Forte #define HA_R1ATT 0x00000080 /* Bit 7 */ 601fcf3ce44SJohn Forte #define HA_R2RE_REQ 0x00000100 /* Bit 8 */ 602fcf3ce44SJohn Forte #define HA_R2CE_RSP 0x00000200 /* Bit 9 */ 603fcf3ce44SJohn Forte #define HA_R2ATT 0x00000800 /* Bit 11 */ 604fcf3ce44SJohn Forte #define HA_R3RE_REQ 0x00001000 /* Bit 12 */ 605fcf3ce44SJohn Forte #define HA_R3CE_RSP 0x00002000 /* Bit 13 */ 606fcf3ce44SJohn Forte #define HA_R3ATT 0x00008000 /* Bit 15 */ 607fcf3ce44SJohn Forte #define HA_LATT 0x20000000 /* Bit 29 */ 608fcf3ce44SJohn Forte #define HA_MBATT 0x40000000 /* Bit 30 */ 609fcf3ce44SJohn Forte #define HA_ERATT 0x80000000 /* Bit 31 */ 610fcf3ce44SJohn Forte 611fcf3ce44SJohn Forte 612fcf3ce44SJohn Forte #ifdef MSI_SUPPORT 613fcf3ce44SJohn Forte 614fcf3ce44SJohn Forte /* Host attention interrupt map */ 615*291a2b48SSukumar Swaminathan #define EMLXS_MSI_MAP8 {0, HA_R0ATT, HA_R1ATT, HA_R2ATT, \ 616*291a2b48SSukumar Swaminathan HA_R3ATT, HA_LATT, HA_MBATT, HA_ERATT} 617*291a2b48SSukumar Swaminathan #define EMLXS_MSI_MAP4 {0, HA_R0ATT, HA_R1ATT, HA_R2ATT, 0, 0, 0, 0} 618*291a2b48SSukumar Swaminathan #define EMLXS_MSI_MAP2 {0, HA_R0ATT, 0, 0, 0, 0, 0, 0} 619*291a2b48SSukumar Swaminathan #define EMLXS_MSI_MAP1 {0, 0, 0, 0, 0, 0, 0, 0} 620fcf3ce44SJohn Forte 621fcf3ce44SJohn Forte /* MSI 0 interrupt mask */ 622*291a2b48SSukumar Swaminathan #define EMLXS_MSI0_MASK8 0 623*291a2b48SSukumar Swaminathan #define EMLXS_MSI0_MASK4 (HC_R3INT_ENA|HC_MBINT_ENA|HC_LAINT_ENA| \ 624*291a2b48SSukumar Swaminathan HC_ERINT_ENA) 625*291a2b48SSukumar Swaminathan #define EMLXS_MSI0_MASK2 (HC_R1INT_ENA|HC_R2INT_ENA|HC_R3INT_ENA| \ 626*291a2b48SSukumar Swaminathan HC_MBINT_ENA|HC_LAINT_ENA|HC_ERINT_ENA) 627*291a2b48SSukumar Swaminathan #define EMLXS_MSI0_MASK1 (HC_R0INT_ENA|HC_R1INT_ENA|HC_R2INT_ENA| \ 628*291a2b48SSukumar Swaminathan HC_R3INT_ENA|HC_MBINT_ENA|HC_LAINT_ENA| \ 629*291a2b48SSukumar Swaminathan HC_ERINT_ENA) 630fcf3ce44SJohn Forte 631fcf3ce44SJohn Forte 632*291a2b48SSukumar Swaminathan #define EMLXS_MSI_MAX_INTRS 8 633fcf3ce44SJohn Forte 634*291a2b48SSukumar Swaminathan #define EMLXS_MSI_MODE1 0 635*291a2b48SSukumar Swaminathan #define EMLXS_MSI_MODE2 1 636*291a2b48SSukumar Swaminathan #define EMLXS_MSI_MODE4 2 637*291a2b48SSukumar Swaminathan #define EMLXS_MSI_MODE8 3 638*291a2b48SSukumar Swaminathan #define EMLXS_MSI_MODES 4 639fcf3ce44SJohn Forte 640fcf3ce44SJohn Forte #endif /* MSI_SUPPORT */ 641fcf3ce44SJohn Forte 642fcf3ce44SJohn Forte 643*291a2b48SSukumar Swaminathan #define IO_THROTTLE_RESERVE 12 644fcf3ce44SJohn Forte 645fcf3ce44SJohn Forte 646fcf3ce44SJohn Forte 647fcf3ce44SJohn Forte 648fcf3ce44SJohn Forte /* Chip Attention Register */ 649fcf3ce44SJohn Forte 650*291a2b48SSukumar Swaminathan #define CA_REG_OFFSET 1 /* Word offset from register base address */ 651fcf3ce44SJohn Forte 652fcf3ce44SJohn Forte #define CA_R0CE_REQ 0x00000001 /* Bit 0 */ 653fcf3ce44SJohn Forte #define CA_R0RE_RSP 0x00000002 /* Bit 1 */ 654fcf3ce44SJohn Forte #define CA_R0ATT 0x00000008 /* Bit 3 */ 655fcf3ce44SJohn Forte #define CA_R1CE_REQ 0x00000010 /* Bit 4 */ 656fcf3ce44SJohn Forte #define CA_R1RE_RSP 0x00000020 /* Bit 5 */ 657fcf3ce44SJohn Forte #define CA_R1ATT 0x00000080 /* Bit 7 */ 658fcf3ce44SJohn Forte #define CA_R2CE_REQ 0x00000100 /* Bit 8 */ 659fcf3ce44SJohn Forte #define CA_R2RE_RSP 0x00000200 /* Bit 9 */ 660fcf3ce44SJohn Forte #define CA_R2ATT 0x00000800 /* Bit 11 */ 661fcf3ce44SJohn Forte #define CA_R3CE_REQ 0x00001000 /* Bit 12 */ 662fcf3ce44SJohn Forte #define CA_R3RE_RSP 0x00002000 /* Bit 13 */ 663fcf3ce44SJohn Forte #define CA_R3ATT 0x00008000 /* Bit 15 */ 664fcf3ce44SJohn Forte #define CA_MBATT 0x40000000 /* Bit 30 */ 665fcf3ce44SJohn Forte 666fcf3ce44SJohn Forte 667fcf3ce44SJohn Forte /* Host Status Register */ 668fcf3ce44SJohn Forte 669*291a2b48SSukumar Swaminathan #define HS_REG_OFFSET 2 /* Word offset from register base address */ 670fcf3ce44SJohn Forte 671fcf3ce44SJohn Forte #define HS_OVERTEMP 0x00000100 /* Bit 8 */ 672fcf3ce44SJohn Forte #define HS_MBRDY 0x00400000 /* Bit 22 */ 673fcf3ce44SJohn Forte #define HS_FFRDY 0x00800000 /* Bit 23 */ 674fcf3ce44SJohn Forte #define HS_FFER8 0x01000000 /* Bit 24 */ 675fcf3ce44SJohn Forte #define HS_FFER7 0x02000000 /* Bit 25 */ 676fcf3ce44SJohn Forte #define HS_FFER6 0x04000000 /* Bit 26 */ 677fcf3ce44SJohn Forte #define HS_FFER5 0x08000000 /* Bit 27 */ 678fcf3ce44SJohn Forte #define HS_FFER4 0x10000000 /* Bit 28 */ 679fcf3ce44SJohn Forte #define HS_FFER3 0x20000000 /* Bit 29 */ 680fcf3ce44SJohn Forte #define HS_FFER2 0x40000000 /* Bit 30 */ 681fcf3ce44SJohn Forte #define HS_FFER1 0x80000000 /* Bit 31 */ 682fcf3ce44SJohn Forte #define HS_FFERM 0xFF000000 /* Mask for error bits 31:24 */ 683fcf3ce44SJohn Forte 684fcf3ce44SJohn Forte /* Host Control Register */ 685fcf3ce44SJohn Forte 686*291a2b48SSukumar Swaminathan #define HC_REG_OFFSET 3 /* Word offset from register base address */ 687fcf3ce44SJohn Forte 688fcf3ce44SJohn Forte #define HC_MBINT_ENA 0x00000001 /* Bit 0 */ 689fcf3ce44SJohn Forte #define HC_R0INT_ENA 0x00000002 /* Bit 1 */ 690fcf3ce44SJohn Forte #define HC_R1INT_ENA 0x00000004 /* Bit 2 */ 691fcf3ce44SJohn Forte #define HC_R2INT_ENA 0x00000008 /* Bit 3 */ 692fcf3ce44SJohn Forte #define HC_R3INT_ENA 0x00000010 /* Bit 4 */ 693fcf3ce44SJohn Forte #define HC_INITHBI 0x02000000 /* Bit 25 */ 694fcf3ce44SJohn Forte #define HC_INITMB 0x04000000 /* Bit 26 */ 695fcf3ce44SJohn Forte #define HC_INITFF 0x08000000 /* Bit 27 */ 696fcf3ce44SJohn Forte #define HC_LAINT_ENA 0x20000000 /* Bit 29 */ 697fcf3ce44SJohn Forte #define HC_ERINT_ENA 0x80000000 /* Bit 31 */ 698fcf3ce44SJohn Forte 699fcf3ce44SJohn Forte /* BIU Configuration Register */ 700fcf3ce44SJohn Forte 701*291a2b48SSukumar Swaminathan #define BC_REG_OFFSET 4 /* Word offset from register base address */ 702fcf3ce44SJohn Forte 703fcf3ce44SJohn Forte #define BC_BSE 0x00000001 /* Bit 0 */ 704fcf3ce44SJohn Forte #define BC_BSE_SWAP 0x01000000 /* Bit 0 - swapped */ 705fcf3ce44SJohn Forte 706fcf3ce44SJohn Forte 707fcf3ce44SJohn Forte /* 708fcf3ce44SJohn Forte * End FireFly Register definitions 709fcf3ce44SJohn Forte */ 710fcf3ce44SJohn Forte 711fcf3ce44SJohn Forte /* ===================================================================== */ 712fcf3ce44SJohn Forte 713fcf3ce44SJohn Forte /* 714fcf3ce44SJohn Forte * Start of FCP specific structures 715fcf3ce44SJohn Forte */ 716fcf3ce44SJohn Forte 717*291a2b48SSukumar Swaminathan typedef struct emlxs_fcp_rsp 718*291a2b48SSukumar Swaminathan { 719*291a2b48SSukumar Swaminathan uint32_t rspRsvd1; /* FC Word 0, byte 0:3 */ 720*291a2b48SSukumar Swaminathan uint32_t rspRsvd2; /* FC Word 1, byte 0:3 */ 721fcf3ce44SJohn Forte 722*291a2b48SSukumar Swaminathan uint8_t rspStatus0; /* FCP_STATUS byte 0 (reserved) */ 723*291a2b48SSukumar Swaminathan uint8_t rspStatus1; /* FCP_STATUS byte 1 (reserved) */ 724*291a2b48SSukumar Swaminathan uint8_t rspStatus2; /* FCP_STATUS byte 2 field validity */ 725fcf3ce44SJohn Forte #define RSP_LEN_VALID 0x01 /* bit 0 */ 726fcf3ce44SJohn Forte #define SNS_LEN_VALID 0x02 /* bit 1 */ 727fcf3ce44SJohn Forte #define RESID_OVER 0x04 /* bit 2 */ 728fcf3ce44SJohn Forte #define RESID_UNDER 0x08 /* bit 3 */ 729*291a2b48SSukumar Swaminathan 730*291a2b48SSukumar Swaminathan uint8_t rspStatus3; /* FCP_STATUS byte 3 SCSI status byte */ 731fcf3ce44SJohn Forte #define SCSI_STAT_GOOD 0x00 732fcf3ce44SJohn Forte #define SCSI_STAT_CHECK_COND 0x02 733fcf3ce44SJohn Forte #define SCSI_STAT_COND_MET 0x04 734fcf3ce44SJohn Forte #define SCSI_STAT_BUSY 0x08 735fcf3ce44SJohn Forte #define SCSI_STAT_INTERMED 0x10 736fcf3ce44SJohn Forte #define SCSI_STAT_INTERMED_CM 0x14 737fcf3ce44SJohn Forte #define SCSI_STAT_RES_CNFLCT 0x18 738fcf3ce44SJohn Forte #define SCSI_STAT_CMD_TERM 0x22 739fcf3ce44SJohn Forte #define SCSI_STAT_QUE_FULL 0x28 740fcf3ce44SJohn Forte #define SCSI_STAT_ACA_ACTIVE 0x30 741fcf3ce44SJohn Forte #define SCSI_STAT_TASK_ABORT 0x40 742fcf3ce44SJohn Forte 743*291a2b48SSukumar Swaminathan uint32_t rspResId; /* Residual xfer if RESID_xxxx set */ 744*291a2b48SSukumar Swaminathan /* in fcpStatus2. */ 745fcf3ce44SJohn Forte /* Received in Big Endian format */ 746*291a2b48SSukumar Swaminathan uint32_t rspSnsLen; /* Length of sense data in fcpSnsInfo */ 747fcf3ce44SJohn Forte /* Received in Big Endian format */ 748*291a2b48SSukumar Swaminathan uint32_t rspRspLen; /* Length of FCP response data */ 749*291a2b48SSukumar Swaminathan /* in fcpRspInfo */ 750fcf3ce44SJohn Forte /* Received in Big Endian format */ 751fcf3ce44SJohn Forte 752*291a2b48SSukumar Swaminathan uint8_t rspInfo0; /* FCP_RSP_INFO byte 0 (reserved) */ 753*291a2b48SSukumar Swaminathan uint8_t rspInfo1; /* FCP_RSP_INFO byte 1 (reserved) */ 754*291a2b48SSukumar Swaminathan uint8_t rspInfo2; /* FCP_RSP_INFO byte 2 (reserved) */ 755*291a2b48SSukumar Swaminathan uint8_t rspInfo3; /* FCP_RSP_INFO RSP_CODE byte 3 */ 756fcf3ce44SJohn Forte 757fcf3ce44SJohn Forte #define RSP_NO_FAILURE 0x00 758fcf3ce44SJohn Forte #define RSP_DATA_BURST_ERR 0x01 759fcf3ce44SJohn Forte #define RSP_CMD_FIELD_ERR 0x02 760fcf3ce44SJohn Forte #define RSP_RO_MISMATCH_ERR 0x03 761fcf3ce44SJohn Forte #define RSP_TM_NOT_SUPPORTED 0x04 /* Task mgmt function not supported */ 762fcf3ce44SJohn Forte #define RSP_TM_NOT_COMPLETED 0x05 /* Task mgmt function not performed */ 763fcf3ce44SJohn Forte 764*291a2b48SSukumar Swaminathan uint32_t rspInfoRsvd; /* FCP_RSP_INFO bytes 4-7 (reserved) */ 765fcf3ce44SJohn Forte 766fcf3ce44SJohn Forte /* 767*291a2b48SSukumar Swaminathan * Define maximum size of SCSI Sense buffer. 768*291a2b48SSukumar Swaminathan * Seagate never issues more than 18 bytes of Sense data 769fcf3ce44SJohn Forte */ 770*291a2b48SSukumar Swaminathan #define MAX_FCP_SNS 128 771*291a2b48SSukumar Swaminathan uint8_t rspSnsInfo[MAX_FCP_SNS]; 772fcf3ce44SJohn Forte } emlxs_fcp_rsp; 773fcf3ce44SJohn Forte typedef emlxs_fcp_rsp FCP_RSP; 774fcf3ce44SJohn Forte 775fcf3ce44SJohn Forte 776*291a2b48SSukumar Swaminathan typedef struct emlxs_fcp_cmd 777*291a2b48SSukumar Swaminathan { 778*291a2b48SSukumar Swaminathan uint32_t fcpLunMsl; /* most significant lun word */ 779*291a2b48SSukumar Swaminathan uint32_t fcpLunLsl; /* least significant lun word */ 780fcf3ce44SJohn Forte 781fcf3ce44SJohn Forte /* 782*291a2b48SSukumar Swaminathan * # of bits to shift lun id to end up in right payload word, 783*291a2b48SSukumar Swaminathan * little endian = 8, big = 16. 784fcf3ce44SJohn Forte */ 785fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 786fcf3ce44SJohn Forte #define FC_LUN_SHIFT 8 787fcf3ce44SJohn Forte #define FC_ADDR_MODE_SHIFT 0 788fcf3ce44SJohn Forte #endif 789fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 790fcf3ce44SJohn Forte #define FC_LUN_SHIFT 16 791fcf3ce44SJohn Forte #define FC_ADDR_MODE_SHIFT 24 792fcf3ce44SJohn Forte #endif 793fcf3ce44SJohn Forte 794*291a2b48SSukumar Swaminathan uint8_t fcpCntl0; /* FCP_CNTL byte 0 (reserved) */ 795*291a2b48SSukumar Swaminathan uint8_t fcpCntl1; /* FCP_CNTL byte 1 task codes */ 796*291a2b48SSukumar Swaminathan #define SIMPLE_Q 0x00 797*291a2b48SSukumar Swaminathan #define HEAD_OF_Q 0x01 798*291a2b48SSukumar Swaminathan #define ORDERED_Q 0x02 799*291a2b48SSukumar Swaminathan #define ACA_Q 0x04 800*291a2b48SSukumar Swaminathan #define UNTAGGED 0x05 801*291a2b48SSukumar Swaminathan 802*291a2b48SSukumar Swaminathan uint8_t fcpCntl2; /* FCP_CTL byte 2 task management */ 803*291a2b48SSukumar Swaminathan /* codes */ 804*291a2b48SSukumar Swaminathan #define ABORT_TASK_SET 0x02 /* Bit 1 */ 805*291a2b48SSukumar Swaminathan #define CLEAR_TASK_SET 0x04 /* bit 2 */ 806*291a2b48SSukumar Swaminathan #define LUN_RESET 0x10 /* bit 4 */ 807*291a2b48SSukumar Swaminathan #define TARGET_RESET 0x20 /* bit 5 */ 808*291a2b48SSukumar Swaminathan #define CLEAR_ACA 0x40 /* bit 6 */ 809*291a2b48SSukumar Swaminathan #define TERMINATE_TASK 0x80 /* bit 7 */ 810*291a2b48SSukumar Swaminathan 811*291a2b48SSukumar Swaminathan uint8_t fcpCntl3; 812*291a2b48SSukumar Swaminathan #define WRITE_DATA 0x01 /* Bit 0 */ 813*291a2b48SSukumar Swaminathan #define READ_DATA 0x02 /* Bit 1 */ 814*291a2b48SSukumar Swaminathan 815*291a2b48SSukumar Swaminathan uint8_t fcpCdb[16]; /* SRB cdb field is copied here */ 816*291a2b48SSukumar Swaminathan uint32_t fcpDl; /* Total transfer length */ 817fcf3ce44SJohn Forte } emlxs_fcp_cmd_t; 818fcf3ce44SJohn Forte typedef emlxs_fcp_cmd_t FCP_CMND; 819fcf3ce44SJohn Forte 820fcf3ce44SJohn Forte 821fcf3ce44SJohn Forte 822fcf3ce44SJohn Forte 823fcf3ce44SJohn Forte 824fcf3ce44SJohn Forte 825fcf3ce44SJohn Forte 826fcf3ce44SJohn Forte 827fcf3ce44SJohn Forte 828fcf3ce44SJohn Forte 829fcf3ce44SJohn Forte /* SCSI INQUIRY Command Structure */ 830fcf3ce44SJohn Forte 831*291a2b48SSukumar Swaminathan typedef struct emlxs_inquiryDataType 832*291a2b48SSukumar Swaminathan { 833*291a2b48SSukumar Swaminathan uint8_t DeviceType:5; 834*291a2b48SSukumar Swaminathan uint8_t DeviceTypeQualifier:3; 835*291a2b48SSukumar Swaminathan 836*291a2b48SSukumar Swaminathan uint8_t DeviceTypeModifier:7; 837*291a2b48SSukumar Swaminathan uint8_t RemovableMedia:1; 838*291a2b48SSukumar Swaminathan 839*291a2b48SSukumar Swaminathan uint8_t Versions; 840*291a2b48SSukumar Swaminathan uint8_t ResponseDataFormat; 841*291a2b48SSukumar Swaminathan uint8_t AdditionalLength; 842*291a2b48SSukumar Swaminathan uint8_t Reserved[2]; 843*291a2b48SSukumar Swaminathan 844*291a2b48SSukumar Swaminathan uint8_t SoftReset:1; 845*291a2b48SSukumar Swaminathan uint8_t CommandQueue:1; 846*291a2b48SSukumar Swaminathan uint8_t Reserved2:1; 847*291a2b48SSukumar Swaminathan uint8_t LinkedCommands:1; 848*291a2b48SSukumar Swaminathan uint8_t Synchronous:1; 849*291a2b48SSukumar Swaminathan uint8_t Wide16Bit:1; 850*291a2b48SSukumar Swaminathan uint8_t Wide32Bit:1; 851*291a2b48SSukumar Swaminathan uint8_t RelativeAddressing:1; 852*291a2b48SSukumar Swaminathan 853*291a2b48SSukumar Swaminathan uint8_t VendorId[8]; 854*291a2b48SSukumar Swaminathan uint8_t ProductId[16]; 855*291a2b48SSukumar Swaminathan uint8_t ProductRevisionLevel[4]; 856*291a2b48SSukumar Swaminathan uint8_t VendorSpecific[20]; 857*291a2b48SSukumar Swaminathan uint8_t Reserved3[40]; 858fcf3ce44SJohn Forte } emlxs_inquiry_data_type_t; 859fcf3ce44SJohn Forte typedef emlxs_inquiry_data_type_t INQUIRY_DATA_DEF; 860fcf3ce44SJohn Forte 861fcf3ce44SJohn Forte 862*291a2b48SSukumar Swaminathan typedef struct emlxs_read_capacity_data 863*291a2b48SSukumar Swaminathan { 864*291a2b48SSukumar Swaminathan uint32_t LogicalBlockAddress; 865*291a2b48SSukumar Swaminathan uint32_t BytesPerBlock; 866fcf3ce44SJohn Forte } emlxs_read_capacity_data_t; 867fcf3ce44SJohn Forte typedef emlxs_read_capacity_data_t READ_CAPACITY_DATA_DEF; 868fcf3ce44SJohn Forte 869fcf3ce44SJohn Forte 870fcf3ce44SJohn Forte /* SCSI CDB command codes */ 871fcf3ce44SJohn Forte #define FCP_SCSI_FORMAT_UNIT 0x04 872fcf3ce44SJohn Forte #define FCP_SCSI_INQUIRY 0x12 873fcf3ce44SJohn Forte #define FCP_SCSI_MODE_SELECT 0x15 874fcf3ce44SJohn Forte #define FCP_SCSI_MODE_SENSE 0x1A 875fcf3ce44SJohn Forte #define FCP_SCSI_PAUSE_RESUME 0x4B 876fcf3ce44SJohn Forte #define FCP_SCSI_PLAY_AUDIO 0x45 877fcf3ce44SJohn Forte #define FCP_SCSI_PLAY_AUDIO_EXT 0xA5 878fcf3ce44SJohn Forte #define FCP_SCSI_PLAY_AUDIO_MSF 0x47 879fcf3ce44SJohn Forte #define FCP_SCSI_PLAY_AUDIO_TRK_INDX 0x48 880fcf3ce44SJohn Forte #define FCP_SCSI_PREVENT_ALLOW_REMOVAL 0x1E 881fcf3ce44SJohn Forte #define FCP_SCSI_READ_CMD 0x08 882fcf3ce44SJohn Forte #define FCP_SCSI_READ_BUFFER 0x3C 883fcf3ce44SJohn Forte #define FCP_SCSI_READ_CAPACITY 0x25 884fcf3ce44SJohn Forte #define FCP_SCSI_READ_DEFECT_LIST 0x37 885fcf3ce44SJohn Forte #define FCP_SCSI_READ_EXTENDED 0x28 886fcf3ce44SJohn Forte #define FCP_SCSI_READ_HEADER 0x44 887fcf3ce44SJohn Forte #define FCP_SCSI_READ_LONG 0xE8 888fcf3ce44SJohn Forte #define FCP_SCSI_READ_SUB_CHANNEL 0x42 889fcf3ce44SJohn Forte #define FCP_SCSI_READ_TOC 0x43 890fcf3ce44SJohn Forte #define FCP_SCSI_REASSIGN_BLOCK 0x07 891fcf3ce44SJohn Forte #define FCP_SCSI_RECEIVE_DIAGNOSTIC_RESULTS 0x1C 892fcf3ce44SJohn Forte #define FCP_SCSI_RELEASE_UNIT 0x17 893fcf3ce44SJohn Forte #define FCP_SCSI_REPORT_LUNS 0xa0 894fcf3ce44SJohn Forte #define FCP_SCSI_REQUEST_SENSE 0x03 895fcf3ce44SJohn Forte #define FCP_SCSI_RESERVE_UNIT 0x16 896fcf3ce44SJohn Forte #define FCP_SCSI_REZERO_UNIT 0x01 897fcf3ce44SJohn Forte #define FCP_SCSI_SEEK 0x0B 898fcf3ce44SJohn Forte #define FCP_SCSI_SEEK_EXTENDED 0x2B 899fcf3ce44SJohn Forte #define FCP_SCSI_SEND_DIAGNOSTIC 0x1D 900fcf3ce44SJohn Forte #define FCP_SCSI_START_STOP_UNIT 0x1B 901fcf3ce44SJohn Forte #define FCP_SCSI_TEST_UNIT_READY 0x00 902fcf3ce44SJohn Forte #define FCP_SCSI_VERIFY 0x2F 903fcf3ce44SJohn Forte #define FCP_SCSI_WRITE_CMD 0x0A 904fcf3ce44SJohn Forte #define FCP_SCSI_WRITE_AND_VERIFY 0x2E 905fcf3ce44SJohn Forte #define FCP_SCSI_WRITE_BUFFER 0x3B 906fcf3ce44SJohn Forte #define FCP_SCSI_WRITE_EXTENDED 0x2A 907fcf3ce44SJohn Forte #define FCP_SCSI_WRITE_LONG 0xEA 908fcf3ce44SJohn Forte #define FCP_SCSI_RELEASE_LUNR 0xBB 909fcf3ce44SJohn Forte #define FCP_SCSI_RELEASE_LUNV 0xBF 910fcf3ce44SJohn Forte 911fcf3ce44SJohn Forte #define HPVA_SETPASSTHROUGHMODE 0x27 912fcf3ce44SJohn Forte #define HPVA_EXECUTEPASSTHROUGH 0x29 913fcf3ce44SJohn Forte #define HPVA_CREATELUN 0xE2 914fcf3ce44SJohn Forte #define HPVA_SETLUNSECURITYLIST 0xED 915fcf3ce44SJohn Forte #define HPVA_SETCLOCK 0xF9 916fcf3ce44SJohn Forte #define HPVA_RECOVER 0xFA 917fcf3ce44SJohn Forte #define HPVA_GENERICSERVICEOUT 0xFD 918fcf3ce44SJohn Forte 919fcf3ce44SJohn Forte #define DMEP_EXPORT_IN 0x85 920fcf3ce44SJohn Forte #define DMEP_EXPORT_OUT 0x89 921fcf3ce44SJohn Forte 922fcf3ce44SJohn Forte #define MDACIOCTL_DIRECT_CMD 0x22 923fcf3ce44SJohn Forte #define MDACIOCTL_STOREIMAGE 0x2C 924fcf3ce44SJohn Forte #define MDACIOCTL_WRITESIGNATURE 0xA6 925fcf3ce44SJohn Forte #define MDACIOCTL_SETREALTIMECLOCK 0xAC 926fcf3ce44SJohn Forte #define MDACIOCTL_PASS_THRU_CDB 0xAD 927fcf3ce44SJohn Forte #define MDACIOCTL_PASS_THRU_INITIATE 0xAE 928fcf3ce44SJohn Forte #define MDACIOCTL_CREATENEWCONF 0xC0 929fcf3ce44SJohn Forte #define MDACIOCTL_ADDNEWCONF 0xC4 930fcf3ce44SJohn Forte #define MDACIOCTL_MORE 0xC6 931fcf3ce44SJohn Forte #define MDACIOCTL_SETPHYSDEVPARAMETER 0xC8 932fcf3ce44SJohn Forte #define MDACIOCTL_SETLOGDEVPARAMETER 0xCF 933fcf3ce44SJohn Forte #define MDACIOCTL_SETCONTROLLERPARAMETER 0xD1 934fcf3ce44SJohn Forte #define MDACIOCTL_WRITESANMAP 0xD4 935fcf3ce44SJohn Forte #define MDACIOCTL_SETMACADDRESS 0xD5 936fcf3ce44SJohn Forte 937fcf3ce44SJohn Forte /* 938fcf3ce44SJohn Forte * End of FCP specific structures 939fcf3ce44SJohn Forte */ 940fcf3ce44SJohn Forte 941*291a2b48SSukumar Swaminathan #define FL_ALPA 0x00 /* AL_PA of FL_Port */ 942fcf3ce44SJohn Forte 943fcf3ce44SJohn Forte /* Fibre Channel Service Parameter definitions */ 944fcf3ce44SJohn Forte 945*291a2b48SSukumar Swaminathan #define FC_PH_4_0 6 /* FC-PH version 4.0 */ 946*291a2b48SSukumar Swaminathan #define FC_PH_4_1 7 /* FC-PH version 4.1 */ 947*291a2b48SSukumar Swaminathan #define FC_PH_4_2 8 /* FC-PH version 4.2 */ 948*291a2b48SSukumar Swaminathan #define FC_PH_4_3 9 /* FC-PH version 4.3 */ 949fcf3ce44SJohn Forte 950*291a2b48SSukumar Swaminathan #define FC_PH_LOW 8 /* Lowest supported FC-PH version */ 951*291a2b48SSukumar Swaminathan #define FC_PH_HIGH 9 /* Highest supported FC-PH version */ 952*291a2b48SSukumar Swaminathan #define FC_PH3 0x20 /* FC-PH-3 version */ 953fcf3ce44SJohn Forte 954*291a2b48SSukumar Swaminathan #define FF_FRAME_SIZE 2048 955fcf3ce44SJohn Forte 956fcf3ce44SJohn Forte 957fcf3ce44SJohn Forte /* ==== Mailbox Commands ==== */ 958*291a2b48SSukumar Swaminathan #define MBX_SHUTDOWN 0x00 /* terminate testing */ 959*291a2b48SSukumar Swaminathan #define MBX_LOAD_SM 0x01 960*291a2b48SSukumar Swaminathan #define MBX_READ_NV 0x02 961*291a2b48SSukumar Swaminathan #define MBX_WRITE_NV 0x03 962*291a2b48SSukumar Swaminathan #define MBX_RUN_BIU_DIAG 0x04 963*291a2b48SSukumar Swaminathan #define MBX_INIT_LINK 0x05 964*291a2b48SSukumar Swaminathan #define MBX_DOWN_LINK 0x06 965*291a2b48SSukumar Swaminathan #define MBX_CONFIG_LINK 0x07 966*291a2b48SSukumar Swaminathan #define MBX_PART_SLIM 0x08 967*291a2b48SSukumar Swaminathan #define MBX_CONFIG_RING 0x09 968*291a2b48SSukumar Swaminathan #define MBX_RESET_RING 0x0A 969*291a2b48SSukumar Swaminathan #define MBX_READ_CONFIG 0x0B 970*291a2b48SSukumar Swaminathan #define MBX_READ_RCONFIG 0x0C 971*291a2b48SSukumar Swaminathan #define MBX_READ_SPARM 0x0D 972*291a2b48SSukumar Swaminathan #define MBX_READ_STATUS 0x0E 973*291a2b48SSukumar Swaminathan #define MBX_READ_RPI 0x0F 974*291a2b48SSukumar Swaminathan #define MBX_READ_XRI 0x10 975*291a2b48SSukumar Swaminathan #define MBX_READ_REV 0x11 976*291a2b48SSukumar Swaminathan #define MBX_READ_LNK_STAT 0x12 977*291a2b48SSukumar Swaminathan #define MBX_REG_LOGIN 0x13 978*291a2b48SSukumar Swaminathan #define MBX_UNREG_LOGIN 0x14 979*291a2b48SSukumar Swaminathan #define MBX_READ_LA 0x15 980*291a2b48SSukumar Swaminathan #define MBX_CLEAR_LA 0x16 981*291a2b48SSukumar Swaminathan #define MBX_DUMP_MEMORY 0x17 982*291a2b48SSukumar Swaminathan #define MBX_DUMP_CONTEXT 0x18 983*291a2b48SSukumar Swaminathan #define MBX_RUN_DIAGS 0x19 984*291a2b48SSukumar Swaminathan #define MBX_RESTART 0x1A 985*291a2b48SSukumar Swaminathan #define MBX_UPDATE_CFG 0x1B 986*291a2b48SSukumar Swaminathan #define MBX_DOWN_LOAD 0x1C 987*291a2b48SSukumar Swaminathan #define MBX_DEL_LD_ENTRY 0x1D 988*291a2b48SSukumar Swaminathan #define MBX_RUN_PROGRAM 0x1E 989*291a2b48SSukumar Swaminathan #define MBX_SET_MASK 0x20 990*291a2b48SSukumar Swaminathan #define MBX_SET_VARIABLE 0x21 991*291a2b48SSukumar Swaminathan #define MBX_UNREG_D_ID 0x23 992*291a2b48SSukumar Swaminathan #define MBX_KILL_BOARD 0x24 993*291a2b48SSukumar Swaminathan #define MBX_CONFIG_FARP 0x25 994*291a2b48SSukumar Swaminathan #define MBX_BEACON 0x2A 995*291a2b48SSukumar Swaminathan #define MBX_CONFIG_MSIX 0x30 996*291a2b48SSukumar Swaminathan #define MBX_HEARTBEAT 0x31 997*291a2b48SSukumar Swaminathan #define MBX_WRITE_VPARMS 0x32 998*291a2b48SSukumar Swaminathan #define MBX_ASYNC_EVENT 0x33 999fcf3ce44SJohn Forte 1000fcf3ce44SJohn Forte #define MBX_READ_EVENT_LOG_STATUS 0x37 1001*291a2b48SSukumar Swaminathan #define MBX_READ_EVENT_LOG 0x38 1002*291a2b48SSukumar Swaminathan #define MBX_WRITE_EVENT_LOG 0x39 1003fcf3ce44SJohn Forte #define MBX_NV_LOG 0x3A 1004*291a2b48SSukumar Swaminathan #define MBX_PORT_CAPABILITIES 0x3B 1005*291a2b48SSukumar Swaminathan #define MBX_IOV_CONTROL 0x3C 1006*291a2b48SSukumar Swaminathan #define MBX_IOV_MBX 0x3D 1007*291a2b48SSukumar Swaminathan 1008*291a2b48SSukumar Swaminathan 1009*291a2b48SSukumar Swaminathan #define MBX_CONFIG_HBQ 0x7C /* SLI3 */ 1010*291a2b48SSukumar Swaminathan #define MBX_LOAD_AREA 0x81 1011*291a2b48SSukumar Swaminathan #define MBX_RUN_BIU_DIAG64 0x84 1012*291a2b48SSukumar Swaminathan #define MBX_GET_DEBUG 0x86 1013*291a2b48SSukumar Swaminathan #define MBX_CONFIG_PORT 0x88 1014*291a2b48SSukumar Swaminathan #define MBX_READ_SPARM64 0x8D 1015*291a2b48SSukumar Swaminathan #define MBX_READ_RPI64 0x8F 1016*291a2b48SSukumar Swaminathan #define MBX_CONFIG_MSI 0x90 1017*291a2b48SSukumar Swaminathan #define MBX_REG_LOGIN64 0x93 1018*291a2b48SSukumar Swaminathan #define MBX_READ_LA64 0x95 1019*291a2b48SSukumar Swaminathan #define MBX_REG_VPI 0x96 /* NPIV */ 1020*291a2b48SSukumar Swaminathan #define MBX_UNREG_VPI 0x97 /* NPIV */ 1021*291a2b48SSukumar Swaminathan #define MBX_FLASH_WR_ULA 0x98 1022*291a2b48SSukumar Swaminathan #define MBX_SET_DEBUG 0x99 1023*291a2b48SSukumar Swaminathan #define MBX_LOAD_EXP_ROM 0x9C 1024*291a2b48SSukumar Swaminathan #define MBX_MAX_CMDS 0x9D 1025*291a2b48SSukumar Swaminathan #define MBX_SLI2_CMD_MASK 0x80 1026fcf3ce44SJohn Forte 1027fcf3ce44SJohn Forte 1028fcf3ce44SJohn Forte /* ==== IOCB Commands ==== */ 1029fcf3ce44SJohn Forte 1030fcf3ce44SJohn Forte #define CMD_RCV_SEQUENCE_CX 0x01 1031*291a2b48SSukumar Swaminathan #define CMD_XMIT_SEQUENCE_CR 0x02 1032*291a2b48SSukumar Swaminathan #define CMD_XMIT_SEQUENCE_CX 0x03 1033fcf3ce44SJohn Forte #define CMD_XMIT_BCAST_CN 0x04 1034fcf3ce44SJohn Forte #define CMD_XMIT_BCAST_CX 0x05 1035fcf3ce44SJohn Forte #define CMD_QUE_RING_BUF_CN 0x06 1036fcf3ce44SJohn Forte #define CMD_QUE_XRI_BUF_CX 0x07 1037*291a2b48SSukumar Swaminathan #define CMD_IOCB_CONTINUE_CN 0x08 1038fcf3ce44SJohn Forte #define CMD_RET_XRI_BUF_CX 0x09 1039fcf3ce44SJohn Forte #define CMD_ELS_REQUEST_CR 0x0A 1040fcf3ce44SJohn Forte #define CMD_ELS_REQUEST_CX 0x0B 1041fcf3ce44SJohn Forte #define CMD_RCV_ELS_REQ_CX 0x0D 1042fcf3ce44SJohn Forte #define CMD_ABORT_XRI_CN 0x0E 1043fcf3ce44SJohn Forte #define CMD_ABORT_XRI_CX 0x0F 1044fcf3ce44SJohn Forte #define CMD_CLOSE_XRI_CN 0x10 1045fcf3ce44SJohn Forte #define CMD_CLOSE_XRI_CX 0x11 1046fcf3ce44SJohn Forte #define CMD_CREATE_XRI_CR 0x12 1047fcf3ce44SJohn Forte #define CMD_CREATE_XRI_CX 0x13 1048fcf3ce44SJohn Forte #define CMD_GET_RPI_CN 0x14 1049fcf3ce44SJohn Forte #define CMD_XMIT_ELS_RSP_CX 0x15 1050fcf3ce44SJohn Forte #define CMD_GET_RPI_CR 0x16 1051fcf3ce44SJohn Forte #define CMD_XRI_ABORTED_CX 0x17 1052fcf3ce44SJohn Forte #define CMD_FCP_IWRITE_CR 0x18 1053fcf3ce44SJohn Forte #define CMD_FCP_IWRITE_CX 0x19 1054fcf3ce44SJohn Forte #define CMD_FCP_IREAD_CR 0x1A 1055fcf3ce44SJohn Forte #define CMD_FCP_IREAD_CX 0x1B 1056fcf3ce44SJohn Forte #define CMD_FCP_ICMND_CR 0x1C 1057fcf3ce44SJohn Forte #define CMD_FCP_ICMND_CX 0x1D 1058fcf3ce44SJohn Forte #define CMD_FCP_TSEND_CX 0x1F /* FCP_TARGET_MODE */ 1059fcf3ce44SJohn Forte #define CMD_ADAPTER_MSG 0x20 1060fcf3ce44SJohn Forte #define CMD_FCP_TRECEIVE_CX 0x21 /* FCP_TARGET_MODE */ 1061fcf3ce44SJohn Forte #define CMD_ADAPTER_DUMP 0x22 1062fcf3ce44SJohn Forte #define CMD_FCP_TRSP_CX 0x23 /* FCP_TARGET_MODE */ 1063fcf3ce44SJohn Forte #define CMD_FCP_AUTO_TRSP_CX 0x29 /* FCP_TARGET_MODE */ 1064fcf3ce44SJohn Forte 1065fcf3ce44SJohn Forte /* LP3000 gasket IOCB Command Set */ 1066fcf3ce44SJohn Forte 1067fcf3ce44SJohn Forte #define CMD_BPL_IWRITE_CR 0x48 1068fcf3ce44SJohn Forte #define CMD_BPL_IWRITE_CX 0x49 1069fcf3ce44SJohn Forte #define CMD_BPL_IREAD_CR 0x4A 1070fcf3ce44SJohn Forte #define CMD_BPL_IREAD_CX 0x4B 1071fcf3ce44SJohn Forte #define CMD_BPL_ICMND_CR 0x4C 1072fcf3ce44SJohn Forte #define CMD_BPL_ICMND_CX 0x4D 1073fcf3ce44SJohn Forte 1074fcf3ce44SJohn Forte #define CMD_ASYNC_STATUS 0x7C 1075fcf3ce44SJohn Forte 1076fcf3ce44SJohn Forte /* SLI_2 IOCB Command Set */ 1077*291a2b48SSukumar Swaminathan #define CMD_RCV_SEQUENCE64_CX 0x81 1078*291a2b48SSukumar Swaminathan #define CMD_XMIT_SEQUENCE64_CR 0x82 1079*291a2b48SSukumar Swaminathan #define CMD_XMIT_SEQUENCE64_CX 0x83 1080fcf3ce44SJohn Forte #define CMD_XMIT_BCAST64_CN 0x84 1081fcf3ce44SJohn Forte #define CMD_XMIT_BCAST64_CX 0x85 1082*291a2b48SSukumar Swaminathan #define CMD_QUE_RING_BUF64_CN 0x86 1083*291a2b48SSukumar Swaminathan #define CMD_QUE_XRI_BUF64_CX 0x87 1084*291a2b48SSukumar Swaminathan #define CMD_IOCB_CONTINUE64_CN 0x88 1085*291a2b48SSukumar Swaminathan #define CMD_RET_XRI_BUF64_CX 0x89 1086*291a2b48SSukumar Swaminathan #define CMD_ELS_REQUEST64_CR 0x8A 1087*291a2b48SSukumar Swaminathan #define CMD_ELS_REQUEST64_CX 0x8B 1088*291a2b48SSukumar Swaminathan #define CMD_RCV_ELS_REQ64_CX 0x8D 1089*291a2b48SSukumar Swaminathan #define CMD_XMIT_ELS_RSP64_CX 0x95 1090fcf3ce44SJohn Forte #define CMD_FCP_IWRITE64_CR 0x98 1091fcf3ce44SJohn Forte #define CMD_FCP_IWRITE64_CX 0x99 1092fcf3ce44SJohn Forte #define CMD_FCP_IREAD64_CR 0x9A 1093fcf3ce44SJohn Forte #define CMD_FCP_IREAD64_CX 0x9B 1094fcf3ce44SJohn Forte #define CMD_FCP_ICMND64_CR 0x9C 1095fcf3ce44SJohn Forte #define CMD_FCP_ICMND64_CX 0x9D 1096fcf3ce44SJohn Forte #define CMD_FCP_TSEND64_CX 0x9F /* FCP_TARGET_MODE */ 1097*291a2b48SSukumar Swaminathan #define CMD_FCP_TRECEIVE64_CX 0xA1 /* FCP_TARGET_MODE */ 1098fcf3ce44SJohn Forte #define CMD_FCP_TRSP64_CX 0xA3 /* FCP_TARGET_MODE */ 1099fcf3ce44SJohn Forte #define CMD_RCV_SEQ64_CX 0xB5 /* SLI3 */ 1100fcf3ce44SJohn Forte #define CMD_RCV_ELS64_CX 0xB7 /* SLI3 */ 1101fcf3ce44SJohn Forte #define CMD_RCV_CONT64_CX 0xBB /* SLI3 */ 1102*291a2b48SSukumar Swaminathan #define CMD_RCV_SEQ_LIST64_CX 0xC1 1103fcf3ce44SJohn Forte #define CMD_GEN_REQUEST64_CR 0xC2 1104fcf3ce44SJohn Forte #define CMD_GEN_REQUEST64_CX 0xC3 1105*291a2b48SSukumar Swaminathan #define CMD_QUE_RING_LIST64_CN 0xC6 1106fcf3ce44SJohn Forte 1107fcf3ce44SJohn Forte /* 1108fcf3ce44SJohn Forte * Define Status 1109fcf3ce44SJohn Forte */ 1110*291a2b48SSukumar Swaminathan #define MBX_SUCCESS 0x0 1111*291a2b48SSukumar Swaminathan #define MBX_FAILURE 0x1 1112*291a2b48SSukumar Swaminathan #define MBXERR_NUM_IOCBS 0x2 1113*291a2b48SSukumar Swaminathan #define MBXERR_IOCBS_EXCEEDED 0x3 1114*291a2b48SSukumar Swaminathan #define MBXERR_BAD_RING_NUMBER 0x4 1115*291a2b48SSukumar Swaminathan #define MBXERR_MASK_ENTRIES_RANGE 0x5 1116*291a2b48SSukumar Swaminathan #define MBXERR_MASKS_EXCEEDED 0x6 1117*291a2b48SSukumar Swaminathan #define MBXERR_BAD_PROFILE 0x7 1118*291a2b48SSukumar Swaminathan #define MBXERR_BAD_DEF_CLASS 0x8 1119*291a2b48SSukumar Swaminathan #define MBXERR_BAD_MAX_RESPONDER 0x9 1120fcf3ce44SJohn Forte #define MBXERR_BAD_MAX_ORIGINATOR 0xA 1121fcf3ce44SJohn Forte #define MBXERR_RPI_REGISTERED 0xB 1122fcf3ce44SJohn Forte #define MBXERR_RPI_FULL 0xC 1123fcf3ce44SJohn Forte #define MBXERR_NO_RESOURCES 0xD 1124fcf3ce44SJohn Forte #define MBXERR_BAD_RCV_LENGTH 0xE 1125fcf3ce44SJohn Forte #define MBXERR_DMA_ERROR 0xF 1126fcf3ce44SJohn Forte #define MBXERR_NOT_SUPPORTED 0x10 1127fcf3ce44SJohn Forte #define MBXERR_UNSUPPORTED_FEATURE 0x11 1128fcf3ce44SJohn Forte #define MBXERR_UNKNOWN_COMMAND 0x12 1129fcf3ce44SJohn Forte 1130fcf3ce44SJohn Forte /* Driver special codes */ 1131fcf3ce44SJohn Forte #define MBX_OVERTEMP_ERROR 0xFA 1132fcf3ce44SJohn Forte #define MBX_HARDWARE_ERROR 0xFB 1133fcf3ce44SJohn Forte #define MBX_DRVR_ERROR 0xFC 1134fcf3ce44SJohn Forte #define MBX_BUSY 0xFD 1135fcf3ce44SJohn Forte #define MBX_TIMEOUT 0xFE 1136fcf3ce44SJohn Forte #define MBX_NOT_FINISHED 0xFF 1137fcf3ce44SJohn Forte 1138fcf3ce44SJohn Forte 1139fcf3ce44SJohn Forte /* 1140fcf3ce44SJohn Forte * flags for emlxs_mb_issue_cmd() 1141fcf3ce44SJohn Forte */ 1142*291a2b48SSukumar Swaminathan #define MBX_POLL 0x01 /* poll mailbox till command done, */ 1143*291a2b48SSukumar Swaminathan /* then return */ 1144*291a2b48SSukumar Swaminathan #define MBX_SLEEP 0x02 /* sleep till mailbox intr cmpl */ 1145*291a2b48SSukumar Swaminathan /* wakes thread up */ 1146fcf3ce44SJohn Forte #define MBX_WAIT 0x03 /* wait for comand done, then return */ 1147fcf3ce44SJohn Forte #define MBX_NOWAIT 0x04 /* issue command then return immediately */ 1148fcf3ce44SJohn Forte 1149*291a2b48SSukumar Swaminathan typedef struct emlxs_rings 1150*291a2b48SSukumar Swaminathan { 1151fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 1152*291a2b48SSukumar Swaminathan uint32_t crReserved:16; 1153*291a2b48SSukumar Swaminathan uint32_t crBegin:8; 1154*291a2b48SSukumar Swaminathan uint32_t crEnd:8; /* Low order bit first word */ 1155*291a2b48SSukumar Swaminathan uint32_t rrReserved:16; 1156*291a2b48SSukumar Swaminathan uint32_t rrBegin:8; 1157*291a2b48SSukumar Swaminathan uint32_t rrEnd:8; /* Low order bit second word */ 1158fcf3ce44SJohn Forte #endif 1159fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 1160*291a2b48SSukumar Swaminathan uint32_t crEnd:8; /* Low order bit first word */ 1161*291a2b48SSukumar Swaminathan uint32_t crBegin:8; 1162*291a2b48SSukumar Swaminathan uint32_t crReserved:16; 1163*291a2b48SSukumar Swaminathan uint32_t rrEnd:8; /* Low order bit second word */ 1164*291a2b48SSukumar Swaminathan uint32_t rrBegin:8; 1165*291a2b48SSukumar Swaminathan uint32_t rrReserved:16; 1166fcf3ce44SJohn Forte #endif 1167fcf3ce44SJohn Forte } emlxs_rings_t; 1168fcf3ce44SJohn Forte typedef emlxs_rings_t RINGS; 1169fcf3ce44SJohn Forte 1170fcf3ce44SJohn Forte 1171*291a2b48SSukumar Swaminathan typedef struct emlxs_ring_def 1172*291a2b48SSukumar Swaminathan { 1173fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 1174*291a2b48SSukumar Swaminathan uint16_t offCiocb; 1175*291a2b48SSukumar Swaminathan uint16_t numCiocb; 1176*291a2b48SSukumar Swaminathan uint16_t offRiocb; 1177*291a2b48SSukumar Swaminathan uint16_t numRiocb; 1178fcf3ce44SJohn Forte #endif 1179fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 1180*291a2b48SSukumar Swaminathan uint16_t numCiocb; 1181*291a2b48SSukumar Swaminathan uint16_t offCiocb; 1182*291a2b48SSukumar Swaminathan uint16_t numRiocb; 1183*291a2b48SSukumar Swaminathan uint16_t offRiocb; 1184fcf3ce44SJohn Forte #endif 1185fcf3ce44SJohn Forte } emlxs_ring_def_t; 1186fcf3ce44SJohn Forte typedef emlxs_ring_def_t RING_DEF; 1187fcf3ce44SJohn Forte 1188fcf3ce44SJohn Forte 1189fcf3ce44SJohn Forte /* 1190fcf3ce44SJohn Forte * The following F.C. frame stuctures are defined in Big Endian format. 1191fcf3ce44SJohn Forte */ 1192fcf3ce44SJohn Forte 1193*291a2b48SSukumar Swaminathan typedef struct emlxs_name_type 1194*291a2b48SSukumar Swaminathan { 1195fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 1196*291a2b48SSukumar Swaminathan uint8_t nameType:4; /* FC Word 0, bit 28:31 */ 1197*291a2b48SSukumar Swaminathan uint8_t IEEEextMsn:4; /* FC Word 0, bit 24:27, bit 8:11 */ 1198*291a2b48SSukumar Swaminathan /* of IEEE ext */ 1199fcf3ce44SJohn Forte #endif 1200fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 1201*291a2b48SSukumar Swaminathan uint8_t IEEEextMsn:4; /* FC Word 0, bit 24:27, bit 8:11 */ 1202*291a2b48SSukumar Swaminathan /* of IEEE ext */ 1203*291a2b48SSukumar Swaminathan uint8_t nameType:4; /* FC Word 0, bit 28:31 */ 1204fcf3ce44SJohn Forte #endif 1205fcf3ce44SJohn Forte #define NAME_IEEE 0x1 /* IEEE name - nameType */ 1206fcf3ce44SJohn Forte #define NAME_IEEE_EXT 0x2 /* IEEE extended name */ 1207fcf3ce44SJohn Forte #define NAME_FC_TYPE 0x3 /* FC native name type */ 1208fcf3ce44SJohn Forte #define NAME_IP_TYPE 0x4 /* IP address */ 1209fcf3ce44SJohn Forte #define NAME_CCITT_TYPE 0xC 1210fcf3ce44SJohn Forte #define NAME_CCITT_GR_TYPE 0xE 1211*291a2b48SSukumar Swaminathan uint8_t IEEEextLsb; /* FC Word 0, bit 16:23, */ 1212*291a2b48SSukumar Swaminathan /* IEEE extended Lsb */ 1213*291a2b48SSukumar Swaminathan uint8_t IEEE[6]; /* FC IEEE address */ 1214fcf3ce44SJohn Forte } emlxs_name_type_t; 1215fcf3ce44SJohn Forte typedef emlxs_name_type_t NAME_TYPE; 1216fcf3ce44SJohn Forte 1217fcf3ce44SJohn Forte 1218*291a2b48SSukumar Swaminathan typedef struct emlxs_csp 1219*291a2b48SSukumar Swaminathan { 1220*291a2b48SSukumar Swaminathan uint8_t fcphHigh; /* FC Word 0, byte 0 */ 1221*291a2b48SSukumar Swaminathan uint8_t fcphLow; 1222*291a2b48SSukumar Swaminathan uint8_t bbCreditMsb; 1223*291a2b48SSukumar Swaminathan uint8_t bbCreditlsb; /* FC Word 0, byte 3 */ 1224fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 1225*291a2b48SSukumar Swaminathan uint16_t reqMultipleNPort:1; /* FC Word 1, bit 31 */ 1226*291a2b48SSukumar Swaminathan uint16_t randomOffset:1; /* FC Word 1, bit 30 */ 1227*291a2b48SSukumar Swaminathan uint16_t rspMultipleNPort:1; /* FC Word 1, bit 29 */ 1228*291a2b48SSukumar Swaminathan uint16_t fPort:1; /* FC Word 1, bit 28 */ 1229*291a2b48SSukumar Swaminathan uint16_t altBbCredit:1; /* FC Word 1, bit 27 */ 1230*291a2b48SSukumar Swaminathan uint16_t edtovResolution:1; /* FC Word 1, bit 26 */ 1231*291a2b48SSukumar Swaminathan uint16_t multicast:1; /* FC Word 1, bit 25 */ 1232*291a2b48SSukumar Swaminathan uint16_t broadcast:1; /* FC Word 1, bit 24 */ 1233*291a2b48SSukumar Swaminathan 1234*291a2b48SSukumar Swaminathan uint16_t huntgroup:1; /* FC Word 1, bit 23 */ 1235*291a2b48SSukumar Swaminathan uint16_t simplex:1; /* FC Word 1, bit 22 */ 1236*291a2b48SSukumar Swaminathan 1237*291a2b48SSukumar Swaminathan uint16_t fcsp_support:1; /* FC Word 1, bit 21 */ 1238*291a2b48SSukumar Swaminathan uint16_t word1Reserved20:1; /* FC Word 1, bit 20 */ 1239*291a2b48SSukumar Swaminathan uint16_t word1Reserved19:1; /* FC Word 1, bit 19 */ 1240*291a2b48SSukumar Swaminathan 1241*291a2b48SSukumar Swaminathan uint16_t dhd:1; /* FC Word 1, bit 18 */ 1242*291a2b48SSukumar Swaminathan uint16_t contIncSeqCnt:1; /* FC Word 1, bit 17 */ 1243*291a2b48SSukumar Swaminathan uint16_t payloadlength:1; /* FC Word 1, bit 16 */ 1244fcf3ce44SJohn Forte #endif 1245fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 1246*291a2b48SSukumar Swaminathan uint16_t broadcast:1; /* FC Word 1, bit 24 */ 1247*291a2b48SSukumar Swaminathan uint16_t multicast:1; /* FC Word 1, bit 25 */ 1248*291a2b48SSukumar Swaminathan uint16_t edtovResolution:1; /* FC Word 1, bit 26 */ 1249*291a2b48SSukumar Swaminathan uint16_t altBbCredit:1; /* FC Word 1, bit 27 */ 1250*291a2b48SSukumar Swaminathan uint16_t fPort:1; /* FC Word 1, bit 28 */ 1251*291a2b48SSukumar Swaminathan uint16_t rspMultipleNPort:1; /* FC Word 1, bit 29 */ 1252*291a2b48SSukumar Swaminathan uint16_t randomOffset:1; /* FC Word 1, bit 30 */ 1253*291a2b48SSukumar Swaminathan uint16_t reqMultipleNPort:1; /* FC Word 1, bit 31 */ 1254*291a2b48SSukumar Swaminathan 1255*291a2b48SSukumar Swaminathan uint16_t payloadlength:1; /* FC Word 1, bit 16 */ 1256*291a2b48SSukumar Swaminathan uint16_t contIncSeqCnt:1; /* FC Word 1, bit 17 */ 1257*291a2b48SSukumar Swaminathan uint16_t dhd:1; /* FC Word 1, bit 18 */ 1258*291a2b48SSukumar Swaminathan 1259*291a2b48SSukumar Swaminathan uint16_t word1Reserved19:1; /* FC Word 1, bit 19 */ 1260*291a2b48SSukumar Swaminathan uint16_t word1Reserved20:1; /* FC Word 1, bit 20 */ 1261*291a2b48SSukumar Swaminathan uint16_t fcsp_support:1; /* FC Word 1, bit 21 */ 1262*291a2b48SSukumar Swaminathan 1263*291a2b48SSukumar Swaminathan uint16_t simplex:1; /* FC Word 1, bit 22 */ 1264*291a2b48SSukumar Swaminathan uint16_t huntgroup:1; /* FC Word 1, bit 23 */ 1265*291a2b48SSukumar Swaminathan #endif 1266*291a2b48SSukumar Swaminathan uint8_t bbRcvSizeMsb; /* Upper nibble is reserved */ 1267*291a2b48SSukumar Swaminathan uint8_t bbRcvSizeLsb; /* FC Word 1, byte 3 */ 1268*291a2b48SSukumar Swaminathan union 1269*291a2b48SSukumar Swaminathan { 1270*291a2b48SSukumar Swaminathan struct 1271*291a2b48SSukumar Swaminathan { 1272*291a2b48SSukumar Swaminathan uint8_t word2Reserved1; /* FC Word 2 byte 0 */ 1273*291a2b48SSukumar Swaminathan 1274*291a2b48SSukumar Swaminathan uint8_t totalConcurrSeq; /* FC Word 2 byte 1 */ 1275*291a2b48SSukumar Swaminathan uint8_t roByCategoryMsb; /* FC Word 2 byte 2 */ 1276*291a2b48SSukumar Swaminathan 1277*291a2b48SSukumar Swaminathan uint8_t roByCategoryLsb; /* FC Word 2 byte 3 */ 1278fcf3ce44SJohn Forte } nPort; 1279*291a2b48SSukumar Swaminathan uint32_t r_a_tov; /* R_A_TOV must be in Big */ 1280*291a2b48SSukumar Swaminathan /* Endian format */ 1281fcf3ce44SJohn Forte } w2; 1282fcf3ce44SJohn Forte 1283*291a2b48SSukumar Swaminathan uint32_t e_d_tov; /* E_D_TOV must be in Big */ 1284*291a2b48SSukumar Swaminathan /* Endian format */ 1285fcf3ce44SJohn Forte } emlxs_csp_t; 1286fcf3ce44SJohn Forte typedef emlxs_csp_t CSP; 1287fcf3ce44SJohn Forte 1288fcf3ce44SJohn Forte 1289*291a2b48SSukumar Swaminathan typedef struct emlxs_class_parms 1290*291a2b48SSukumar Swaminathan { 1291fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 1292*291a2b48SSukumar Swaminathan uint8_t classValid:1; /* FC Word 0, bit 31 */ 1293*291a2b48SSukumar Swaminathan uint8_t intermix:1; /* FC Word 0, bit 30 */ 1294*291a2b48SSukumar Swaminathan uint8_t stackedXparent:1; /* FC Word 0, bit 29 */ 1295*291a2b48SSukumar Swaminathan uint8_t stackedLockDown:1; /* FC Word 0, bit 28 */ 1296*291a2b48SSukumar Swaminathan uint8_t seqDelivery:1; /* FC Word 0, bit 27 */ 1297*291a2b48SSukumar Swaminathan uint8_t word0Reserved1:3; /* FC Word 0, bit 24:26 */ 1298fcf3ce44SJohn Forte #endif 1299fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 1300*291a2b48SSukumar Swaminathan uint8_t word0Reserved1:3; /* FC Word 0, bit 24:26 */ 1301*291a2b48SSukumar Swaminathan uint8_t seqDelivery:1; /* FC Word 0, bit 27 */ 1302*291a2b48SSukumar Swaminathan uint8_t stackedLockDown:1; /* FC Word 0, bit 28 */ 1303*291a2b48SSukumar Swaminathan uint8_t stackedXparent:1; /* FC Word 0, bit 29 */ 1304*291a2b48SSukumar Swaminathan uint8_t intermix:1; /* FC Word 0, bit 30 */ 1305*291a2b48SSukumar Swaminathan uint8_t classValid:1; /* FC Word 0, bit 31 */ 1306fcf3ce44SJohn Forte 1307fcf3ce44SJohn Forte #endif 1308*291a2b48SSukumar Swaminathan uint8_t word0Reserved2; /* FC Word 0, bit 16:23 */ 1309fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 1310*291a2b48SSukumar Swaminathan uint8_t iCtlXidReAssgn:2; /* FC Word 0, Bit 14:15 */ 1311*291a2b48SSukumar Swaminathan uint8_t iCtlInitialPa:2; /* FC Word 0, bit 12:13 */ 1312*291a2b48SSukumar Swaminathan uint8_t iCtlAck0capable:1; /* FC Word 0, bit 11 */ 1313*291a2b48SSukumar Swaminathan uint8_t iCtlAckNcapable:1; /* FC Word 0, bit 10 */ 1314*291a2b48SSukumar Swaminathan uint8_t word0Reserved3:2; /* FC Word 0, bit 8: 9 */ 1315fcf3ce44SJohn Forte #endif 1316fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 1317*291a2b48SSukumar Swaminathan uint8_t word0Reserved3:2; /* FC Word 0, bit 8: 9 */ 1318*291a2b48SSukumar Swaminathan uint8_t iCtlAckNcapable:1; /* FC Word 0, bit 10 */ 1319*291a2b48SSukumar Swaminathan uint8_t iCtlAck0capable:1; /* FC Word 0, bit 11 */ 1320*291a2b48SSukumar Swaminathan uint8_t iCtlInitialPa:2; /* FC Word 0, bit 12:13 */ 1321*291a2b48SSukumar Swaminathan uint8_t iCtlXidReAssgn:2; /* FC Word 0, Bit 14:15 */ 1322fcf3ce44SJohn Forte #endif 1323*291a2b48SSukumar Swaminathan uint8_t word0Reserved4; /* FC Word 0, bit 0: 7 */ 1324fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 1325*291a2b48SSukumar Swaminathan uint8_t rCtlAck0capable:1; /* FC Word 1, bit 31 */ 1326*291a2b48SSukumar Swaminathan uint8_t rCtlAckNcapable:1; /* FC Word 1, bit 30 */ 1327*291a2b48SSukumar Swaminathan uint8_t rCtlXidInterlck:1; /* FC Word 1, bit 29 */ 1328*291a2b48SSukumar Swaminathan uint8_t rCtlErrorPolicy:2; /* FC Word 1, bit 27:28 */ 1329*291a2b48SSukumar Swaminathan uint8_t word1Reserved1:1; /* FC Word 1, bit 26 */ 1330*291a2b48SSukumar Swaminathan uint8_t rCtlCatPerSeq:2; /* FC Word 1, bit 24:25 */ 1331fcf3ce44SJohn Forte #endif 1332fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 1333*291a2b48SSukumar Swaminathan uint8_t rCtlCatPerSeq:2; /* FC Word 1, bit 24:25 */ 1334*291a2b48SSukumar Swaminathan uint8_t word1Reserved1:1; /* FC Word 1, bit 26 */ 1335*291a2b48SSukumar Swaminathan uint8_t rCtlErrorPolicy:2; /* FC Word 1, bit 27:28 */ 1336*291a2b48SSukumar Swaminathan uint8_t rCtlXidInterlck:1; /* FC Word 1, bit 29 */ 1337*291a2b48SSukumar Swaminathan uint8_t rCtlAckNcapable:1; /* FC Word 1, bit 30 */ 1338*291a2b48SSukumar Swaminathan uint8_t rCtlAck0capable:1; /* FC Word 1, bit 31 */ 1339*291a2b48SSukumar Swaminathan #endif 1340*291a2b48SSukumar Swaminathan uint8_t word1Reserved2; /* FC Word 1, bit 16:23 */ 1341*291a2b48SSukumar Swaminathan uint8_t rcvDataSizeMsb; /* FC Word 1, bit 8:15 */ 1342*291a2b48SSukumar Swaminathan uint8_t rcvDataSizeLsb; /* FC Word 1, bit 0: 7 */ 1343*291a2b48SSukumar Swaminathan 1344*291a2b48SSukumar Swaminathan uint8_t concurrentSeqMsb; /* FC Word 2, bit 24:31 */ 1345*291a2b48SSukumar Swaminathan uint8_t concurrentSeqLsb; /* FC Word 2, bit 16:23 */ 1346*291a2b48SSukumar Swaminathan uint8_t EeCreditSeqMsb; /* FC Word 2, bit 8:15 */ 1347*291a2b48SSukumar Swaminathan uint8_t EeCreditSeqLsb; /* FC Word 2, bit 0: 7 */ 1348*291a2b48SSukumar Swaminathan 1349*291a2b48SSukumar Swaminathan uint8_t openSeqPerXchgMsb; /* FC Word 3, bit 24:31 */ 1350*291a2b48SSukumar Swaminathan uint8_t openSeqPerXchgLsb; /* FC Word 3, bit 16:23 */ 1351*291a2b48SSukumar Swaminathan uint8_t word3Reserved1; /* Fc Word 3, bit 8:15 */ 1352*291a2b48SSukumar Swaminathan uint8_t word3Reserved2; /* Fc Word 3, bit 0: 7 */ 1353fcf3ce44SJohn Forte } emlxs_class_parms_t; 1354fcf3ce44SJohn Forte typedef emlxs_class_parms_t CLASS_PARMS; 1355fcf3ce44SJohn Forte 1356fcf3ce44SJohn Forte 1357*291a2b48SSukumar Swaminathan typedef struct emlxs_serv_parms 1358*291a2b48SSukumar Swaminathan { /* Structure is in Big Endian format */ 1359*291a2b48SSukumar Swaminathan CSP cmn; 1360*291a2b48SSukumar Swaminathan NAME_TYPE portName; 1361*291a2b48SSukumar Swaminathan NAME_TYPE nodeName; 1362*291a2b48SSukumar Swaminathan CLASS_PARMS cls1; 1363*291a2b48SSukumar Swaminathan CLASS_PARMS cls2; 1364*291a2b48SSukumar Swaminathan CLASS_PARMS cls3; 1365*291a2b48SSukumar Swaminathan CLASS_PARMS cls4; 1366*291a2b48SSukumar Swaminathan uint8_t vendorVersion[16]; 1367fcf3ce44SJohn Forte } emlxs_serv_parms_t; 1368fcf3ce44SJohn Forte typedef emlxs_serv_parms_t SERV_PARM; 1369fcf3ce44SJohn Forte 1370*291a2b48SSukumar Swaminathan typedef struct 1371*291a2b48SSukumar Swaminathan { 1372*291a2b48SSukumar Swaminathan union 1373*291a2b48SSukumar Swaminathan { 1374*291a2b48SSukumar Swaminathan uint32_t word0; 1375*291a2b48SSukumar Swaminathan struct 1376*291a2b48SSukumar Swaminathan { 1377fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 1378fcf3ce44SJohn Forte uint32_t rsvd0:8; /* Word 0, Byte 3 */ 1379*291a2b48SSukumar Swaminathan uint32_t oui:24; /* Elx Organization */ 1380*291a2b48SSukumar Swaminathan /* Unique ID (0000C9) */ 1381fcf3ce44SJohn Forte #endif 1382fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 1383*291a2b48SSukumar Swaminathan uint32_t oui:24; /* Elx Organization */ 1384*291a2b48SSukumar Swaminathan /* Unique ID (0000C9) */ 1385fcf3ce44SJohn Forte uint32_t rsvd0:8; /* Word 0, Byte 3 */ 1386fcf3ce44SJohn Forte #endif 1387fcf3ce44SJohn Forte } w0; 1388fcf3ce44SJohn Forte } un0; 1389*291a2b48SSukumar Swaminathan union 1390*291a2b48SSukumar Swaminathan { 1391*291a2b48SSukumar Swaminathan uint32_t word1; 1392*291a2b48SSukumar Swaminathan struct 1393*291a2b48SSukumar Swaminathan { 1394fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 1395fcf3ce44SJohn Forte uint32_t vport:1; /* Word 1, Bit 31 */ 1396fcf3ce44SJohn Forte uint32_t rsvd1:31; /* Word 1, Bit 0-30 */ 1397fcf3ce44SJohn Forte #endif 1398fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 1399fcf3ce44SJohn Forte uint32_t rsvd1:31; /* Word 1, Bit 0-30 */ 1400fcf3ce44SJohn Forte uint32_t vport:1; /* Word 1, Bit 31 */ 1401fcf3ce44SJohn Forte #endif 1402fcf3ce44SJohn Forte } w1; 1403fcf3ce44SJohn Forte } un1; 1404*291a2b48SSukumar Swaminathan uint8_t rsvd2[8]; 1405fcf3ce44SJohn Forte } emlxs_vvl_fmt_t; 1406fcf3ce44SJohn Forte 1407fcf3ce44SJohn Forte #define valid_vendor_version cmn.rspMultipleNPort 1408fcf3ce44SJohn Forte 1409fcf3ce44SJohn Forte 1410fcf3ce44SJohn Forte 1411fcf3ce44SJohn Forte /* 1412fcf3ce44SJohn Forte * Extended Link Service LS_COMMAND codes (Payload BYTE 0) 1413fcf3ce44SJohn Forte */ 1414fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 1415*291a2b48SSukumar Swaminathan #define ELS_CMD_SHIFT 24 1416*291a2b48SSukumar Swaminathan #define ELS_CMD_MASK 0xff000000 1417*291a2b48SSukumar Swaminathan #define ELS_RSP_MASK 0xff000000 1418*291a2b48SSukumar Swaminathan #define ELS_CMD_LS_RJT 0x01000000 1419*291a2b48SSukumar Swaminathan #define ELS_CMD_ACC 0x02000000 1420*291a2b48SSukumar Swaminathan #define ELS_CMD_PLOGI 0x03000000 1421*291a2b48SSukumar Swaminathan #define ELS_CMD_FLOGI 0x04000000 1422*291a2b48SSukumar Swaminathan #define ELS_CMD_LOGO 0x05000000 1423*291a2b48SSukumar Swaminathan #define ELS_CMD_ABTX 0x06000000 1424*291a2b48SSukumar Swaminathan #define ELS_CMD_RCS 0x07000000 1425*291a2b48SSukumar Swaminathan #define ELS_CMD_RES 0x08000000 1426*291a2b48SSukumar Swaminathan #define ELS_CMD_RSS 0x09000000 1427*291a2b48SSukumar Swaminathan #define ELS_CMD_RSI 0x0A000000 1428*291a2b48SSukumar Swaminathan #define ELS_CMD_ESTS 0x0B000000 1429*291a2b48SSukumar Swaminathan #define ELS_CMD_ESTC 0x0C000000 1430*291a2b48SSukumar Swaminathan #define ELS_CMD_ADVC 0x0D000000 1431*291a2b48SSukumar Swaminathan #define ELS_CMD_RTV 0x0E000000 1432*291a2b48SSukumar Swaminathan #define ELS_CMD_RLS 0x0F000000 1433*291a2b48SSukumar Swaminathan #define ELS_CMD_ECHO 0x10000000 1434*291a2b48SSukumar Swaminathan #define ELS_CMD_TEST 0x11000000 1435*291a2b48SSukumar Swaminathan #define ELS_CMD_RRQ 0x12000000 1436*291a2b48SSukumar Swaminathan #define ELS_CMD_PRLI 0x20000000 1437*291a2b48SSukumar Swaminathan #define ELS_CMD_PRLO 0x21000000 1438*291a2b48SSukumar Swaminathan #define ELS_CMD_SCN 0x22000000 1439*291a2b48SSukumar Swaminathan #define ELS_CMD_TPLS 0x23000000 1440*291a2b48SSukumar Swaminathan #define ELS_CMD_GPRLO 0x24000000 1441*291a2b48SSukumar Swaminathan #define ELS_CMD_GAID 0x30000000 1442*291a2b48SSukumar Swaminathan #define ELS_CMD_FACT 0x31000000 1443*291a2b48SSukumar Swaminathan #define ELS_CMD_FDACT 0x32000000 1444*291a2b48SSukumar Swaminathan #define ELS_CMD_NACT 0x33000000 1445*291a2b48SSukumar Swaminathan #define ELS_CMD_NDACT 0x34000000 1446*291a2b48SSukumar Swaminathan #define ELS_CMD_QoSR 0x40000000 1447*291a2b48SSukumar Swaminathan #define ELS_CMD_RVCS 0x41000000 1448*291a2b48SSukumar Swaminathan #define ELS_CMD_PDISC 0x50000000 1449*291a2b48SSukumar Swaminathan #define ELS_CMD_FDISC 0x51000000 1450*291a2b48SSukumar Swaminathan #define ELS_CMD_ADISC 0x52000000 1451*291a2b48SSukumar Swaminathan #define ELS_CMD_FARP 0x54000000 1452*291a2b48SSukumar Swaminathan #define ELS_CMD_FARPR 0x55000000 1453*291a2b48SSukumar Swaminathan #define ELS_CMD_FAN 0x60000000 1454*291a2b48SSukumar Swaminathan #define ELS_CMD_RSCN 0x61000000 1455*291a2b48SSukumar Swaminathan #define ELS_CMD_SCR 0x62000000 1456*291a2b48SSukumar Swaminathan #define ELS_CMD_LINIT 0x70000000 1457*291a2b48SSukumar Swaminathan #define ELS_CMD_RNID 0x78000000 1458*291a2b48SSukumar Swaminathan #define ELS_CMD_AUTH 0x90000000 1459fcf3ce44SJohn Forte #endif 1460fcf3ce44SJohn Forte 1461fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 1462*291a2b48SSukumar Swaminathan #define ELS_CMD_SHIFT 0 1463*291a2b48SSukumar Swaminathan #define ELS_CMD_MASK 0xff 1464*291a2b48SSukumar Swaminathan #define ELS_RSP_MASK 0xff 1465*291a2b48SSukumar Swaminathan #define ELS_CMD_LS_RJT 0x01 1466*291a2b48SSukumar Swaminathan #define ELS_CMD_ACC 0x02 1467*291a2b48SSukumar Swaminathan #define ELS_CMD_PLOGI 0x03 1468*291a2b48SSukumar Swaminathan #define ELS_CMD_FLOGI 0x04 1469*291a2b48SSukumar Swaminathan #define ELS_CMD_LOGO 0x05 1470*291a2b48SSukumar Swaminathan #define ELS_CMD_ABTX 0x06 1471*291a2b48SSukumar Swaminathan #define ELS_CMD_RCS 0x07 1472*291a2b48SSukumar Swaminathan #define ELS_CMD_RES 0x08 1473*291a2b48SSukumar Swaminathan #define ELS_CMD_RSS 0x09 1474*291a2b48SSukumar Swaminathan #define ELS_CMD_RSI 0x0A 1475*291a2b48SSukumar Swaminathan #define ELS_CMD_ESTS 0x0B 1476*291a2b48SSukumar Swaminathan #define ELS_CMD_ESTC 0x0C 1477*291a2b48SSukumar Swaminathan #define ELS_CMD_ADVC 0x0D 1478*291a2b48SSukumar Swaminathan #define ELS_CMD_RTV 0x0E 1479*291a2b48SSukumar Swaminathan #define ELS_CMD_RLS 0x0F 1480*291a2b48SSukumar Swaminathan #define ELS_CMD_ECHO 0x10 1481*291a2b48SSukumar Swaminathan #define ELS_CMD_TEST 0x11 1482*291a2b48SSukumar Swaminathan #define ELS_CMD_RRQ 0x12 1483*291a2b48SSukumar Swaminathan #define ELS_CMD_PRLI 0x20 1484*291a2b48SSukumar Swaminathan #define ELS_CMD_PRLO 0x21 1485*291a2b48SSukumar Swaminathan #define ELS_CMD_SCN 0x22 1486*291a2b48SSukumar Swaminathan #define ELS_CMD_TPLS 0x23 1487*291a2b48SSukumar Swaminathan #define ELS_CMD_GPRLO 0x24 1488*291a2b48SSukumar Swaminathan #define ELS_CMD_GAID 0x30 1489*291a2b48SSukumar Swaminathan #define ELS_CMD_FACT 0x31 1490*291a2b48SSukumar Swaminathan #define ELS_CMD_FDACT 0x32 1491*291a2b48SSukumar Swaminathan #define ELS_CMD_NACT 0x33 1492*291a2b48SSukumar Swaminathan #define ELS_CMD_NDACT 0x34 1493*291a2b48SSukumar Swaminathan #define ELS_CMD_QoSR 0x40 1494*291a2b48SSukumar Swaminathan #define ELS_CMD_RVCS 0x41 1495*291a2b48SSukumar Swaminathan #define ELS_CMD_PDISC 0x50 1496*291a2b48SSukumar Swaminathan #define ELS_CMD_FDISC 0x51 1497*291a2b48SSukumar Swaminathan #define ELS_CMD_ADISC 0x52 1498*291a2b48SSukumar Swaminathan #define ELS_CMD_FARP 0x54 1499*291a2b48SSukumar Swaminathan #define ELS_CMD_FARPR 0x55 1500*291a2b48SSukumar Swaminathan #define ELS_CMD_FAN 0x60 1501*291a2b48SSukumar Swaminathan #define ELS_CMD_RSCN 0x61 1502*291a2b48SSukumar Swaminathan #define ELS_CMD_SCR 0x62 1503*291a2b48SSukumar Swaminathan #define ELS_CMD_LINIT 0x70 1504*291a2b48SSukumar Swaminathan #define ELS_CMD_RNID 0x78 1505*291a2b48SSukumar Swaminathan #define ELS_CMD_AUTH 0x90 1506fcf3ce44SJohn Forte #endif 1507fcf3ce44SJohn Forte 1508fcf3ce44SJohn Forte 1509fcf3ce44SJohn Forte /* 1510fcf3ce44SJohn Forte * LS_RJT Payload Definition 1511fcf3ce44SJohn Forte */ 1512fcf3ce44SJohn Forte 1513*291a2b48SSukumar Swaminathan typedef struct _LS_RJT 1514*291a2b48SSukumar Swaminathan { /* Structure is in Big Endian format */ 1515*291a2b48SSukumar Swaminathan union 1516*291a2b48SSukumar Swaminathan { 1517*291a2b48SSukumar Swaminathan uint32_t lsRjtError; 1518*291a2b48SSukumar Swaminathan struct 1519*291a2b48SSukumar Swaminathan { 1520*291a2b48SSukumar Swaminathan uint8_t lsRjtRsvd0; /* FC Word 0, */ 1521*291a2b48SSukumar Swaminathan /* bit 24:31 */ 1522*291a2b48SSukumar Swaminathan 1523*291a2b48SSukumar Swaminathan uint8_t lsRjtRsnCode; /* FC Word 0, */ 1524*291a2b48SSukumar Swaminathan /* bit 16:23 */ 1525fcf3ce44SJohn Forte /* LS_RJT reason codes */ 1526fcf3ce44SJohn Forte #define LSRJT_INVALID_CMD 0x01 1527fcf3ce44SJohn Forte #define LSRJT_LOGICAL_ERR 0x03 1528fcf3ce44SJohn Forte #define LSRJT_LOGICAL_BSY 0x05 1529fcf3ce44SJohn Forte #define LSRJT_PROTOCOL_ERR 0x07 1530fcf3ce44SJohn Forte #define LSRJT_UNABLE_TPC 0x09 /* Unable to perform command */ 1531fcf3ce44SJohn Forte #define LSRJT_CMD_UNSUPPORTED 0x0B 1532fcf3ce44SJohn Forte #define LSRJT_VENDOR_UNIQUE 0xFF /* See Byte 3 */ 1533fcf3ce44SJohn Forte 1534*291a2b48SSukumar Swaminathan uint8_t lsRjtRsnCodeExp; /* FC Word 0, */ 1535*291a2b48SSukumar Swaminathan /* bit 8:15 */ 1536fcf3ce44SJohn Forte /* LS_RJT reason explanation */ 1537fcf3ce44SJohn Forte #define LSEXP_NOTHING_MORE 0x00 1538fcf3ce44SJohn Forte #define LSEXP_SPARM_OPTIONS 0x01 1539fcf3ce44SJohn Forte #define LSEXP_SPARM_ICTL 0x03 1540fcf3ce44SJohn Forte #define LSEXP_SPARM_RCTL 0x05 1541fcf3ce44SJohn Forte #define LSEXP_SPARM_RCV_SIZE 0x07 1542fcf3ce44SJohn Forte #define LSEXP_SPARM_CONCUR_SEQ 0x09 1543fcf3ce44SJohn Forte #define LSEXP_SPARM_CREDIT 0x0B 1544fcf3ce44SJohn Forte #define LSEXP_INVALID_PNAME 0x0D 1545fcf3ce44SJohn Forte #define LSEXP_INVALID_NNAME 0x0E 1546fcf3ce44SJohn Forte #define LSEXP_INVALID_CSP 0x0F 1547fcf3ce44SJohn Forte #define LSEXP_INVALID_ASSOC_HDR 0x11 1548fcf3ce44SJohn Forte #define LSEXP_ASSOC_HDR_REQ 0x13 1549fcf3ce44SJohn Forte #define LSEXP_INVALID_O_SID 0x15 1550fcf3ce44SJohn Forte #define LSEXP_INVALID_OX_RX 0x17 1551fcf3ce44SJohn Forte #define LSEXP_CMD_IN_PROGRESS 0x19 1552fcf3ce44SJohn Forte #define LSEXP_INVALID_NPORT_ID 0x1F 1553fcf3ce44SJohn Forte #define LSEXP_INVALID_SEQ_ID 0x21 1554fcf3ce44SJohn Forte #define LSEXP_INVALID_XCHG 0x23 1555fcf3ce44SJohn Forte #define LSEXP_INACTIVE_XCHG 0x25 1556fcf3ce44SJohn Forte #define LSEXP_RQ_REQUIRED 0x27 1557fcf3ce44SJohn Forte #define LSEXP_OUT_OF_RESOURCE 0x29 1558fcf3ce44SJohn Forte #define LSEXP_CANT_GIVE_DATA 0x2A 1559*291a2b48SSukumar Swaminathan #define LSEXP_REQ_UNSUPPORTED 0x2C 1560*291a2b48SSukumar Swaminathan uint8_t vendorUnique; /* FC Word 0, bit 0: 7 */ 1561fcf3ce44SJohn Forte } b; 1562fcf3ce44SJohn Forte } un; 1563fcf3ce44SJohn Forte } LS_RJT; 1564fcf3ce44SJohn Forte 1565fcf3ce44SJohn Forte 1566fcf3ce44SJohn Forte /* 1567fcf3ce44SJohn Forte * N_Port Login (FLOGO/PLOGO Request) Payload Definition 1568fcf3ce44SJohn Forte */ 1569fcf3ce44SJohn Forte 1570*291a2b48SSukumar Swaminathan typedef struct _LOGO 1571*291a2b48SSukumar Swaminathan { /* Structure is in Big Endian format */ 1572*291a2b48SSukumar Swaminathan union 1573*291a2b48SSukumar Swaminathan { 1574*291a2b48SSukumar Swaminathan uint32_t nPortId32; /* Access nPortId as a word */ 1575*291a2b48SSukumar Swaminathan struct 1576*291a2b48SSukumar Swaminathan { 1577*291a2b48SSukumar Swaminathan uint8_t word1Reserved1; /* FC Word 1, bit 31:24 */ 1578*291a2b48SSukumar Swaminathan uint8_t nPortIdByte0; /* N_port ID bit 16:23 */ 1579*291a2b48SSukumar Swaminathan uint8_t nPortIdByte1; /* N_port ID bit 8:15 */ 1580*291a2b48SSukumar Swaminathan uint8_t nPortIdByte2; /* N_port ID bit 0: 7 */ 1581fcf3ce44SJohn Forte } b; 1582fcf3ce44SJohn Forte } un; 1583*291a2b48SSukumar Swaminathan NAME_TYPE portName; /* N_port name field */ 1584fcf3ce44SJohn Forte } LOGO; 1585fcf3ce44SJohn Forte 1586fcf3ce44SJohn Forte 1587fcf3ce44SJohn Forte /* 1588fcf3ce44SJohn Forte * FCP Login (PRLI Request / ACC) Payload Definition 1589fcf3ce44SJohn Forte */ 1590fcf3ce44SJohn Forte 1591*291a2b48SSukumar Swaminathan #define PRLX_PAGE_LEN 0x10 1592*291a2b48SSukumar Swaminathan #define TPRLO_PAGE_LEN 0x14 1593fcf3ce44SJohn Forte 1594*291a2b48SSukumar Swaminathan typedef struct _PRLI 1595*291a2b48SSukumar Swaminathan { /* Structure is in Big Endian format */ 1596*291a2b48SSukumar Swaminathan uint8_t prliType; /* FC Parm Word 0, bit 24:31 */ 1597fcf3ce44SJohn Forte 1598fcf3ce44SJohn Forte #define PRLI_FCP_TYPE 0x08 1599*291a2b48SSukumar Swaminathan uint8_t word0Reserved1; /* FC Parm Word 0, bit 16:23 */ 1600fcf3ce44SJohn Forte 1601fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 1602*291a2b48SSukumar Swaminathan uint8_t origProcAssocV:1; /* FC Parm Word 0, bit 15 */ 1603*291a2b48SSukumar Swaminathan uint8_t respProcAssocV:1; /* FC Parm Word 0, bit 14 */ 1604*291a2b48SSukumar Swaminathan uint8_t estabImagePair:1; /* FC Parm Word 0, bit 13 */ 1605fcf3ce44SJohn Forte 1606fcf3ce44SJohn Forte /* ACC = imagePairEstablished */ 1607*291a2b48SSukumar Swaminathan uint8_t word0Reserved2:1; /* FC Parm Word 0, bit 12 */ 1608*291a2b48SSukumar Swaminathan uint8_t acceptRspCode:4; /* FC Parm Word 0, bit 8:11, */ 1609*291a2b48SSukumar Swaminathan /* ACC ONLY */ 1610fcf3ce44SJohn Forte #endif 1611fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 1612*291a2b48SSukumar Swaminathan uint8_t acceptRspCode:4; /* FC Parm Word 0, bit 8:11, */ 1613*291a2b48SSukumar Swaminathan /* ACC ONLY */ 1614*291a2b48SSukumar Swaminathan uint8_t word0Reserved2:1; /* FC Parm Word 0, bit 12 */ 1615*291a2b48SSukumar Swaminathan uint8_t estabImagePair:1; /* FC Parm Word 0, bit 13 */ 1616*291a2b48SSukumar Swaminathan uint8_t respProcAssocV:1; /* FC Parm Word 0, bit 14 */ 1617*291a2b48SSukumar Swaminathan uint8_t origProcAssocV:1; /* FC Parm Word 0, bit 15 */ 1618fcf3ce44SJohn Forte /* ACC = imagePairEstablished */ 1619fcf3ce44SJohn Forte #endif 1620*291a2b48SSukumar Swaminathan #define PRLI_REQ_EXECUTED 0x1 /* acceptRspCode */ 1621fcf3ce44SJohn Forte #define PRLI_NO_RESOURCES 0x2 1622fcf3ce44SJohn Forte #define PRLI_INIT_INCOMPLETE 0x3 1623fcf3ce44SJohn Forte #define PRLI_NO_SUCH_PA 0x4 1624fcf3ce44SJohn Forte #define PRLI_PREDEF_CONFIG 0x5 1625fcf3ce44SJohn Forte #define PRLI_PARTIAL_SUCCESS 0x6 1626fcf3ce44SJohn Forte #define PRLI_INVALID_PAGE_CNT 0x7 1627*291a2b48SSukumar Swaminathan uint8_t word0Reserved3; /* FC Parm Word 0, bit 0:7 */ 1628fcf3ce44SJohn Forte 1629*291a2b48SSukumar Swaminathan uint32_t origProcAssoc; /* FC Parm Word 1, bit 0:31 */ 1630fcf3ce44SJohn Forte 1631*291a2b48SSukumar Swaminathan uint32_t respProcAssoc; /* FC Parm Word 2, bit 0:31 */ 1632fcf3ce44SJohn Forte 1633*291a2b48SSukumar Swaminathan uint8_t word3Reserved1; /* FC Parm Word 3, bit 24:31 */ 1634*291a2b48SSukumar Swaminathan uint8_t word3Reserved2; /* FC Parm Word 3, bit 16:23 */ 1635fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 1636*291a2b48SSukumar Swaminathan uint16_t Word3bit15Resved:1; /* FC Parm Word 3, bit 15 */ 1637*291a2b48SSukumar Swaminathan uint16_t Word3bit14Resved:1; /* FC Parm Word 3, bit 14 */ 1638*291a2b48SSukumar Swaminathan uint16_t Word3bit13Resved:1; /* FC Parm Word 3, bit 13 */ 1639*291a2b48SSukumar Swaminathan uint16_t Word3bit12Resved:1; /* FC Parm Word 3, bit 12 */ 1640*291a2b48SSukumar Swaminathan uint16_t Word3bit11Resved:1; /* FC Parm Word 3, bit 11 */ 1641*291a2b48SSukumar Swaminathan uint16_t Word3bit10Resved:1; /* FC Parm Word 3, bit 10 */ 1642*291a2b48SSukumar Swaminathan uint16_t TaskRetryIdReq:1; /* FC Parm Word 3, bit 9 */ 1643*291a2b48SSukumar Swaminathan uint16_t Retry:1; /* FC Parm Word 3, bit 8 */ 1644*291a2b48SSukumar Swaminathan uint16_t ConfmComplAllowed:1; /* FC Parm Word 3, bit 7 */ 1645*291a2b48SSukumar Swaminathan uint16_t dataOverLay:1; /* FC Parm Word 3, bit 6 */ 1646*291a2b48SSukumar Swaminathan uint16_t initiatorFunc:1; /* FC Parm Word 3, bit 5 */ 1647*291a2b48SSukumar Swaminathan uint16_t targetFunc:1; /* FC Parm Word 3, bit 4 */ 1648*291a2b48SSukumar Swaminathan uint16_t cmdDataMixEna:1; /* FC Parm Word 3, bit 3 */ 1649*291a2b48SSukumar Swaminathan uint16_t dataRspMixEna:1; /* FC Parm Word 3, bit 2 */ 1650*291a2b48SSukumar Swaminathan uint16_t readXferRdyDis:1; /* FC Parm Word 3, bit 1 */ 1651*291a2b48SSukumar Swaminathan uint16_t writeXferRdyDis:1; /* FC Parm Word 3, bit 0 */ 1652fcf3ce44SJohn Forte #endif 1653fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 1654*291a2b48SSukumar Swaminathan uint16_t Retry:1; /* FC Parm Word 3, bit 8 */ 1655*291a2b48SSukumar Swaminathan uint16_t TaskRetryIdReq:1; /* FC Parm Word 3, bit 9 */ 1656*291a2b48SSukumar Swaminathan uint16_t Word3bit10Resved:1; /* FC Parm Word 3, bit 10 */ 1657*291a2b48SSukumar Swaminathan uint16_t Word3bit11Resved:1; /* FC Parm Word 3, bit 11 */ 1658*291a2b48SSukumar Swaminathan uint16_t Word3bit12Resved:1; /* FC Parm Word 3, bit 12 */ 1659*291a2b48SSukumar Swaminathan uint16_t Word3bit13Resved:1; /* FC Parm Word 3, bit 13 */ 1660*291a2b48SSukumar Swaminathan uint16_t Word3bit14Resved:1; /* FC Parm Word 3, bit 14 */ 1661*291a2b48SSukumar Swaminathan uint16_t Word3bit15Resved:1; /* FC Parm Word 3, bit 15 */ 1662*291a2b48SSukumar Swaminathan uint16_t writeXferRdyDis:1; /* FC Parm Word 3, bit 0 */ 1663*291a2b48SSukumar Swaminathan uint16_t readXferRdyDis:1; /* FC Parm Word 3, bit 1 */ 1664*291a2b48SSukumar Swaminathan uint16_t dataRspMixEna:1; /* FC Parm Word 3, bit 2 */ 1665*291a2b48SSukumar Swaminathan uint16_t cmdDataMixEna:1; /* FC Parm Word 3, bit 3 */ 1666*291a2b48SSukumar Swaminathan uint16_t targetFunc:1; /* FC Parm Word 3, bit 4 */ 1667*291a2b48SSukumar Swaminathan uint16_t initiatorFunc:1; /* FC Parm Word 3, bit 5 */ 1668*291a2b48SSukumar Swaminathan uint16_t dataOverLay:1; /* FC Parm Word 3, bit 6 */ 1669*291a2b48SSukumar Swaminathan uint16_t ConfmComplAllowed:1; /* FC Parm Word 3, bit 7 */ 1670fcf3ce44SJohn Forte #endif 1671fcf3ce44SJohn Forte } PRLI; 1672fcf3ce44SJohn Forte 1673fcf3ce44SJohn Forte /* 1674fcf3ce44SJohn Forte * FCP Logout (PRLO Request / ACC) Payload Definition 1675fcf3ce44SJohn Forte */ 1676fcf3ce44SJohn Forte 1677*291a2b48SSukumar Swaminathan typedef struct _PRLO 1678*291a2b48SSukumar Swaminathan { /* Structure is in Big Endian format */ 1679*291a2b48SSukumar Swaminathan uint8_t prloType; /* FC Parm Word 0, bit 24:31 */ 1680fcf3ce44SJohn Forte 1681*291a2b48SSukumar Swaminathan #define PRLO_FCP_TYPE 0x08 1682*291a2b48SSukumar Swaminathan uint8_t word0Reserved1; /* FC Parm Word 0, bit 16:23 */ 1683fcf3ce44SJohn Forte 1684fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 1685*291a2b48SSukumar Swaminathan uint8_t origProcAssocV:1; /* FC Parm Word 0, bit 15 */ 1686*291a2b48SSukumar Swaminathan uint8_t respProcAssocV:1; /* FC Parm Word 0, bit 14 */ 1687*291a2b48SSukumar Swaminathan uint8_t word0Reserved2:2; /* FC Parm Word 0, bit 12:13 */ 1688*291a2b48SSukumar Swaminathan uint8_t acceptRspCode:4; /* FC Parm Word 0, bit 8:11, */ 1689*291a2b48SSukumar Swaminathan /* ACC ONLY */ 1690fcf3ce44SJohn Forte #endif 1691fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 1692*291a2b48SSukumar Swaminathan uint8_t acceptRspCode:4; /* FC Parm Word 0, bit 8:11, */ 1693*291a2b48SSukumar Swaminathan /* ACC ONLY */ 1694*291a2b48SSukumar Swaminathan uint8_t word0Reserved2:2; /* FC Parm Word 0, bit 12:13 */ 1695*291a2b48SSukumar Swaminathan uint8_t respProcAssocV:1; /* FC Parm Word 0, bit 14 */ 1696*291a2b48SSukumar Swaminathan uint8_t origProcAssocV:1; /* FC Parm Word 0, bit 15 */ 1697fcf3ce44SJohn Forte #endif 1698*291a2b48SSukumar Swaminathan #define PRLO_REQ_EXECUTED 0x1 /* acceptRspCode */ 1699fcf3ce44SJohn Forte #define PRLO_NO_SUCH_IMAGE 0x4 1700fcf3ce44SJohn Forte #define PRLO_INVALID_PAGE_CNT 0x7 1701fcf3ce44SJohn Forte 1702*291a2b48SSukumar Swaminathan uint8_t word0Reserved3; /* FC Parm Word 0, bit 0:7 */ 1703*291a2b48SSukumar Swaminathan uint32_t origProcAssoc; /* FC Parm Word 1, bit 0:31 */ 1704*291a2b48SSukumar Swaminathan uint32_t respProcAssoc; /* FC Parm Word 2, bit 0:31 */ 1705*291a2b48SSukumar Swaminathan uint32_t word3Reserved1; /* FC Parm Word 3, bit 0:31 */ 1706fcf3ce44SJohn Forte } PRLO; 1707fcf3ce44SJohn Forte 1708fcf3ce44SJohn Forte 1709*291a2b48SSukumar Swaminathan typedef struct _ADISC 1710*291a2b48SSukumar Swaminathan { /* Structure is in Big Endian format */ 1711*291a2b48SSukumar Swaminathan uint32_t hardAL_PA; 1712*291a2b48SSukumar Swaminathan NAME_TYPE portName; 1713*291a2b48SSukumar Swaminathan NAME_TYPE nodeName; 1714*291a2b48SSukumar Swaminathan uint32_t DID; 1715fcf3ce44SJohn Forte } ADISC; 1716fcf3ce44SJohn Forte 1717fcf3ce44SJohn Forte 1718*291a2b48SSukumar Swaminathan typedef struct _FARP 1719*291a2b48SSukumar Swaminathan { /* Structure is in Big Endian format */ 1720*291a2b48SSukumar Swaminathan uint32_t Mflags:8; 1721*291a2b48SSukumar Swaminathan uint32_t Odid:24; 1722*291a2b48SSukumar Swaminathan #define FARP_NO_ACTION 0 /* FARP information enclosed, no action */ 1723*291a2b48SSukumar Swaminathan #define FARP_MATCH_PORT 0x1 /* Match on Responder Port Name */ 1724*291a2b48SSukumar Swaminathan #define FARP_MATCH_NODE 0x2 /* Match on Responder Node Name */ 1725*291a2b48SSukumar Swaminathan #define FARP_MATCH_IP 0x4 /* Match on IP address, not supported */ 1726*291a2b48SSukumar Swaminathan #define FARP_MATCH_IPV4 0x5 /* Match on IPV4 address, not supported */ 1727*291a2b48SSukumar Swaminathan #define FARP_MATCH_IPV6 0x6 /* Match on IPV6 address, not supported */ 1728*291a2b48SSukumar Swaminathan uint32_t Rflags:8; 1729*291a2b48SSukumar Swaminathan uint32_t Rdid:24; 1730fcf3ce44SJohn Forte #define FARP_REQUEST_PLOGI 0x1 /* Request for PLOGI */ 1731fcf3ce44SJohn Forte #define FARP_REQUEST_FARPR 0x2 /* Request for FARP Response */ 1732*291a2b48SSukumar Swaminathan NAME_TYPE OportName; 1733*291a2b48SSukumar Swaminathan NAME_TYPE OnodeName; 1734*291a2b48SSukumar Swaminathan NAME_TYPE RportName; 1735*291a2b48SSukumar Swaminathan NAME_TYPE RnodeName; 1736*291a2b48SSukumar Swaminathan uint8_t Oipaddr[16]; 1737*291a2b48SSukumar Swaminathan uint8_t Ripaddr[16]; 1738fcf3ce44SJohn Forte } FARP; 1739fcf3ce44SJohn Forte 1740*291a2b48SSukumar Swaminathan typedef struct _FAN 1741*291a2b48SSukumar Swaminathan { /* Structure is in Big Endian format */ 1742*291a2b48SSukumar Swaminathan uint32_t Fdid; 1743*291a2b48SSukumar Swaminathan NAME_TYPE FportName; 1744*291a2b48SSukumar Swaminathan NAME_TYPE FnodeName; 1745fcf3ce44SJohn Forte } FAN; 1746fcf3ce44SJohn Forte 1747*291a2b48SSukumar Swaminathan typedef struct _SCR 1748*291a2b48SSukumar Swaminathan { /* Structure is in Big Endian format */ 1749*291a2b48SSukumar Swaminathan uint8_t resvd1; 1750*291a2b48SSukumar Swaminathan uint8_t resvd2; 1751*291a2b48SSukumar Swaminathan uint8_t resvd3; 1752*291a2b48SSukumar Swaminathan uint8_t Function; 1753*291a2b48SSukumar Swaminathan #define SCR_FUNC_FABRIC 0x01 1754*291a2b48SSukumar Swaminathan #define SCR_FUNC_NPORT 0x02 1755*291a2b48SSukumar Swaminathan #define SCR_FUNC_FULL 0x03 1756*291a2b48SSukumar Swaminathan #define SCR_CLEAR 0xff 1757fcf3ce44SJohn Forte } SCR; 1758fcf3ce44SJohn Forte 1759*291a2b48SSukumar Swaminathan typedef struct _RNID_TOP_DISC 1760*291a2b48SSukumar Swaminathan { 1761*291a2b48SSukumar Swaminathan NAME_TYPE portName; 1762*291a2b48SSukumar Swaminathan uint8_t resvd[8]; 1763*291a2b48SSukumar Swaminathan uint32_t unitType; 1764*291a2b48SSukumar Swaminathan #define RNID_HBA 0x7 1765*291a2b48SSukumar Swaminathan #define RNID_HOST 0xa 1766*291a2b48SSukumar Swaminathan #define RNID_DRIVER 0xd 1767*291a2b48SSukumar Swaminathan uint32_t physPort; 1768*291a2b48SSukumar Swaminathan uint32_t attachedNodes; 1769*291a2b48SSukumar Swaminathan uint16_t ipVersion; 1770*291a2b48SSukumar Swaminathan #define RNID_IPV4 0x1 1771*291a2b48SSukumar Swaminathan #define RNID_IPV6 0x2 1772*291a2b48SSukumar Swaminathan uint16_t UDPport; 1773*291a2b48SSukumar Swaminathan uint8_t ipAddr[16]; 1774*291a2b48SSukumar Swaminathan uint16_t resvd1; 1775*291a2b48SSukumar Swaminathan uint16_t flags; 1776*291a2b48SSukumar Swaminathan #define RNID_TD_SUPPORT 0x1 1777*291a2b48SSukumar Swaminathan #define RNID_LP_VALID 0x2 1778fcf3ce44SJohn Forte } RNID_TOP_DISC; 1779fcf3ce44SJohn Forte 1780*291a2b48SSukumar Swaminathan typedef struct _RNID 1781*291a2b48SSukumar Swaminathan { /* Structure is in Big Endian format */ 1782*291a2b48SSukumar Swaminathan uint8_t Format; 1783fcf3ce44SJohn Forte #define RNID_TOPOLOGY_DISC 0xdf 1784*291a2b48SSukumar Swaminathan uint8_t CommonLen; 1785*291a2b48SSukumar Swaminathan uint8_t resvd1; 1786*291a2b48SSukumar Swaminathan uint8_t SpecificLen; 1787*291a2b48SSukumar Swaminathan NAME_TYPE portName; 1788*291a2b48SSukumar Swaminathan NAME_TYPE nodeName; 1789*291a2b48SSukumar Swaminathan union 1790*291a2b48SSukumar Swaminathan { 1791fcf3ce44SJohn Forte RNID_TOP_DISC topologyDisc; /* topology disc (0xdf) */ 1792fcf3ce44SJohn Forte } un; 1793fcf3ce44SJohn Forte } RNID; 1794fcf3ce44SJohn Forte 1795*291a2b48SSukumar Swaminathan typedef struct _RRQ 1796*291a2b48SSukumar Swaminathan { /* Structure is in Big Endian format */ 1797*291a2b48SSukumar Swaminathan uint32_t SID; 1798*291a2b48SSukumar Swaminathan uint16_t Oxid; 1799*291a2b48SSukumar Swaminathan uint16_t Rxid; 1800*291a2b48SSukumar Swaminathan uint8_t resv[32]; /* optional association hdr */ 1801fcf3ce44SJohn Forte } RRQ; 1802fcf3ce44SJohn Forte 1803fcf3ce44SJohn Forte 1804fcf3ce44SJohn Forte /* This is used for RSCN command */ 1805*291a2b48SSukumar Swaminathan typedef struct _D_ID 1806*291a2b48SSukumar Swaminathan { /* Structure is in Big Endian format */ 1807*291a2b48SSukumar Swaminathan union 1808*291a2b48SSukumar Swaminathan { 1809*291a2b48SSukumar Swaminathan uint32_t word; 1810*291a2b48SSukumar Swaminathan struct 1811*291a2b48SSukumar Swaminathan { 1812fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 1813*291a2b48SSukumar Swaminathan uint8_t resv; 1814*291a2b48SSukumar Swaminathan uint8_t domain; 1815*291a2b48SSukumar Swaminathan uint8_t area; 1816*291a2b48SSukumar Swaminathan uint8_t id; 1817fcf3ce44SJohn Forte #endif 1818fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 1819*291a2b48SSukumar Swaminathan uint8_t id; 1820*291a2b48SSukumar Swaminathan uint8_t area; 1821*291a2b48SSukumar Swaminathan uint8_t domain; 1822*291a2b48SSukumar Swaminathan uint8_t resv; 1823fcf3ce44SJohn Forte #endif 1824fcf3ce44SJohn Forte } b; 1825fcf3ce44SJohn Forte } un; 1826fcf3ce44SJohn Forte } D_ID; 1827fcf3ce44SJohn Forte 1828fcf3ce44SJohn Forte /* 1829*291a2b48SSukumar Swaminathan * Structure to define all ELS Payload types 1830fcf3ce44SJohn Forte */ 1831fcf3ce44SJohn Forte 1832*291a2b48SSukumar Swaminathan typedef struct _ELS_PKT 1833*291a2b48SSukumar Swaminathan { /* Structure is in Big Endian format */ 1834*291a2b48SSukumar Swaminathan uint8_t elsCode; /* FC Word 0, bit 24:31 */ 1835*291a2b48SSukumar Swaminathan uint8_t elsByte1; 1836*291a2b48SSukumar Swaminathan uint8_t elsByte2; 1837*291a2b48SSukumar Swaminathan uint8_t elsByte3; 1838*291a2b48SSukumar Swaminathan union 1839*291a2b48SSukumar Swaminathan { 1840*291a2b48SSukumar Swaminathan LS_RJT lsRjt; /* Payload for LS_RJT */ 1841*291a2b48SSukumar Swaminathan SERV_PARM logi; /* Payload for PLOGI, FLOGI */ 1842*291a2b48SSukumar Swaminathan /* PDISC, ACC */ 1843*291a2b48SSukumar Swaminathan LOGO logo; /* Payload for PLOGO, FLOGO */ 1844*291a2b48SSukumar Swaminathan /* ACC */ 1845*291a2b48SSukumar Swaminathan PRLI prli; /* Payload for PRLI/ACC */ 1846*291a2b48SSukumar Swaminathan PRLO prlo; /* Payload for PRLO/ACC */ 1847*291a2b48SSukumar Swaminathan ADISC adisc; /* Payload for ADISC/ACC */ 1848*291a2b48SSukumar Swaminathan FARP farp; /* Payload for FARP/ACC */ 1849*291a2b48SSukumar Swaminathan FAN fan; /* Payload for FAN */ 1850*291a2b48SSukumar Swaminathan SCR scr; /* Payload for SCR/ACC */ 1851*291a2b48SSukumar Swaminathan RRQ rrq; /* Payload for RRQ */ 1852*291a2b48SSukumar Swaminathan RNID rnid; /* Payload for RNID */ 1853*291a2b48SSukumar Swaminathan uint8_t pad[128 - 4]; /* Pad out to payload of */ 1854*291a2b48SSukumar Swaminathan /* 128 bytes */ 1855fcf3ce44SJohn Forte } un; 1856fcf3ce44SJohn Forte } ELS_PKT; 1857fcf3ce44SJohn Forte 1858fcf3ce44SJohn Forte 1859fcf3ce44SJohn Forte /* 1860fcf3ce44SJohn Forte * Begin Structure Definitions for Mailbox Commands 1861fcf3ce44SJohn Forte */ 1862fcf3ce44SJohn Forte 1863*291a2b48SSukumar Swaminathan typedef struct revcompat 1864*291a2b48SSukumar Swaminathan { 1865fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 1866*291a2b48SSukumar Swaminathan uint32_t ldflag:1; /* Set in SRAM descriptor */ 1867*291a2b48SSukumar Swaminathan uint32_t ldcount:7; /* For use by program load */ 1868*291a2b48SSukumar Swaminathan uint32_t kernel:4; /* Kernel ID */ 1869*291a2b48SSukumar Swaminathan uint32_t kver:4; /* Kernel compatibility version */ 1870*291a2b48SSukumar Swaminathan uint32_t SMver:4; /* Sequence Manager version */ 1871*291a2b48SSukumar Swaminathan /* 0 if none */ 1872*291a2b48SSukumar Swaminathan uint32_t ENDECver:4; /* ENDEC+ version, 0 if none */ 1873*291a2b48SSukumar Swaminathan uint32_t BIUtype:4; /* PCI = 0 */ 1874*291a2b48SSukumar Swaminathan uint32_t BIUver:4; /* BIU version, 0 if none */ 1875fcf3ce44SJohn Forte #endif 1876fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 1877*291a2b48SSukumar Swaminathan uint32_t BIUver:4; /* BIU version, 0 if none */ 1878*291a2b48SSukumar Swaminathan uint32_t BIUtype:4; /* PCI = 0 */ 1879*291a2b48SSukumar Swaminathan uint32_t ENDECver:4; /* ENDEC+ version, 0 if none */ 1880*291a2b48SSukumar Swaminathan uint32_t SMver:4; /* Sequence Manager version */ 1881*291a2b48SSukumar Swaminathan /* 0 if none */ 1882*291a2b48SSukumar Swaminathan uint32_t kver:4; /* Kernel compatibility version */ 1883*291a2b48SSukumar Swaminathan uint32_t kernel:4; /* Kernel ID */ 1884*291a2b48SSukumar Swaminathan uint32_t ldcount:7; /* For use by program load */ 1885*291a2b48SSukumar Swaminathan uint32_t ldflag:1; /* Set in SRAM descriptor */ 1886fcf3ce44SJohn Forte #endif 1887fcf3ce44SJohn Forte } REVCOMPAT; 1888fcf3ce44SJohn Forte 1889*291a2b48SSukumar Swaminathan typedef struct id_word 1890*291a2b48SSukumar Swaminathan { 1891fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 1892*291a2b48SSukumar Swaminathan uint8_t Type; 1893*291a2b48SSukumar Swaminathan uint8_t Id; 1894*291a2b48SSukumar Swaminathan uint8_t Ver; 1895*291a2b48SSukumar Swaminathan uint8_t Rev; 1896fcf3ce44SJohn Forte #endif 1897fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 1898*291a2b48SSukumar Swaminathan uint8_t Rev; 1899*291a2b48SSukumar Swaminathan uint8_t Ver; 1900*291a2b48SSukumar Swaminathan uint8_t Id; 1901*291a2b48SSukumar Swaminathan uint8_t Type; 1902*291a2b48SSukumar Swaminathan #endif 1903*291a2b48SSukumar Swaminathan union 1904*291a2b48SSukumar Swaminathan { 1905*291a2b48SSukumar Swaminathan REVCOMPAT cp; 1906*291a2b48SSukumar Swaminathan uint32_t revcomp; 1907fcf3ce44SJohn Forte } un; 1908fcf3ce44SJohn Forte } PROG_ID; 1909fcf3ce44SJohn Forte 1910*291a2b48SSukumar Swaminathan typedef struct 1911*291a2b48SSukumar Swaminathan { 1912fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 1913*291a2b48SSukumar Swaminathan uint8_t tval; 1914*291a2b48SSukumar Swaminathan uint8_t tmask; 1915*291a2b48SSukumar Swaminathan uint8_t rval; 1916*291a2b48SSukumar Swaminathan uint8_t rmask; 1917fcf3ce44SJohn Forte #endif 1918fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 1919*291a2b48SSukumar Swaminathan uint8_t rmask; 1920*291a2b48SSukumar Swaminathan uint8_t rval; 1921*291a2b48SSukumar Swaminathan uint8_t tmask; 1922*291a2b48SSukumar Swaminathan uint8_t tval; 1923fcf3ce44SJohn Forte #endif 1924fcf3ce44SJohn Forte } RR_REG; 1925fcf3ce44SJohn Forte 1926*291a2b48SSukumar Swaminathan typedef struct 1927*291a2b48SSukumar Swaminathan { 1928*291a2b48SSukumar Swaminathan uint32_t bdeAddress; 1929fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 1930*291a2b48SSukumar Swaminathan uint32_t bdeReserved:4; 1931*291a2b48SSukumar Swaminathan uint32_t bdeAddrHigh:4; 1932*291a2b48SSukumar Swaminathan uint32_t bdeSize:24; 1933fcf3ce44SJohn Forte #endif 1934fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 1935*291a2b48SSukumar Swaminathan uint32_t bdeSize:24; 1936*291a2b48SSukumar Swaminathan uint32_t bdeAddrHigh:4; 1937*291a2b48SSukumar Swaminathan uint32_t bdeReserved:4; 1938fcf3ce44SJohn Forte #endif 1939fcf3ce44SJohn Forte } ULP_BDE; 1940fcf3ce44SJohn Forte 1941*291a2b48SSukumar Swaminathan typedef struct ULP_BDE_64 1942*291a2b48SSukumar Swaminathan { /* SLI-2 */ 1943*291a2b48SSukumar Swaminathan union ULP_BDE_TUS 1944*291a2b48SSukumar Swaminathan { 1945*291a2b48SSukumar Swaminathan uint32_t w; 1946*291a2b48SSukumar Swaminathan struct 1947*291a2b48SSukumar Swaminathan { 1948fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 1949*291a2b48SSukumar Swaminathan uint32_t bdeFlags:8; /* BDE Flags 0 IS A */ 1950*291a2b48SSukumar Swaminathan /* SUPPORTED VALUE !! */ 1951*291a2b48SSukumar Swaminathan uint32_t bdeSize:24; /* buff size in bytes */ 1952fcf3ce44SJohn Forte #endif 1953fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 1954*291a2b48SSukumar Swaminathan uint32_t bdeSize:24; /* buff size in bytes */ 1955*291a2b48SSukumar Swaminathan uint32_t bdeFlags:8; /* BDE Flags 0 IS A */ 1956*291a2b48SSukumar Swaminathan /* SUPPORTED VALUE !! */ 1957fcf3ce44SJohn Forte #endif 1958fcf3ce44SJohn Forte #define BUFF_USE_RSVD 0x01 /* bdeFlags */ 1959fcf3ce44SJohn Forte #define BUFF_USE_INTRPT 0x02 /* Not Implemented with LP6000 */ 1960*291a2b48SSukumar Swaminathan #define BUFF_USE_CMND 0x04 /* Optional, 1=cmd/rsp 0=data buffer */ 1961*291a2b48SSukumar Swaminathan #define BUFF_USE_RCV 0x08 /* "" "", 1=rcv buffer, */ 1962*291a2b48SSukumar Swaminathan /* 0=xmit buffer */ 1963*291a2b48SSukumar Swaminathan #define BUFF_TYPE_32BIT 0x10 /* "" "", 1=32 bit addr */ 1964*291a2b48SSukumar Swaminathan /* 0=64 bit addr */ 1965fcf3ce44SJohn Forte #define BUFF_TYPE_SPECIAL 0x20 /* Not Implemented with LP6000 */ 1966fcf3ce44SJohn Forte #define BUFF_TYPE_BDL 0x40 /* Optional, may be set in BDL */ 1967fcf3ce44SJohn Forte #define BUFF_TYPE_INVALID 0x80 /* "" "" */ 1968fcf3ce44SJohn Forte } f; 1969fcf3ce44SJohn Forte } tus; 1970*291a2b48SSukumar Swaminathan uint32_t addrLow; 1971*291a2b48SSukumar Swaminathan uint32_t addrHigh; 1972fcf3ce44SJohn Forte } ULP_BDE64; 1973fcf3ce44SJohn Forte 1974*291a2b48SSukumar Swaminathan #define BDE64_SIZE_WORD 0 1975*291a2b48SSukumar Swaminathan #define BPL64_SIZE_WORD 0x40 1976fcf3ce44SJohn Forte 1977*291a2b48SSukumar Swaminathan /* ULP */ 1978*291a2b48SSukumar Swaminathan typedef struct ULP_BPL_64 1979*291a2b48SSukumar Swaminathan { 1980*291a2b48SSukumar Swaminathan ULP_BDE64 fccmd_payload; 1981*291a2b48SSukumar Swaminathan ULP_BDE64 fcrsp_payload; 1982*291a2b48SSukumar Swaminathan ULP_BDE64 fcdat_payload; 1983*291a2b48SSukumar Swaminathan ULP_BDE64 pat0; 1984fcf3ce44SJohn Forte } ULP_BPL64; 1985fcf3ce44SJohn Forte 1986*291a2b48SSukumar Swaminathan typedef struct ULP_BDL 1987*291a2b48SSukumar Swaminathan { /* SLI-2 */ 1988fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 1989*291a2b48SSukumar Swaminathan uint32_t bdeFlags:8; /* BDL Flags */ 1990*291a2b48SSukumar Swaminathan uint32_t bdeSize:24; /* Size of BDL array in host */ 1991*291a2b48SSukumar Swaminathan /* memory (bytes) */ 1992fcf3ce44SJohn Forte #endif 1993fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 1994*291a2b48SSukumar Swaminathan uint32_t bdeSize:24; /* Size of BDL array in host */ 1995*291a2b48SSukumar Swaminathan /* memory (bytes) */ 1996*291a2b48SSukumar Swaminathan uint32_t bdeFlags:8; /* BDL Flags */ 1997fcf3ce44SJohn Forte #endif 1998*291a2b48SSukumar Swaminathan uint32_t addrLow; /* Address 0:31 */ 1999*291a2b48SSukumar Swaminathan uint32_t addrHigh; /* Address 32:63 */ 2000*291a2b48SSukumar Swaminathan uint32_t ulpIoTag32; /* Can be used for 32 bit I/O Tag */ 2001fcf3ce44SJohn Forte } ULP_BDL; 2002fcf3ce44SJohn Forte 2003*291a2b48SSukumar Swaminathan typedef struct 2004*291a2b48SSukumar Swaminathan { 2005*291a2b48SSukumar Swaminathan uint8_t *fc_mptr; 2006*291a2b48SSukumar Swaminathan uint8_t *virt; /* virtual address ptr */ 2007*291a2b48SSukumar Swaminathan uint64_t phys; /* mapped address */ 2008*291a2b48SSukumar Swaminathan uint32_t size; 2009*291a2b48SSukumar Swaminathan void *data_handle; 2010*291a2b48SSukumar Swaminathan void *dma_handle; 2011*291a2b48SSukumar Swaminathan uint32_t tag; 2012*291a2b48SSukumar Swaminathan uint32_t flag; 2013*291a2b48SSukumar Swaminathan 2014*291a2b48SSukumar Swaminathan #define MAP_POOL_ALLOCATED 0x00000001 2015*291a2b48SSukumar Swaminathan #define MAP_BUF_ALLOCATED 0x00000002 2016*291a2b48SSukumar Swaminathan #define MAP_TABLE_ALLOCATED 0x00000004 2017fcf3ce44SJohn Forte } MATCHMAP; 2018fcf3ce44SJohn Forte 2019fcf3ce44SJohn Forte /* Structure used for a HBQ entry */ 2020*291a2b48SSukumar Swaminathan typedef struct 2021*291a2b48SSukumar Swaminathan { 2022*291a2b48SSukumar Swaminathan ULP_BDE64 bde; 2023*291a2b48SSukumar Swaminathan union UN_TAG 2024*291a2b48SSukumar Swaminathan { 2025*291a2b48SSukumar Swaminathan uint32_t w; 2026*291a2b48SSukumar Swaminathan struct 2027*291a2b48SSukumar Swaminathan { 2028fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2029*291a2b48SSukumar Swaminathan uint32_t HBQ_tag:4; 2030*291a2b48SSukumar Swaminathan uint32_t HBQE_tag:28; 2031fcf3ce44SJohn Forte #endif 2032fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2033*291a2b48SSukumar Swaminathan uint32_t HBQE_tag:28; 2034*291a2b48SSukumar Swaminathan uint32_t HBQ_tag:4; 2035fcf3ce44SJohn Forte #endif 2036fcf3ce44SJohn Forte } ext; 2037fcf3ce44SJohn Forte } unt; 2038fcf3ce44SJohn Forte } HBQE_t; 2039fcf3ce44SJohn Forte 2040*291a2b48SSukumar Swaminathan typedef struct 2041*291a2b48SSukumar Swaminathan { 2042fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2043*291a2b48SSukumar Swaminathan uint8_t tmatch; 2044*291a2b48SSukumar Swaminathan uint8_t tmask; 2045*291a2b48SSukumar Swaminathan uint8_t rctlmatch; 2046*291a2b48SSukumar Swaminathan uint8_t rctlmask; 2047fcf3ce44SJohn Forte #endif 2048fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2049*291a2b48SSukumar Swaminathan uint8_t rctlmask; 2050*291a2b48SSukumar Swaminathan uint8_t rctlmatch; 2051*291a2b48SSukumar Swaminathan uint8_t tmask; 2052*291a2b48SSukumar Swaminathan uint8_t tmatch; 2053fcf3ce44SJohn Forte #endif 2054fcf3ce44SJohn Forte } HBQ_MASK; 2055fcf3ce44SJohn Forte 2056fcf3ce44SJohn Forte #define EMLXS_MAX_HBQ_BUFFERS 4096 2057fcf3ce44SJohn Forte 2058*291a2b48SSukumar Swaminathan typedef struct 2059*291a2b48SSukumar Swaminathan { 2060*291a2b48SSukumar Swaminathan uint32_t HBQ_num_mask; /* number of mask entries in */ 2061*291a2b48SSukumar Swaminathan /* port array */ 2062*291a2b48SSukumar Swaminathan uint32_t HBQ_recvNotify; /* Rcv buffer notification */ 2063*291a2b48SSukumar Swaminathan uint32_t HBQ_numEntries; /* # of entries in HBQ */ 2064*291a2b48SSukumar Swaminathan uint32_t HBQ_headerLen; /* 0 if not profile 4 or 5 */ 2065*291a2b48SSukumar Swaminathan uint32_t HBQ_logEntry; /* Set to 1 if this HBQ used */ 2066*291a2b48SSukumar Swaminathan /* for LogEntry */ 2067*291a2b48SSukumar Swaminathan uint32_t HBQ_profile; /* Selection profile 0=all, */ 2068*291a2b48SSukumar Swaminathan /* 7=logentry */ 2069*291a2b48SSukumar Swaminathan uint32_t HBQ_ringMask; /* Binds HBQ to a ring e.g. */ 2070*291a2b48SSukumar Swaminathan /* Ring0=b0001, ring2=b0100 */ 2071*291a2b48SSukumar Swaminathan uint32_t HBQ_id; /* index of this hbq in ring */ 2072*291a2b48SSukumar Swaminathan /* of HBQs[] */ 2073*291a2b48SSukumar Swaminathan uint32_t HBQ_PutIdx_next; /* Index to next HBQ slot to */ 2074*291a2b48SSukumar Swaminathan /* use */ 2075*291a2b48SSukumar Swaminathan uint32_t HBQ_PutIdx; /* HBQ slot to use */ 2076*291a2b48SSukumar Swaminathan uint32_t HBQ_GetIdx; /* Local copy of Get index */ 2077*291a2b48SSukumar Swaminathan /* from Port */ 2078*291a2b48SSukumar Swaminathan uint16_t HBQ_PostBufCnt; /* Current number of entries */ 2079*291a2b48SSukumar Swaminathan /* in list */ 2080*291a2b48SSukumar Swaminathan MATCHMAP *HBQ_PostBufs[EMLXS_MAX_HBQ_BUFFERS]; 2081*291a2b48SSukumar Swaminathan MATCHMAP HBQ_host_buf; /* HBQ host buffer for HBQEs */ 2082*291a2b48SSukumar Swaminathan HBQ_MASK HBQ_Masks[6]; 2083*291a2b48SSukumar Swaminathan 2084*291a2b48SSukumar Swaminathan union 2085*291a2b48SSukumar Swaminathan { 2086*291a2b48SSukumar Swaminathan uint32_t allprofiles[12]; 2087*291a2b48SSukumar Swaminathan 2088*291a2b48SSukumar Swaminathan struct 2089*291a2b48SSukumar Swaminathan { 2090fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2091*291a2b48SSukumar Swaminathan uint32_t seqlenoff:16; 2092*291a2b48SSukumar Swaminathan uint32_t maxlen:16; 2093fcf3ce44SJohn Forte #endif 2094fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2095*291a2b48SSukumar Swaminathan uint32_t maxlen:16; 2096*291a2b48SSukumar Swaminathan uint32_t seqlenoff:16; 2097fcf3ce44SJohn Forte #endif 2098fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2099*291a2b48SSukumar Swaminathan uint32_t rsvd1:28; 2100*291a2b48SSukumar Swaminathan uint32_t seqlenbcnt:4; 2101fcf3ce44SJohn Forte #endif 2102fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2103*291a2b48SSukumar Swaminathan uint32_t seqlenbcnt:4; 2104*291a2b48SSukumar Swaminathan uint32_t rsvd1:28; 2105fcf3ce44SJohn Forte #endif 2106*291a2b48SSukumar Swaminathan uint32_t rsvd[10]; 2107fcf3ce44SJohn Forte } profile2; 2108fcf3ce44SJohn Forte 2109*291a2b48SSukumar Swaminathan struct 2110*291a2b48SSukumar Swaminathan { 2111fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2112*291a2b48SSukumar Swaminathan uint32_t seqlenoff:16; 2113*291a2b48SSukumar Swaminathan uint32_t maxlen:16; 2114fcf3ce44SJohn Forte #endif 2115fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2116*291a2b48SSukumar Swaminathan uint32_t maxlen:16; 2117*291a2b48SSukumar Swaminathan uint32_t seqlenoff:16; 2118fcf3ce44SJohn Forte #endif 2119fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2120*291a2b48SSukumar Swaminathan uint32_t cmdcodeoff:28; 2121*291a2b48SSukumar Swaminathan uint32_t rsvd1:12; 2122*291a2b48SSukumar Swaminathan uint32_t seqlenbcnt:4; 2123fcf3ce44SJohn Forte #endif 2124fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2125*291a2b48SSukumar Swaminathan uint32_t seqlenbcnt:4; 2126*291a2b48SSukumar Swaminathan uint32_t rsvd1:12; 2127*291a2b48SSukumar Swaminathan uint32_t cmdcodeoff:28; 2128fcf3ce44SJohn Forte #endif 2129*291a2b48SSukumar Swaminathan uint32_t cmdmatch[8]; 2130fcf3ce44SJohn Forte 2131*291a2b48SSukumar Swaminathan uint32_t rsvd[2]; 2132fcf3ce44SJohn Forte } profile3; 2133fcf3ce44SJohn Forte 2134*291a2b48SSukumar Swaminathan struct 2135*291a2b48SSukumar Swaminathan { 2136fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2137*291a2b48SSukumar Swaminathan uint32_t seqlenoff:16; 2138*291a2b48SSukumar Swaminathan uint32_t maxlen:16; 2139fcf3ce44SJohn Forte #endif 2140fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2141*291a2b48SSukumar Swaminathan uint32_t maxlen:16; 2142*291a2b48SSukumar Swaminathan uint32_t seqlenoff:16; 2143fcf3ce44SJohn Forte #endif 2144fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2145*291a2b48SSukumar Swaminathan uint32_t cmdcodeoff:28; 2146*291a2b48SSukumar Swaminathan uint32_t rsvd1:12; 2147*291a2b48SSukumar Swaminathan uint32_t seqlenbcnt:4; 2148fcf3ce44SJohn Forte #endif 2149fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2150*291a2b48SSukumar Swaminathan uint32_t seqlenbcnt:4; 2151*291a2b48SSukumar Swaminathan uint32_t rsvd1:12; 2152*291a2b48SSukumar Swaminathan uint32_t cmdcodeoff:28; 2153fcf3ce44SJohn Forte #endif 2154*291a2b48SSukumar Swaminathan uint32_t cmdmatch[8]; 2155fcf3ce44SJohn Forte 2156*291a2b48SSukumar Swaminathan uint32_t rsvd[2]; 2157fcf3ce44SJohn Forte } profile5; 2158fcf3ce44SJohn Forte } profiles; 2159fcf3ce44SJohn Forte } HBQ_INIT_t; 2160fcf3ce44SJohn Forte 2161fcf3ce44SJohn Forte 2162fcf3ce44SJohn Forte 2163fcf3ce44SJohn Forte /* Structure for MB Command LOAD_SM and DOWN_LOAD */ 2164fcf3ce44SJohn Forte 2165fcf3ce44SJohn Forte 2166*291a2b48SSukumar Swaminathan typedef struct 2167*291a2b48SSukumar Swaminathan { 2168fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2169*291a2b48SSukumar Swaminathan uint32_t rsvd2:25; 2170*291a2b48SSukumar Swaminathan uint32_t acknowledgment:1; 2171*291a2b48SSukumar Swaminathan uint32_t version:1; 2172*291a2b48SSukumar Swaminathan uint32_t erase_or_prog:1; 2173*291a2b48SSukumar Swaminathan uint32_t update_flash:1; 2174*291a2b48SSukumar Swaminathan uint32_t update_ram:1; 2175*291a2b48SSukumar Swaminathan uint32_t method:1; 2176*291a2b48SSukumar Swaminathan uint32_t load_cmplt:1; 2177fcf3ce44SJohn Forte #endif 2178fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2179*291a2b48SSukumar Swaminathan uint32_t load_cmplt:1; 2180*291a2b48SSukumar Swaminathan uint32_t method:1; 2181*291a2b48SSukumar Swaminathan uint32_t update_ram:1; 2182*291a2b48SSukumar Swaminathan uint32_t update_flash:1; 2183*291a2b48SSukumar Swaminathan uint32_t erase_or_prog:1; 2184*291a2b48SSukumar Swaminathan uint32_t version:1; 2185*291a2b48SSukumar Swaminathan uint32_t acknowledgment:1; 2186*291a2b48SSukumar Swaminathan uint32_t rsvd2:25; 2187fcf3ce44SJohn Forte #endif 2188fcf3ce44SJohn Forte 2189fcf3ce44SJohn Forte #define DL_FROM_BDE 0 /* method */ 2190fcf3ce44SJohn Forte #define DL_FROM_SLIM 1 2191fcf3ce44SJohn Forte 2192*291a2b48SSukumar Swaminathan #define PROGRAM_FLASH 0 /* erase_or_prog */ 2193fcf3ce44SJohn Forte #define ERASE_FLASH 1 2194fcf3ce44SJohn Forte 2195*291a2b48SSukumar Swaminathan uint32_t dl_to_adr; 2196*291a2b48SSukumar Swaminathan uint32_t dl_len; 2197*291a2b48SSukumar Swaminathan union 2198*291a2b48SSukumar Swaminathan { 2199*291a2b48SSukumar Swaminathan uint32_t dl_from_slim_offset; 2200*291a2b48SSukumar Swaminathan ULP_BDE dl_from_bde; 2201*291a2b48SSukumar Swaminathan ULP_BDE64 dl_from_bde64; 2202*291a2b48SSukumar Swaminathan PROG_ID prog_id; 2203fcf3ce44SJohn Forte } un; 2204fcf3ce44SJohn Forte } LOAD_SM_VAR; 2205fcf3ce44SJohn Forte 2206fcf3ce44SJohn Forte 2207fcf3ce44SJohn Forte /* Structure for MB Command READ_NVPARM (02) */ 2208fcf3ce44SJohn Forte 2209*291a2b48SSukumar Swaminathan typedef struct 2210*291a2b48SSukumar Swaminathan { 2211*291a2b48SSukumar Swaminathan uint32_t rsvd1[3]; /* Read as all one's */ 2212*291a2b48SSukumar Swaminathan uint32_t rsvd2; /* Read as all zero's */ 2213*291a2b48SSukumar Swaminathan uint32_t portname[2]; /* N_PORT name */ 2214*291a2b48SSukumar Swaminathan uint32_t nodename[2]; /* NODE name */ 2215fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2216*291a2b48SSukumar Swaminathan uint32_t pref_DID:24; 2217*291a2b48SSukumar Swaminathan uint32_t hardAL_PA:8; 2218fcf3ce44SJohn Forte #endif 2219fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2220*291a2b48SSukumar Swaminathan uint32_t hardAL_PA:8; 2221*291a2b48SSukumar Swaminathan uint32_t pref_DID:24; 2222fcf3ce44SJohn Forte #endif 2223*291a2b48SSukumar Swaminathan uint32_t rsvd3[21]; /* Read as all one's */ 2224fcf3ce44SJohn Forte } READ_NV_VAR; 2225fcf3ce44SJohn Forte 2226fcf3ce44SJohn Forte 2227fcf3ce44SJohn Forte /* Structure for MB Command WRITE_NVPARMS (03) */ 2228fcf3ce44SJohn Forte 2229*291a2b48SSukumar Swaminathan typedef struct 2230*291a2b48SSukumar Swaminathan { 2231*291a2b48SSukumar Swaminathan uint32_t rsvd1[3]; /* Must be all one's */ 2232*291a2b48SSukumar Swaminathan uint32_t rsvd2; /* Must be all zero's */ 2233*291a2b48SSukumar Swaminathan uint32_t portname[2]; /* N_PORT name */ 2234*291a2b48SSukumar Swaminathan uint32_t nodename[2]; /* NODE name */ 2235fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2236*291a2b48SSukumar Swaminathan uint32_t pref_DID:24; 2237*291a2b48SSukumar Swaminathan uint32_t hardAL_PA:8; 2238fcf3ce44SJohn Forte #endif 2239fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2240*291a2b48SSukumar Swaminathan uint32_t hardAL_PA:8; 2241*291a2b48SSukumar Swaminathan uint32_t pref_DID:24; 2242fcf3ce44SJohn Forte #endif 2243*291a2b48SSukumar Swaminathan uint32_t rsvd3[21]; /* Must be all one's */ 2244fcf3ce44SJohn Forte } WRITE_NV_VAR; 2245fcf3ce44SJohn Forte 2246fcf3ce44SJohn Forte 2247fcf3ce44SJohn Forte /* Structure for MB Command RUN_BIU_DIAG (04) */ 2248fcf3ce44SJohn Forte /* Structure for MB Command RUN_BIU_DIAG64 (0x84) */ 2249fcf3ce44SJohn Forte 2250*291a2b48SSukumar Swaminathan typedef struct 2251*291a2b48SSukumar Swaminathan { 2252*291a2b48SSukumar Swaminathan uint32_t rsvd1; 2253*291a2b48SSukumar Swaminathan union 2254*291a2b48SSukumar Swaminathan { 2255*291a2b48SSukumar Swaminathan struct 2256*291a2b48SSukumar Swaminathan { 2257*291a2b48SSukumar Swaminathan ULP_BDE xmit_bde; 2258*291a2b48SSukumar Swaminathan ULP_BDE rcv_bde; 2259fcf3ce44SJohn Forte } s1; 2260*291a2b48SSukumar Swaminathan struct 2261*291a2b48SSukumar Swaminathan { 2262*291a2b48SSukumar Swaminathan ULP_BDE64 xmit_bde64; 2263*291a2b48SSukumar Swaminathan ULP_BDE64 rcv_bde64; 2264fcf3ce44SJohn Forte } s2; 2265fcf3ce44SJohn Forte } un; 2266fcf3ce44SJohn Forte } BIU_DIAG_VAR; 2267fcf3ce44SJohn Forte 2268fcf3ce44SJohn Forte 2269fcf3ce44SJohn Forte /* Structure for MB Command INIT_LINK (05) */ 2270fcf3ce44SJohn Forte 2271*291a2b48SSukumar Swaminathan typedef struct 2272*291a2b48SSukumar Swaminathan { 2273fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2274*291a2b48SSukumar Swaminathan uint32_t rsvd1:24; 2275*291a2b48SSukumar Swaminathan uint32_t lipsr_AL_PA:8; /* AL_PA to issue Lip Selective */ 2276*291a2b48SSukumar Swaminathan /* Reset to */ 2277fcf3ce44SJohn Forte #endif 2278fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2279*291a2b48SSukumar Swaminathan uint32_t lipsr_AL_PA:8; /* AL_PA to issue Lip Selective */ 2280*291a2b48SSukumar Swaminathan /* Reset to */ 2281*291a2b48SSukumar Swaminathan uint32_t rsvd1:24; 2282fcf3ce44SJohn Forte #endif 2283fcf3ce44SJohn Forte 2284fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2285*291a2b48SSukumar Swaminathan uint8_t fabric_AL_PA; /* If using a Fabric Assigned AL_PA */ 2286*291a2b48SSukumar Swaminathan uint8_t rsvd2; 2287*291a2b48SSukumar Swaminathan uint16_t link_flags; 2288fcf3ce44SJohn Forte #endif 2289fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2290*291a2b48SSukumar Swaminathan uint16_t link_flags; 2291*291a2b48SSukumar Swaminathan uint8_t rsvd2; 2292*291a2b48SSukumar Swaminathan uint8_t fabric_AL_PA; /* If using a Fabric Assigned AL_PA */ 2293fcf3ce44SJohn Forte #endif 2294*291a2b48SSukumar Swaminathan #define FLAGS_LOCAL_LB 0x01 /* link_flags (=1) */ 2295*291a2b48SSukumar Swaminathan /* ENDEC loopback */ 2296fcf3ce44SJohn Forte #define FLAGS_TOPOLOGY_MODE_LOOP_PT 0x00 /* Attempt loop then pt-pt */ 2297fcf3ce44SJohn Forte #define FLAGS_TOPOLOGY_MODE_PT_PT 0x02 /* Attempt pt-pt only */ 2298fcf3ce44SJohn Forte #define FLAGS_TOPOLOGY_MODE_LOOP 0x04 /* Attempt loop only */ 2299fcf3ce44SJohn Forte #define FLAGS_TOPOLOGY_MODE_PT_LOOP 0x06 /* Attempt pt-pt then loop */ 2300fcf3ce44SJohn Forte #define FLAGS_LIRP_LILP 0x80 /* LIRP / LILP is disabled */ 2301fcf3ce44SJohn Forte 2302fcf3ce44SJohn Forte #define FLAGS_TOPOLOGY_FAILOVER 0x0400 /* Bit 10 */ 2303fcf3ce44SJohn Forte #define FLAGS_LINK_SPEED 0x0800 /* Bit 11 */ 2304fcf3ce44SJohn Forte #define FLAGS_PREABORT_RETURN 0x4000 /* Bit 14 */ 2305fcf3ce44SJohn Forte 2306*291a2b48SSukumar Swaminathan uint32_t link_speed; /* NEW_FEATURE */ 2307*291a2b48SSukumar Swaminathan #define LINK_SPEED_AUTO 0 /* Auto selection */ 2308*291a2b48SSukumar Swaminathan #define LINK_SPEED_1G 1 /* 1 Gigabaud */ 2309*291a2b48SSukumar Swaminathan #define LINK_SPEED_2G 2 /* 2 Gigabaud */ 2310fcf3ce44SJohn Forte } INIT_LINK_VAR; 2311fcf3ce44SJohn Forte 2312fcf3ce44SJohn Forte 2313fcf3ce44SJohn Forte /* Structure for MB Command DOWN_LINK (06) */ 2314fcf3ce44SJohn Forte 2315*291a2b48SSukumar Swaminathan typedef struct 2316*291a2b48SSukumar Swaminathan { 2317*291a2b48SSukumar Swaminathan uint32_t rsvd1; 2318fcf3ce44SJohn Forte } DOWN_LINK_VAR; 2319fcf3ce44SJohn Forte 2320fcf3ce44SJohn Forte 2321fcf3ce44SJohn Forte /* Structure for MB Command CONFIG_LINK (07) */ 2322fcf3ce44SJohn Forte 2323*291a2b48SSukumar Swaminathan typedef struct 2324*291a2b48SSukumar Swaminathan { 2325fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2326*291a2b48SSukumar Swaminathan uint32_t cr:1; 2327*291a2b48SSukumar Swaminathan uint32_t ci:1; 2328*291a2b48SSukumar Swaminathan uint32_t cr_delay:6; 2329*291a2b48SSukumar Swaminathan uint32_t cr_count:8; 2330*291a2b48SSukumar Swaminathan uint32_t rsvd1:8; 2331*291a2b48SSukumar Swaminathan uint32_t MaxBBC:8; 2332fcf3ce44SJohn Forte #endif 2333fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2334*291a2b48SSukumar Swaminathan uint32_t MaxBBC:8; 2335*291a2b48SSukumar Swaminathan uint32_t rsvd1:8; 2336*291a2b48SSukumar Swaminathan uint32_t cr_count:8; 2337*291a2b48SSukumar Swaminathan uint32_t cr_delay:6; 2338*291a2b48SSukumar Swaminathan uint32_t ci:1; 2339*291a2b48SSukumar Swaminathan uint32_t cr:1; 2340*291a2b48SSukumar Swaminathan #endif 2341*291a2b48SSukumar Swaminathan uint32_t myId; 2342*291a2b48SSukumar Swaminathan uint32_t rsvd2; 2343*291a2b48SSukumar Swaminathan uint32_t edtov; 2344*291a2b48SSukumar Swaminathan uint32_t arbtov; 2345*291a2b48SSukumar Swaminathan uint32_t ratov; 2346*291a2b48SSukumar Swaminathan uint32_t rttov; 2347*291a2b48SSukumar Swaminathan uint32_t altov; 2348*291a2b48SSukumar Swaminathan uint32_t crtov; 2349*291a2b48SSukumar Swaminathan uint32_t citov; 2350fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2351*291a2b48SSukumar Swaminathan uint32_t rrq_enable:1; 2352*291a2b48SSukumar Swaminathan uint32_t rrq_immed:1; 2353*291a2b48SSukumar Swaminathan uint32_t rsvd4:29; 2354*291a2b48SSukumar Swaminathan uint32_t ack0_enable:1; 2355fcf3ce44SJohn Forte #endif 2356fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2357*291a2b48SSukumar Swaminathan uint32_t ack0_enable:1; 2358*291a2b48SSukumar Swaminathan uint32_t rsvd4:29; 2359*291a2b48SSukumar Swaminathan uint32_t rrq_immed:1; 2360*291a2b48SSukumar Swaminathan uint32_t rrq_enable:1; 2361fcf3ce44SJohn Forte #endif 2362fcf3ce44SJohn Forte } CONFIG_LINK; 2363fcf3ce44SJohn Forte 2364fcf3ce44SJohn Forte 2365fcf3ce44SJohn Forte /* Structure for MB Command PART_SLIM (08) */ 2366fcf3ce44SJohn Forte 2367*291a2b48SSukumar Swaminathan typedef struct 2368*291a2b48SSukumar Swaminathan { 2369fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2370*291a2b48SSukumar Swaminathan uint32_t unused1:24; 2371*291a2b48SSukumar Swaminathan uint32_t numRing:8; 2372fcf3ce44SJohn Forte #endif 2373fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2374*291a2b48SSukumar Swaminathan uint32_t numRing:8; 2375*291a2b48SSukumar Swaminathan uint32_t unused1:24; 2376fcf3ce44SJohn Forte #endif 2377*291a2b48SSukumar Swaminathan emlxs_ring_def_t ringdef[4]; 2378*291a2b48SSukumar Swaminathan uint32_t hbainit; 2379fcf3ce44SJohn Forte } PART_SLIM_VAR; 2380fcf3ce44SJohn Forte 2381fcf3ce44SJohn Forte 2382fcf3ce44SJohn Forte /* Structure for MB Command CONFIG_RING (09) */ 2383fcf3ce44SJohn Forte 2384*291a2b48SSukumar Swaminathan typedef struct 2385*291a2b48SSukumar Swaminathan { 2386fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2387*291a2b48SSukumar Swaminathan uint32_t unused2:6; 2388*291a2b48SSukumar Swaminathan uint32_t recvSeq:1; 2389*291a2b48SSukumar Swaminathan uint32_t recvNotify:1; 2390*291a2b48SSukumar Swaminathan uint32_t numMask:8; 2391*291a2b48SSukumar Swaminathan uint32_t profile:8; 2392*291a2b48SSukumar Swaminathan uint32_t unused1:4; 2393*291a2b48SSukumar Swaminathan uint32_t ring:4; 2394fcf3ce44SJohn Forte #endif 2395fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2396*291a2b48SSukumar Swaminathan uint32_t ring:4; 2397*291a2b48SSukumar Swaminathan uint32_t unused1:4; 2398*291a2b48SSukumar Swaminathan uint32_t profile:8; 2399*291a2b48SSukumar Swaminathan uint32_t numMask:8; 2400*291a2b48SSukumar Swaminathan uint32_t recvNotify:1; 2401*291a2b48SSukumar Swaminathan uint32_t recvSeq:1; 2402*291a2b48SSukumar Swaminathan uint32_t unused2:6; 2403fcf3ce44SJohn Forte #endif 2404fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2405*291a2b48SSukumar Swaminathan uint16_t maxRespXchg; 2406*291a2b48SSukumar Swaminathan uint16_t maxOrigXchg; 2407fcf3ce44SJohn Forte #endif 2408fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2409*291a2b48SSukumar Swaminathan uint16_t maxOrigXchg; 2410*291a2b48SSukumar Swaminathan uint16_t maxRespXchg; 2411fcf3ce44SJohn Forte #endif 2412*291a2b48SSukumar Swaminathan RR_REG rrRegs[6]; 2413fcf3ce44SJohn Forte } CONFIG_RING_VAR; 2414fcf3ce44SJohn Forte 2415fcf3ce44SJohn Forte 2416fcf3ce44SJohn Forte /* Structure for MB Command RESET_RING (10) */ 2417fcf3ce44SJohn Forte 2418*291a2b48SSukumar Swaminathan typedef struct 2419*291a2b48SSukumar Swaminathan { 2420*291a2b48SSukumar Swaminathan uint32_t ring_no; 2421fcf3ce44SJohn Forte } RESET_RING_VAR; 2422fcf3ce44SJohn Forte 2423fcf3ce44SJohn Forte 2424fcf3ce44SJohn Forte /* Structure for MB Command READ_CONFIG (11) */ 2425fcf3ce44SJohn Forte 2426*291a2b48SSukumar Swaminathan typedef struct 2427*291a2b48SSukumar Swaminathan { 2428fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2429*291a2b48SSukumar Swaminathan uint32_t cr:1; 2430*291a2b48SSukumar Swaminathan uint32_t ci:1; 2431*291a2b48SSukumar Swaminathan uint32_t cr_delay:6; 2432*291a2b48SSukumar Swaminathan uint32_t cr_count:8; 2433*291a2b48SSukumar Swaminathan uint32_t InitBBC:8; 2434*291a2b48SSukumar Swaminathan uint32_t MaxBBC:8; 2435fcf3ce44SJohn Forte #endif 2436fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2437*291a2b48SSukumar Swaminathan uint32_t MaxBBC:8; 2438*291a2b48SSukumar Swaminathan uint32_t InitBBC:8; 2439*291a2b48SSukumar Swaminathan uint32_t cr_count:8; 2440*291a2b48SSukumar Swaminathan uint32_t cr_delay:6; 2441*291a2b48SSukumar Swaminathan uint32_t ci:1; 2442*291a2b48SSukumar Swaminathan uint32_t cr:1; 2443fcf3ce44SJohn Forte #endif 2444fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2445*291a2b48SSukumar Swaminathan uint32_t topology:8; 2446*291a2b48SSukumar Swaminathan uint32_t myDid:24; 2447fcf3ce44SJohn Forte #endif 2448fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2449*291a2b48SSukumar Swaminathan uint32_t myDid:24; 2450*291a2b48SSukumar Swaminathan uint32_t topology:8; 2451fcf3ce44SJohn Forte #endif 2452fcf3ce44SJohn Forte /* Defines for topology (defined previously) */ 2453fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2454*291a2b48SSukumar Swaminathan uint32_t AR:1; 2455*291a2b48SSukumar Swaminathan uint32_t IR:1; 2456*291a2b48SSukumar Swaminathan uint32_t rsvd1:29; 2457*291a2b48SSukumar Swaminathan uint32_t ack0:1; 2458fcf3ce44SJohn Forte #endif 2459fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2460*291a2b48SSukumar Swaminathan uint32_t ack0:1; 2461*291a2b48SSukumar Swaminathan uint32_t rsvd1:29; 2462*291a2b48SSukumar Swaminathan uint32_t IR:1; 2463*291a2b48SSukumar Swaminathan uint32_t AR:1; 2464*291a2b48SSukumar Swaminathan #endif 2465*291a2b48SSukumar Swaminathan uint32_t edtov; 2466*291a2b48SSukumar Swaminathan uint32_t arbtov; 2467*291a2b48SSukumar Swaminathan uint32_t ratov; 2468*291a2b48SSukumar Swaminathan uint32_t rttov; 2469*291a2b48SSukumar Swaminathan uint32_t altov; 2470*291a2b48SSukumar Swaminathan uint32_t lmt; 2471*291a2b48SSukumar Swaminathan 2472*291a2b48SSukumar Swaminathan #define LMT_1GB_CAPABLE 0x0004 2473*291a2b48SSukumar Swaminathan #define LMT_2GB_CAPABLE 0x0008 2474*291a2b48SSukumar Swaminathan #define LMT_4GB_CAPABLE 0x0040 2475*291a2b48SSukumar Swaminathan #define LMT_8GB_CAPABLE 0x0080 2476*291a2b48SSukumar Swaminathan #define LMT_10GB_CAPABLE 0x0100 2477fcf3ce44SJohn Forte /* E2E supported on adapters >= 8GB */ 2478*291a2b48SSukumar Swaminathan #define LMT_E2E_CAPABLE (LMT_8GB_CAPABLE|LMT_10GB_CAPABLE) 2479fcf3ce44SJohn Forte 2480*291a2b48SSukumar Swaminathan uint32_t rsvd2; 2481*291a2b48SSukumar Swaminathan uint32_t rsvd3; 2482*291a2b48SSukumar Swaminathan uint32_t max_xri; 2483*291a2b48SSukumar Swaminathan uint32_t max_iocb; 2484*291a2b48SSukumar Swaminathan uint32_t max_rpi; 2485*291a2b48SSukumar Swaminathan uint32_t avail_xri; 2486*291a2b48SSukumar Swaminathan uint32_t avail_iocb; 2487*291a2b48SSukumar Swaminathan uint32_t avail_rpi; 2488fcf3ce44SJohn Forte 2489fcf3ce44SJohn Forte #ifdef SLI3_SUPPORT 2490*291a2b48SSukumar Swaminathan uint32_t max_vpi; 2491*291a2b48SSukumar Swaminathan uint32_t max_alpa; 2492*291a2b48SSukumar Swaminathan uint32_t rsvd4; 2493*291a2b48SSukumar Swaminathan uint32_t avail_vpi; 2494fcf3ce44SJohn Forte #else 2495*291a2b48SSukumar Swaminathan uint32_t default_rpi; 2496fcf3ce44SJohn Forte #endif /* SLI3_SUPPORT */ 2497fcf3ce44SJohn Forte } READ_CONFIG_VAR; 2498fcf3ce44SJohn Forte 2499fcf3ce44SJohn Forte 2500fcf3ce44SJohn Forte /* Structure for MB Command READ_RCONFIG (12) */ 2501fcf3ce44SJohn Forte 2502*291a2b48SSukumar Swaminathan typedef struct 2503*291a2b48SSukumar Swaminathan { 2504fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2505*291a2b48SSukumar Swaminathan uint32_t rsvd2:7; 2506*291a2b48SSukumar Swaminathan uint32_t recvNotify:1; 2507*291a2b48SSukumar Swaminathan uint32_t numMask:8; 2508*291a2b48SSukumar Swaminathan uint32_t profile:8; 2509*291a2b48SSukumar Swaminathan uint32_t rsvd1:4; 2510*291a2b48SSukumar Swaminathan uint32_t ring:4; 2511fcf3ce44SJohn Forte #endif 2512fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2513*291a2b48SSukumar Swaminathan uint32_t ring:4; 2514*291a2b48SSukumar Swaminathan uint32_t rsvd1:4; 2515*291a2b48SSukumar Swaminathan uint32_t profile:8; 2516*291a2b48SSukumar Swaminathan uint32_t numMask:8; 2517*291a2b48SSukumar Swaminathan uint32_t recvNotify:1; 2518*291a2b48SSukumar Swaminathan uint32_t rsvd2:7; 2519fcf3ce44SJohn Forte #endif 2520fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2521*291a2b48SSukumar Swaminathan uint16_t maxResp; 2522*291a2b48SSukumar Swaminathan uint16_t maxOrig; 2523fcf3ce44SJohn Forte #endif 2524fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2525*291a2b48SSukumar Swaminathan uint16_t maxOrig; 2526*291a2b48SSukumar Swaminathan uint16_t maxResp; 2527fcf3ce44SJohn Forte #endif 2528*291a2b48SSukumar Swaminathan RR_REG rrRegs[6]; 2529fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2530*291a2b48SSukumar Swaminathan uint16_t cmdRingOffset; 2531*291a2b48SSukumar Swaminathan uint16_t cmdEntryCnt; 2532*291a2b48SSukumar Swaminathan uint16_t rspRingOffset; 2533*291a2b48SSukumar Swaminathan uint16_t rspEntryCnt; 2534*291a2b48SSukumar Swaminathan uint16_t nextCmdOffset; 2535*291a2b48SSukumar Swaminathan uint16_t rsvd3; 2536*291a2b48SSukumar Swaminathan uint16_t nextRspOffset; 2537*291a2b48SSukumar Swaminathan uint16_t rsvd4; 2538fcf3ce44SJohn Forte #endif 2539fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2540*291a2b48SSukumar Swaminathan uint16_t cmdEntryCnt; 2541*291a2b48SSukumar Swaminathan uint16_t cmdRingOffset; 2542*291a2b48SSukumar Swaminathan uint16_t rspEntryCnt; 2543*291a2b48SSukumar Swaminathan uint16_t rspRingOffset; 2544*291a2b48SSukumar Swaminathan uint16_t rsvd3; 2545*291a2b48SSukumar Swaminathan uint16_t nextCmdOffset; 2546*291a2b48SSukumar Swaminathan uint16_t rsvd4; 2547*291a2b48SSukumar Swaminathan uint16_t nextRspOffset; 2548fcf3ce44SJohn Forte #endif 2549fcf3ce44SJohn Forte } READ_RCONF_VAR; 2550fcf3ce44SJohn Forte 2551fcf3ce44SJohn Forte 2552fcf3ce44SJohn Forte /* Structure for MB Command READ_SPARM (13) */ 2553fcf3ce44SJohn Forte /* Structure for MB Command READ_SPARM64 (0x8D) */ 2554fcf3ce44SJohn Forte 2555*291a2b48SSukumar Swaminathan typedef struct 2556*291a2b48SSukumar Swaminathan { 2557*291a2b48SSukumar Swaminathan uint32_t rsvd1; 2558*291a2b48SSukumar Swaminathan uint32_t rsvd2; 2559*291a2b48SSukumar Swaminathan union 2560*291a2b48SSukumar Swaminathan { 2561*291a2b48SSukumar Swaminathan ULP_BDE sp; /* This BDE points to SERV_PARM */ 2562*291a2b48SSukumar Swaminathan /* structure */ 2563*291a2b48SSukumar Swaminathan ULP_BDE64 sp64; 2564fcf3ce44SJohn Forte } un; 2565fcf3ce44SJohn Forte } READ_SPARM_VAR; 2566fcf3ce44SJohn Forte 2567fcf3ce44SJohn Forte 2568fcf3ce44SJohn Forte /* Structure for MB Command READ_STATUS (14) */ 2569fcf3ce44SJohn Forte 2570*291a2b48SSukumar Swaminathan typedef struct 2571*291a2b48SSukumar Swaminathan { 2572fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2573*291a2b48SSukumar Swaminathan uint32_t rsvd1:31; 2574*291a2b48SSukumar Swaminathan uint32_t clrCounters:1; 2575*291a2b48SSukumar Swaminathan uint16_t activeXriCnt; 2576*291a2b48SSukumar Swaminathan uint16_t activeRpiCnt; 2577fcf3ce44SJohn Forte #endif 2578fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2579*291a2b48SSukumar Swaminathan uint32_t clrCounters:1; 2580*291a2b48SSukumar Swaminathan uint32_t rsvd1:31; 2581*291a2b48SSukumar Swaminathan uint16_t activeRpiCnt; 2582*291a2b48SSukumar Swaminathan uint16_t activeXriCnt; 2583*291a2b48SSukumar Swaminathan #endif 2584*291a2b48SSukumar Swaminathan uint32_t xmitByteCnt; 2585*291a2b48SSukumar Swaminathan uint32_t rcvByteCnt; 2586*291a2b48SSukumar Swaminathan uint32_t xmitFrameCnt; 2587*291a2b48SSukumar Swaminathan uint32_t rcvFrameCnt; 2588*291a2b48SSukumar Swaminathan uint32_t xmitSeqCnt; 2589*291a2b48SSukumar Swaminathan uint32_t rcvSeqCnt; 2590*291a2b48SSukumar Swaminathan uint32_t totalOrigExchanges; 2591*291a2b48SSukumar Swaminathan uint32_t totalRespExchanges; 2592*291a2b48SSukumar Swaminathan uint32_t rcvPbsyCnt; 2593*291a2b48SSukumar Swaminathan uint32_t rcvFbsyCnt; 2594fcf3ce44SJohn Forte } READ_STATUS_VAR; 2595fcf3ce44SJohn Forte 2596fcf3ce44SJohn Forte 2597fcf3ce44SJohn Forte /* Structure for MB Command READ_RPI (15) */ 2598fcf3ce44SJohn Forte /* Structure for MB Command READ_RPI64 (0x8F) */ 2599fcf3ce44SJohn Forte 2600*291a2b48SSukumar Swaminathan typedef struct 2601*291a2b48SSukumar Swaminathan { 2602fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2603*291a2b48SSukumar Swaminathan uint16_t nextRpi; 2604*291a2b48SSukumar Swaminathan uint16_t reqRpi; 2605*291a2b48SSukumar Swaminathan uint32_t rsvd2:8; 2606*291a2b48SSukumar Swaminathan uint32_t DID:24; 2607fcf3ce44SJohn Forte #endif 2608fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2609*291a2b48SSukumar Swaminathan uint16_t reqRpi; 2610*291a2b48SSukumar Swaminathan uint16_t nextRpi; 2611*291a2b48SSukumar Swaminathan uint32_t DID:24; 2612*291a2b48SSukumar Swaminathan uint32_t rsvd2:8; 2613*291a2b48SSukumar Swaminathan #endif 2614*291a2b48SSukumar Swaminathan union 2615*291a2b48SSukumar Swaminathan { 2616*291a2b48SSukumar Swaminathan ULP_BDE sp; 2617*291a2b48SSukumar Swaminathan ULP_BDE64 sp64; 2618fcf3ce44SJohn Forte } un; 2619fcf3ce44SJohn Forte } READ_RPI_VAR; 2620fcf3ce44SJohn Forte 2621fcf3ce44SJohn Forte 2622fcf3ce44SJohn Forte /* Structure for MB Command READ_XRI (16) */ 2623fcf3ce44SJohn Forte 2624*291a2b48SSukumar Swaminathan typedef struct 2625*291a2b48SSukumar Swaminathan { 2626fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2627*291a2b48SSukumar Swaminathan uint16_t nextXri; 2628*291a2b48SSukumar Swaminathan uint16_t reqXri; 2629*291a2b48SSukumar Swaminathan uint16_t rsvd1; 2630*291a2b48SSukumar Swaminathan uint16_t rpi; 2631*291a2b48SSukumar Swaminathan uint32_t rsvd2:8; 2632*291a2b48SSukumar Swaminathan uint32_t DID:24; 2633*291a2b48SSukumar Swaminathan uint32_t rsvd3:8; 2634*291a2b48SSukumar Swaminathan uint32_t SID:24; 2635*291a2b48SSukumar Swaminathan uint32_t rsvd4; 2636*291a2b48SSukumar Swaminathan uint8_t seqId; 2637*291a2b48SSukumar Swaminathan uint8_t rsvd5; 2638*291a2b48SSukumar Swaminathan uint16_t seqCount; 2639*291a2b48SSukumar Swaminathan uint16_t oxId; 2640*291a2b48SSukumar Swaminathan uint16_t rxId; 2641*291a2b48SSukumar Swaminathan uint32_t rsvd6:30; 2642*291a2b48SSukumar Swaminathan uint32_t si:1; 2643*291a2b48SSukumar Swaminathan uint32_t exchOrig:1; 2644fcf3ce44SJohn Forte #endif 2645fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2646*291a2b48SSukumar Swaminathan uint16_t reqXri; 2647*291a2b48SSukumar Swaminathan uint16_t nextXri; 2648*291a2b48SSukumar Swaminathan uint16_t rpi; 2649*291a2b48SSukumar Swaminathan uint16_t rsvd1; 2650*291a2b48SSukumar Swaminathan uint32_t DID:24; 2651*291a2b48SSukumar Swaminathan uint32_t rsvd2:8; 2652*291a2b48SSukumar Swaminathan uint32_t SID:24; 2653*291a2b48SSukumar Swaminathan uint32_t rsvd3:8; 2654*291a2b48SSukumar Swaminathan uint32_t rsvd4; 2655*291a2b48SSukumar Swaminathan uint16_t seqCount; 2656*291a2b48SSukumar Swaminathan uint8_t rsvd5; 2657*291a2b48SSukumar Swaminathan uint8_t seqId; 2658*291a2b48SSukumar Swaminathan uint16_t rxId; 2659*291a2b48SSukumar Swaminathan uint16_t oxId; 2660*291a2b48SSukumar Swaminathan uint32_t exchOrig:1; 2661*291a2b48SSukumar Swaminathan uint32_t si:1; 2662*291a2b48SSukumar Swaminathan uint32_t rsvd6:30; 2663fcf3ce44SJohn Forte #endif 2664fcf3ce44SJohn Forte } READ_XRI_VAR; 2665fcf3ce44SJohn Forte 2666fcf3ce44SJohn Forte 2667fcf3ce44SJohn Forte /* Structure for MB Command READ_REV (17) */ 2668fcf3ce44SJohn Forte 2669*291a2b48SSukumar Swaminathan typedef struct 2670*291a2b48SSukumar Swaminathan { 2671fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2672*291a2b48SSukumar Swaminathan uint32_t cv:1; 2673*291a2b48SSukumar Swaminathan uint32_t rr:1; 2674*291a2b48SSukumar Swaminathan uint32_t co:1; 2675*291a2b48SSukumar Swaminathan uint32_t rp:1; 2676*291a2b48SSukumar Swaminathan uint32_t cv3:1; 2677*291a2b48SSukumar Swaminathan uint32_t rf3:1; 2678*291a2b48SSukumar Swaminathan uint32_t rsvd1:10; 2679*291a2b48SSukumar Swaminathan uint32_t offset:14; 2680*291a2b48SSukumar Swaminathan uint32_t rv:2; 2681fcf3ce44SJohn Forte #endif 2682fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2683*291a2b48SSukumar Swaminathan uint32_t rv:2; 2684*291a2b48SSukumar Swaminathan uint32_t offset:14; 2685*291a2b48SSukumar Swaminathan uint32_t rsvd1:10; 2686*291a2b48SSukumar Swaminathan uint32_t rf3:1; 2687*291a2b48SSukumar Swaminathan uint32_t cv3:1; 2688*291a2b48SSukumar Swaminathan uint32_t rp:1; 2689*291a2b48SSukumar Swaminathan uint32_t co:1; 2690*291a2b48SSukumar Swaminathan uint32_t rr:1; 2691*291a2b48SSukumar Swaminathan uint32_t cv:1; 2692*291a2b48SSukumar Swaminathan #endif 2693*291a2b48SSukumar Swaminathan uint32_t biuRev; 2694*291a2b48SSukumar Swaminathan uint32_t smRev; 2695*291a2b48SSukumar Swaminathan union 2696*291a2b48SSukumar Swaminathan { 2697*291a2b48SSukumar Swaminathan uint32_t smFwRev; 2698*291a2b48SSukumar Swaminathan struct 2699*291a2b48SSukumar Swaminathan { 2700fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2701*291a2b48SSukumar Swaminathan uint8_t ProgType; 2702*291a2b48SSukumar Swaminathan uint8_t ProgId; 2703*291a2b48SSukumar Swaminathan uint16_t ProgVer:4; 2704*291a2b48SSukumar Swaminathan uint16_t ProgRev:4; 2705*291a2b48SSukumar Swaminathan uint16_t ProgFixLvl:2; 2706*291a2b48SSukumar Swaminathan uint16_t ProgDistType:2; 2707*291a2b48SSukumar Swaminathan uint16_t DistCnt:4; 2708fcf3ce44SJohn Forte #endif 2709fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2710*291a2b48SSukumar Swaminathan uint16_t DistCnt:4; 2711*291a2b48SSukumar Swaminathan uint16_t ProgDistType:2; 2712*291a2b48SSukumar Swaminathan uint16_t ProgFixLvl:2; 2713*291a2b48SSukumar Swaminathan uint16_t ProgRev:4; 2714*291a2b48SSukumar Swaminathan uint16_t ProgVer:4; 2715*291a2b48SSukumar Swaminathan uint8_t ProgId; 2716*291a2b48SSukumar Swaminathan uint8_t ProgType; 2717fcf3ce44SJohn Forte #endif 2718fcf3ce44SJohn Forte } b; 2719fcf3ce44SJohn Forte } un; 2720*291a2b48SSukumar Swaminathan uint32_t endecRev; 2721fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2722*291a2b48SSukumar Swaminathan uint8_t feaLevelHigh; 2723*291a2b48SSukumar Swaminathan uint8_t feaLevelLow; 2724*291a2b48SSukumar Swaminathan uint8_t fcphHigh; 2725*291a2b48SSukumar Swaminathan uint8_t fcphLow; 2726fcf3ce44SJohn Forte #endif 2727fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2728*291a2b48SSukumar Swaminathan uint8_t fcphLow; 2729*291a2b48SSukumar Swaminathan uint8_t fcphHigh; 2730*291a2b48SSukumar Swaminathan uint8_t feaLevelLow; 2731*291a2b48SSukumar Swaminathan uint8_t feaLevelHigh; 2732*291a2b48SSukumar Swaminathan #endif 2733*291a2b48SSukumar Swaminathan uint32_t postKernRev; 2734*291a2b48SSukumar Swaminathan uint32_t opFwRev; 2735*291a2b48SSukumar Swaminathan uint8_t opFwName[16]; 2736*291a2b48SSukumar Swaminathan 2737*291a2b48SSukumar Swaminathan uint32_t sliFwRev1; 2738*291a2b48SSukumar Swaminathan uint8_t sliFwName1[16]; 2739*291a2b48SSukumar Swaminathan uint32_t sliFwRev2; 2740*291a2b48SSukumar Swaminathan uint8_t sliFwName2[16]; 2741fcf3ce44SJohn Forte } READ_REV_VAR; 2742fcf3ce44SJohn Forte 2743fcf3ce44SJohn Forte #define rxSeqRev postKernRev 2744fcf3ce44SJohn Forte #define txSeqRev opFwRev 2745fcf3ce44SJohn Forte 2746fcf3ce44SJohn Forte /* Structure for MB Command READ_LINK_STAT (18) */ 2747fcf3ce44SJohn Forte 2748*291a2b48SSukumar Swaminathan typedef struct 2749*291a2b48SSukumar Swaminathan { 2750*291a2b48SSukumar Swaminathan uint32_t rsvd1; 2751*291a2b48SSukumar Swaminathan uint32_t linkFailureCnt; 2752*291a2b48SSukumar Swaminathan uint32_t lossSyncCnt; 2753*291a2b48SSukumar Swaminathan 2754*291a2b48SSukumar Swaminathan uint32_t lossSignalCnt; 2755*291a2b48SSukumar Swaminathan uint32_t primSeqErrCnt; 2756*291a2b48SSukumar Swaminathan uint32_t invalidXmitWord; 2757*291a2b48SSukumar Swaminathan uint32_t crcCnt; 2758*291a2b48SSukumar Swaminathan uint32_t primSeqTimeout; 2759*291a2b48SSukumar Swaminathan uint32_t elasticOverrun; 2760*291a2b48SSukumar Swaminathan uint32_t arbTimeout; 2761*291a2b48SSukumar Swaminathan 2762*291a2b48SSukumar Swaminathan uint32_t rxBufCredit; 2763*291a2b48SSukumar Swaminathan uint32_t rxBufCreditCur; 2764*291a2b48SSukumar Swaminathan 2765*291a2b48SSukumar Swaminathan uint32_t txBufCredit; 2766*291a2b48SSukumar Swaminathan uint32_t txBufCreditCur; 2767*291a2b48SSukumar Swaminathan 2768*291a2b48SSukumar Swaminathan uint32_t EOFaCnt; 2769*291a2b48SSukumar Swaminathan uint32_t EOFdtiCnt; 2770*291a2b48SSukumar Swaminathan uint32_t EOFniCnt; 2771*291a2b48SSukumar Swaminathan uint32_t SOFfCnt; 2772fcf3ce44SJohn Forte } READ_LNK_VAR; 2773fcf3ce44SJohn Forte 2774fcf3ce44SJohn Forte 2775fcf3ce44SJohn Forte /* Structure for MB Command REG_LOGIN (19) */ 2776fcf3ce44SJohn Forte /* Structure for MB Command REG_LOGIN64 (0x93) */ 2777fcf3ce44SJohn Forte 2778*291a2b48SSukumar Swaminathan typedef struct 2779*291a2b48SSukumar Swaminathan { 2780fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2781*291a2b48SSukumar Swaminathan uint16_t rsvd1; 2782*291a2b48SSukumar Swaminathan uint16_t rpi; 2783*291a2b48SSukumar Swaminathan uint32_t rsvd2:8; 2784*291a2b48SSukumar Swaminathan uint32_t did:24; 2785fcf3ce44SJohn Forte #endif 2786fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2787*291a2b48SSukumar Swaminathan uint16_t rpi; 2788*291a2b48SSukumar Swaminathan uint16_t rsvd1; 2789*291a2b48SSukumar Swaminathan uint32_t did:24; 2790*291a2b48SSukumar Swaminathan uint32_t rsvd2:8; 2791*291a2b48SSukumar Swaminathan #endif 2792*291a2b48SSukumar Swaminathan union 2793*291a2b48SSukumar Swaminathan { 2794*291a2b48SSukumar Swaminathan ULP_BDE sp; 2795*291a2b48SSukumar Swaminathan ULP_BDE64 sp64; 2796fcf3ce44SJohn Forte } un; 2797fcf3ce44SJohn Forte 2798fcf3ce44SJohn Forte #ifdef SLI3_SUPPORT 2799fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2800*291a2b48SSukumar Swaminathan uint16_t rsvd6; 2801*291a2b48SSukumar Swaminathan uint16_t vpi; 2802fcf3ce44SJohn Forte #endif 2803fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2804*291a2b48SSukumar Swaminathan uint16_t vpi; 2805*291a2b48SSukumar Swaminathan uint16_t rsvd6; 2806fcf3ce44SJohn Forte #endif 2807fcf3ce44SJohn Forte #endif /* SLI3_SUPPORT */ 2808fcf3ce44SJohn Forte } REG_LOGIN_VAR; 2809fcf3ce44SJohn Forte 2810fcf3ce44SJohn Forte /* Word 30 contents for REG_LOGIN */ 2811*291a2b48SSukumar Swaminathan typedef union 2812*291a2b48SSukumar Swaminathan { 2813*291a2b48SSukumar Swaminathan struct 2814*291a2b48SSukumar Swaminathan { 2815fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2816*291a2b48SSukumar Swaminathan uint16_t rsvd1:12; 2817*291a2b48SSukumar Swaminathan uint16_t class:4; 2818*291a2b48SSukumar Swaminathan uint16_t xri; 2819fcf3ce44SJohn Forte #endif 2820fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2821*291a2b48SSukumar Swaminathan uint16_t xri; 2822*291a2b48SSukumar Swaminathan uint16_t class:4; 2823*291a2b48SSukumar Swaminathan uint16_t rsvd1:12; 2824fcf3ce44SJohn Forte #endif 2825fcf3ce44SJohn Forte } f; 2826*291a2b48SSukumar Swaminathan uint32_t word; 2827fcf3ce44SJohn Forte } REG_WD30; 2828fcf3ce44SJohn Forte 2829fcf3ce44SJohn Forte 2830fcf3ce44SJohn Forte /* Structure for MB Command UNREG_LOGIN (20) */ 2831fcf3ce44SJohn Forte 2832*291a2b48SSukumar Swaminathan typedef struct 2833*291a2b48SSukumar Swaminathan { 2834fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2835*291a2b48SSukumar Swaminathan uint16_t rsvd1; 2836*291a2b48SSukumar Swaminathan uint16_t rpi; 2837fcf3ce44SJohn Forte #endif 2838fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2839*291a2b48SSukumar Swaminathan uint16_t rpi; 2840*291a2b48SSukumar Swaminathan uint16_t rsvd1; 2841fcf3ce44SJohn Forte #endif 2842fcf3ce44SJohn Forte 2843fcf3ce44SJohn Forte #ifdef SLI3_SUPPORT 2844*291a2b48SSukumar Swaminathan uint32_t rsvd2; 2845*291a2b48SSukumar Swaminathan uint32_t rsvd3; 2846*291a2b48SSukumar Swaminathan uint32_t rsvd4; 2847*291a2b48SSukumar Swaminathan uint32_t rsvd5; 2848fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2849*291a2b48SSukumar Swaminathan uint16_t rsvd6; 2850*291a2b48SSukumar Swaminathan uint16_t vpi; 2851fcf3ce44SJohn Forte #endif 2852fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2853*291a2b48SSukumar Swaminathan uint16_t vpi; 2854*291a2b48SSukumar Swaminathan uint16_t rsvd6; 2855fcf3ce44SJohn Forte #endif 2856fcf3ce44SJohn Forte #endif /* SLI3_SUPPORT */ 2857fcf3ce44SJohn Forte } UNREG_LOGIN_VAR; 2858fcf3ce44SJohn Forte 2859fcf3ce44SJohn Forte 2860fcf3ce44SJohn Forte /* Structure for MB Command UNREG_D_ID (0x23) */ 2861fcf3ce44SJohn Forte 2862*291a2b48SSukumar Swaminathan typedef struct 2863*291a2b48SSukumar Swaminathan { 2864*291a2b48SSukumar Swaminathan uint32_t did; 2865fcf3ce44SJohn Forte 2866fcf3ce44SJohn Forte #ifdef SLI3_SUPPORT 2867*291a2b48SSukumar Swaminathan uint32_t rsvd2; 2868*291a2b48SSukumar Swaminathan uint32_t rsvd3; 2869*291a2b48SSukumar Swaminathan uint32_t rsvd4; 2870*291a2b48SSukumar Swaminathan uint32_t rsvd5; 2871fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2872*291a2b48SSukumar Swaminathan uint16_t rsvd6; 2873*291a2b48SSukumar Swaminathan uint16_t vpi; 2874fcf3ce44SJohn Forte #endif 2875fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2876*291a2b48SSukumar Swaminathan uint16_t vpi; 2877*291a2b48SSukumar Swaminathan uint16_t rsvd6; 2878fcf3ce44SJohn Forte #endif 2879fcf3ce44SJohn Forte #endif /* SLI3_SUPPORT */ 2880fcf3ce44SJohn Forte } UNREG_D_ID_VAR; 2881fcf3ce44SJohn Forte 2882fcf3ce44SJohn Forte 2883fcf3ce44SJohn Forte /* Structure for MB Command READ_LA (21) */ 2884fcf3ce44SJohn Forte /* Structure for MB Command READ_LA64 (0x95) */ 2885fcf3ce44SJohn Forte 2886*291a2b48SSukumar Swaminathan typedef struct 2887*291a2b48SSukumar Swaminathan { 2888*291a2b48SSukumar Swaminathan uint32_t eventTag; /* Event tag */ 2889fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2890*291a2b48SSukumar Swaminathan uint32_t rsvd2:19; 2891*291a2b48SSukumar Swaminathan uint32_t fa:1; 2892*291a2b48SSukumar Swaminathan uint32_t mm:1; 2893*291a2b48SSukumar Swaminathan uint32_t tc:1; 2894*291a2b48SSukumar Swaminathan uint32_t pb:1; 2895*291a2b48SSukumar Swaminathan uint32_t il:1; 2896*291a2b48SSukumar Swaminathan uint32_t attType:8; 2897fcf3ce44SJohn Forte #endif 2898fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2899*291a2b48SSukumar Swaminathan uint32_t attType:8; 2900*291a2b48SSukumar Swaminathan uint32_t il:1; 2901*291a2b48SSukumar Swaminathan uint32_t pb:1; 2902*291a2b48SSukumar Swaminathan uint32_t tc:1; 2903*291a2b48SSukumar Swaminathan uint32_t mm:1; 2904*291a2b48SSukumar Swaminathan uint32_t fa:1; 2905*291a2b48SSukumar Swaminathan uint32_t rsvd2:19; 2906fcf3ce44SJohn Forte #endif 2907fcf3ce44SJohn Forte #define AT_RESERVED 0x00 /* Reserved - attType */ 2908fcf3ce44SJohn Forte #define AT_LINK_UP 0x01 /* Link is up */ 2909fcf3ce44SJohn Forte #define AT_LINK_DOWN 0x02 /* Link is down */ 2910fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2911*291a2b48SSukumar Swaminathan uint8_t granted_AL_PA; 2912*291a2b48SSukumar Swaminathan uint8_t lipAlPs; 2913*291a2b48SSukumar Swaminathan uint8_t lipType; 2914*291a2b48SSukumar Swaminathan uint8_t topology; 2915fcf3ce44SJohn Forte #endif 2916fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2917*291a2b48SSukumar Swaminathan uint8_t topology; 2918*291a2b48SSukumar Swaminathan uint8_t lipType; 2919*291a2b48SSukumar Swaminathan uint8_t lipAlPs; 2920*291a2b48SSukumar Swaminathan uint8_t granted_AL_PA; 2921fcf3ce44SJohn Forte #endif 2922fcf3ce44SJohn Forte 2923fcf3ce44SJohn Forte /* lipType */ 2924*291a2b48SSukumar Swaminathan #define LT_PORT_INIT 0x00 /* An L_PORT initing (F7, AL_PS) - lipType */ 2925*291a2b48SSukumar Swaminathan #define LT_PORT_ERR 0x01 /* Err @L_PORT rcv'er (F8, AL_PS) */ 2926*291a2b48SSukumar Swaminathan #define LT_RESET_APORT 0x02 /* Lip Reset of some other port */ 2927*291a2b48SSukumar Swaminathan #define LT_RESET_MYPORT 0x03 /* Lip Reset of my port */ 2928fcf3ce44SJohn Forte 2929fcf3ce44SJohn Forte /* topology */ 2930*291a2b48SSukumar Swaminathan #define TOPOLOGY_PT_PT 0x01 /* Topology is pt-pt / pt-fabric */ 2931*291a2b48SSukumar Swaminathan #define TOPOLOGY_LOOP 0x02 /* Topology is FC-AL (private) */ 2932*291a2b48SSukumar Swaminathan 2933*291a2b48SSukumar Swaminathan union 2934*291a2b48SSukumar Swaminathan { 2935*291a2b48SSukumar Swaminathan ULP_BDE lilpBde; /* This BDE points to a */ 2936*291a2b48SSukumar Swaminathan /* 128 byte buffer to store */ 2937*291a2b48SSukumar Swaminathan /* the LILP AL_PA position */ 2938*291a2b48SSukumar Swaminathan /* map into */ 2939*291a2b48SSukumar Swaminathan ULP_BDE64 lilpBde64; 2940fcf3ce44SJohn Forte } un; 2941fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2942*291a2b48SSukumar Swaminathan uint32_t Dlu:1; 2943*291a2b48SSukumar Swaminathan uint32_t Dtf:1; 2944*291a2b48SSukumar Swaminathan uint32_t Drsvd2:14; 2945*291a2b48SSukumar Swaminathan uint32_t DlnkSpeed:8; 2946*291a2b48SSukumar Swaminathan uint32_t DnlPort:4; 2947*291a2b48SSukumar Swaminathan uint32_t Dtx:2; 2948*291a2b48SSukumar Swaminathan uint32_t Drx:2; 2949fcf3ce44SJohn Forte #endif 2950fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2951*291a2b48SSukumar Swaminathan uint32_t Drx:2; 2952*291a2b48SSukumar Swaminathan uint32_t Dtx:2; 2953*291a2b48SSukumar Swaminathan uint32_t DnlPort:4; 2954*291a2b48SSukumar Swaminathan uint32_t DlnkSpeed:8; 2955*291a2b48SSukumar Swaminathan uint32_t Drsvd2:14; 2956*291a2b48SSukumar Swaminathan uint32_t Dtf:1; 2957*291a2b48SSukumar Swaminathan uint32_t Dlu:1; 2958fcf3ce44SJohn Forte #endif 2959fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2960*291a2b48SSukumar Swaminathan uint32_t Ulu:1; 2961*291a2b48SSukumar Swaminathan uint32_t Utf:1; 2962*291a2b48SSukumar Swaminathan uint32_t Ursvd2:14; 2963*291a2b48SSukumar Swaminathan uint32_t UlnkSpeed:8; 2964*291a2b48SSukumar Swaminathan uint32_t UnlPort:4; 2965*291a2b48SSukumar Swaminathan uint32_t Utx:2; 2966*291a2b48SSukumar Swaminathan uint32_t Urx:2; 2967fcf3ce44SJohn Forte #endif 2968fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 2969*291a2b48SSukumar Swaminathan uint32_t Urx:2; 2970*291a2b48SSukumar Swaminathan uint32_t Utx:2; 2971*291a2b48SSukumar Swaminathan uint32_t UnlPort:4; 2972*291a2b48SSukumar Swaminathan uint32_t UlnkSpeed:8; 2973*291a2b48SSukumar Swaminathan uint32_t Ursvd2:14; 2974*291a2b48SSukumar Swaminathan uint32_t Utf:1; 2975*291a2b48SSukumar Swaminathan uint32_t Ulu:1; 2976fcf3ce44SJohn Forte #endif 2977fcf3ce44SJohn Forte 2978fcf3ce44SJohn Forte #define LA_1GHZ_LINK 0x04 /* lnkSpeed */ 2979fcf3ce44SJohn Forte #define LA_2GHZ_LINK 0x08 /* lnkSpeed */ 2980fcf3ce44SJohn Forte #define LA_4GHZ_LINK 0x10 /* lnkSpeed */ 2981fcf3ce44SJohn Forte #define LA_8GHZ_LINK 0x20 /* lnkSpeed */ 2982fcf3ce44SJohn Forte #define LA_10GHZ_LINK 0x40 /* lnkSpeed */ 2983fcf3ce44SJohn Forte } READ_LA_VAR; 2984fcf3ce44SJohn Forte 2985fcf3ce44SJohn Forte 2986fcf3ce44SJohn Forte /* Structure for MB Command CLEAR_LA (22) */ 2987fcf3ce44SJohn Forte 2988*291a2b48SSukumar Swaminathan typedef struct 2989*291a2b48SSukumar Swaminathan { 2990*291a2b48SSukumar Swaminathan uint32_t eventTag; /* Event tag */ 2991*291a2b48SSukumar Swaminathan uint32_t rsvd1; 2992fcf3ce44SJohn Forte } CLEAR_LA_VAR; 2993fcf3ce44SJohn Forte 2994fcf3ce44SJohn Forte /* Structure for MB Command DUMP */ 2995fcf3ce44SJohn Forte 2996*291a2b48SSukumar Swaminathan typedef struct 2997*291a2b48SSukumar Swaminathan { 2998fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 2999*291a2b48SSukumar Swaminathan uint32_t rsvd:25; 3000*291a2b48SSukumar Swaminathan uint32_t ra:1; 3001*291a2b48SSukumar Swaminathan uint32_t co:1; 3002*291a2b48SSukumar Swaminathan uint32_t cv:1; 3003*291a2b48SSukumar Swaminathan uint32_t type:4; 3004fcf3ce44SJohn Forte 3005*291a2b48SSukumar Swaminathan uint32_t entry_index:16; 3006*291a2b48SSukumar Swaminathan uint32_t region_id:16; 3007fcf3ce44SJohn Forte #endif 3008fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 3009*291a2b48SSukumar Swaminathan uint32_t type:4; 3010*291a2b48SSukumar Swaminathan uint32_t cv:1; 3011*291a2b48SSukumar Swaminathan uint32_t co:1; 3012*291a2b48SSukumar Swaminathan uint32_t ra:1; 3013*291a2b48SSukumar Swaminathan uint32_t rsvd:25; 3014*291a2b48SSukumar Swaminathan 3015*291a2b48SSukumar Swaminathan uint32_t region_id:16; 3016*291a2b48SSukumar Swaminathan uint32_t entry_index:16; 3017*291a2b48SSukumar Swaminathan #endif 3018*291a2b48SSukumar Swaminathan uint32_t base_adr; 3019*291a2b48SSukumar Swaminathan uint32_t word_cnt; 3020*291a2b48SSukumar Swaminathan uint32_t resp_offset; 3021fcf3ce44SJohn Forte } DUMP_VAR; 3022fcf3ce44SJohn Forte 3023fcf3ce44SJohn Forte /* 3024fcf3ce44SJohn Forte * Dump type 3025fcf3ce44SJohn Forte */ 3026*291a2b48SSukumar Swaminathan #define DMP_MEM_REG 0x1 3027*291a2b48SSukumar Swaminathan #define DMP_NV_PARAMS 0x2 3028fcf3ce44SJohn Forte 3029fcf3ce44SJohn Forte /* 3030fcf3ce44SJohn Forte * Dump region ID 3031fcf3ce44SJohn Forte */ 3032*291a2b48SSukumar Swaminathan #define NODE_CFG_A_REGION_ID 0 3033*291a2b48SSukumar Swaminathan #define NODE_CFG_B_REGION_ID 1 3034*291a2b48SSukumar Swaminathan #define NODE_CFG_C_REGION_ID 2 3035*291a2b48SSukumar Swaminathan #define NODE_CFG_D_REGION_ID 3 3036*291a2b48SSukumar Swaminathan #define WAKE_UP_PARMS_REGION_ID 4 3037*291a2b48SSukumar Swaminathan #define DEF_PCI_CFG_REGION_ID 5 3038*291a2b48SSukumar Swaminathan #define PCI_CFG_1_REGION_ID 6 3039*291a2b48SSukumar Swaminathan #define PCI_CFG_2_REGION_ID 7 3040*291a2b48SSukumar Swaminathan #define RSVD1_REGION_ID 8 3041*291a2b48SSukumar Swaminathan #define RSVD2_REGION_ID 9 3042*291a2b48SSukumar Swaminathan #define RSVD3_REGION_ID 10 3043*291a2b48SSukumar Swaminathan #define RSVD4_REGION_ID 11 3044*291a2b48SSukumar Swaminathan #define RSVD5_REGION_ID 12 3045*291a2b48SSukumar Swaminathan #define RSVD6_REGION_ID 13 3046*291a2b48SSukumar Swaminathan #define RSVD7_REGION_ID 14 3047*291a2b48SSukumar Swaminathan #define DIAG_TRACE_REGION_ID 15 3048*291a2b48SSukumar Swaminathan #define WWN_REGION_ID 16 3049*291a2b48SSukumar Swaminathan 3050*291a2b48SSukumar Swaminathan #define DMP_VPD_REGION 14 3051*291a2b48SSukumar Swaminathan #define DMP_VPD_SIZE 1024 3052*291a2b48SSukumar Swaminathan #define DMP_VPD_DUMP_WCOUNT 24 3053fcf3ce44SJohn Forte 3054fcf3ce44SJohn Forte 3055fcf3ce44SJohn Forte 3056fcf3ce44SJohn Forte /* Structure for MB Command UPDATE_CFG */ 3057fcf3ce44SJohn Forte 3058*291a2b48SSukumar Swaminathan typedef struct 3059*291a2b48SSukumar Swaminathan { 3060fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 3061*291a2b48SSukumar Swaminathan uint32_t rsvd2:16; 3062*291a2b48SSukumar Swaminathan uint32_t proc_type:8; 3063*291a2b48SSukumar Swaminathan uint32_t rsvd1:1; 3064*291a2b48SSukumar Swaminathan uint32_t Abit:1; 3065*291a2b48SSukumar Swaminathan uint32_t Obit:1; 3066*291a2b48SSukumar Swaminathan uint32_t Vbit:1; 3067*291a2b48SSukumar Swaminathan uint32_t req_type:4; 3068*291a2b48SSukumar Swaminathan #define INIT_REGION 1 3069*291a2b48SSukumar Swaminathan #define UPDATE_DATA 2 3070*291a2b48SSukumar Swaminathan #define CLEAN_UP_CFG 3 3071*291a2b48SSukumar Swaminathan uint32_t entry_len:16; 3072*291a2b48SSukumar Swaminathan uint32_t region_id:16; 3073fcf3ce44SJohn Forte #endif 3074fcf3ce44SJohn Forte 3075fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 3076*291a2b48SSukumar Swaminathan uint32_t req_type:4; 3077*291a2b48SSukumar Swaminathan #define INIT_REGION 1 3078*291a2b48SSukumar Swaminathan #define UPDATE_DATA 2 3079*291a2b48SSukumar Swaminathan #define CLEAN_UP_CFG 3 3080*291a2b48SSukumar Swaminathan uint32_t Vbit:1; 3081*291a2b48SSukumar Swaminathan uint32_t Obit:1; 3082*291a2b48SSukumar Swaminathan uint32_t Abit:1; 3083*291a2b48SSukumar Swaminathan uint32_t rsvd1:1; 3084*291a2b48SSukumar Swaminathan uint32_t proc_type:8; 3085*291a2b48SSukumar Swaminathan uint32_t rsvd2:16; 3086*291a2b48SSukumar Swaminathan 3087*291a2b48SSukumar Swaminathan uint32_t region_id:16; 3088*291a2b48SSukumar Swaminathan uint32_t entry_len:16; 3089*291a2b48SSukumar Swaminathan #endif 3090*291a2b48SSukumar Swaminathan 3091*291a2b48SSukumar Swaminathan uint32_t rsp_info; 3092*291a2b48SSukumar Swaminathan uint32_t byte_len; 3093*291a2b48SSukumar Swaminathan uint32_t cfg_data; 3094fcf3ce44SJohn Forte } UPDATE_CFG_VAR; 3095fcf3ce44SJohn Forte 3096fcf3ce44SJohn Forte /* Structure for MB Command DEL_LD_ENTRY (29) */ 3097fcf3ce44SJohn Forte 3098*291a2b48SSukumar Swaminathan typedef struct 3099*291a2b48SSukumar Swaminathan { 3100fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 3101*291a2b48SSukumar Swaminathan uint32_t list_req:2; 3102*291a2b48SSukumar Swaminathan uint32_t list_rsp:2; 3103*291a2b48SSukumar Swaminathan uint32_t rsvd:28; 3104fcf3ce44SJohn Forte #else 3105*291a2b48SSukumar Swaminathan uint32_t rsvd:28; 3106*291a2b48SSukumar Swaminathan uint32_t list_rsp:2; 3107*291a2b48SSukumar Swaminathan uint32_t list_req:2; 3108fcf3ce44SJohn Forte #endif 3109fcf3ce44SJohn Forte 3110*291a2b48SSukumar Swaminathan #define FLASH_LOAD_LIST 1 3111*291a2b48SSukumar Swaminathan #define RAM_LOAD_LIST 2 3112*291a2b48SSukumar Swaminathan #define BOTH_LISTS 3 3113fcf3ce44SJohn Forte 3114*291a2b48SSukumar Swaminathan PROG_ID prog_id; 3115fcf3ce44SJohn Forte } DEL_LD_ENTRY_VAR; 3116fcf3ce44SJohn Forte 3117fcf3ce44SJohn Forte /* Structure for MB Command LOAD_AREA (81) */ 3118*291a2b48SSukumar Swaminathan typedef struct 3119*291a2b48SSukumar Swaminathan { 3120fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 3121*291a2b48SSukumar Swaminathan uint32_t load_cmplt:1; 3122*291a2b48SSukumar Swaminathan uint32_t method:1; 3123*291a2b48SSukumar Swaminathan uint32_t rsvd1:1; 3124*291a2b48SSukumar Swaminathan uint32_t update_flash:1; 3125*291a2b48SSukumar Swaminathan uint32_t erase_or_prog:1; 3126*291a2b48SSukumar Swaminathan uint32_t version:1; 3127*291a2b48SSukumar Swaminathan uint32_t rsvd2:2; 3128*291a2b48SSukumar Swaminathan uint32_t progress:8; 3129*291a2b48SSukumar Swaminathan uint32_t step:8; 3130*291a2b48SSukumar Swaminathan uint32_t area_id:8; 3131fcf3ce44SJohn Forte #else 3132*291a2b48SSukumar Swaminathan uint32_t area_id:8; 3133*291a2b48SSukumar Swaminathan uint32_t step:8; 3134*291a2b48SSukumar Swaminathan uint32_t progress:8; 3135*291a2b48SSukumar Swaminathan uint32_t rsvd2:2; 3136*291a2b48SSukumar Swaminathan uint32_t version:1; 3137*291a2b48SSukumar Swaminathan uint32_t erase_or_prog:1; 3138*291a2b48SSukumar Swaminathan uint32_t update_flash:1; 3139*291a2b48SSukumar Swaminathan uint32_t rsvd1:1; 3140*291a2b48SSukumar Swaminathan uint32_t method:1; 3141*291a2b48SSukumar Swaminathan uint32_t load_cmplt:1; 3142*291a2b48SSukumar Swaminathan #endif 3143*291a2b48SSukumar Swaminathan uint32_t dl_to_adr; 3144*291a2b48SSukumar Swaminathan uint32_t dl_len; 3145*291a2b48SSukumar Swaminathan union 3146*291a2b48SSukumar Swaminathan { 3147*291a2b48SSukumar Swaminathan uint32_t dl_from_slim_offset; 3148*291a2b48SSukumar Swaminathan ULP_BDE dl_from_bde; 3149*291a2b48SSukumar Swaminathan ULP_BDE64 dl_from_bde64; 3150*291a2b48SSukumar Swaminathan PROG_ID prog_id; 3151fcf3ce44SJohn Forte } un; 3152fcf3ce44SJohn Forte } LOAD_AREA_VAR; 3153fcf3ce44SJohn Forte 3154fcf3ce44SJohn Forte /* Structure for MB Command LOAD_EXP_ROM (9C) */ 3155*291a2b48SSukumar Swaminathan typedef struct 3156*291a2b48SSukumar Swaminathan { 3157fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 3158*291a2b48SSukumar Swaminathan uint32_t rsvd1:8; 3159*291a2b48SSukumar Swaminathan uint32_t progress:8; 3160*291a2b48SSukumar Swaminathan uint32_t step:8; 3161*291a2b48SSukumar Swaminathan uint32_t rsvd2:8; 3162fcf3ce44SJohn Forte #else 3163*291a2b48SSukumar Swaminathan uint32_t rsvd2:8; 3164*291a2b48SSukumar Swaminathan uint32_t step:8; 3165*291a2b48SSukumar Swaminathan uint32_t progress:8; 3166*291a2b48SSukumar Swaminathan uint32_t rsvd1:8; 3167*291a2b48SSukumar Swaminathan #endif 3168*291a2b48SSukumar Swaminathan uint32_t dl_to_adr; 3169*291a2b48SSukumar Swaminathan uint32_t rsvd3; 3170*291a2b48SSukumar Swaminathan union 3171*291a2b48SSukumar Swaminathan { 3172*291a2b48SSukumar Swaminathan uint32_t word[2]; 3173*291a2b48SSukumar Swaminathan PROG_ID prog_id; 3174fcf3ce44SJohn Forte } un; 3175fcf3ce44SJohn Forte } LOAD_EXP_ROM_VAR; 3176fcf3ce44SJohn Forte 3177fcf3ce44SJohn Forte 3178fcf3ce44SJohn Forte /* Structure for MB Command CONFIG_HBQ (7C) */ 3179fcf3ce44SJohn Forte 3180*291a2b48SSukumar Swaminathan typedef struct 3181*291a2b48SSukumar Swaminathan { 3182fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 3183*291a2b48SSukumar Swaminathan uint32_t rsvd1:7; 3184*291a2b48SSukumar Swaminathan uint32_t recvNotify:1; /* Receive Notification */ 3185*291a2b48SSukumar Swaminathan uint32_t numMask:8; /* # Mask Entries */ 3186*291a2b48SSukumar Swaminathan uint32_t profile:8; /* Selection Profile */ 3187*291a2b48SSukumar Swaminathan uint32_t rsvd2:8; 3188fcf3ce44SJohn Forte #endif 3189fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 3190*291a2b48SSukumar Swaminathan uint32_t rsvd2:8; 3191*291a2b48SSukumar Swaminathan uint32_t profile:8; /* Selection Profile */ 3192*291a2b48SSukumar Swaminathan uint32_t numMask:8; /* # Mask Entries */ 3193*291a2b48SSukumar Swaminathan uint32_t recvNotify:1; /* Receive Notification */ 3194*291a2b48SSukumar Swaminathan uint32_t rsvd1:7; 3195fcf3ce44SJohn Forte #endif 3196fcf3ce44SJohn Forte 3197fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 3198*291a2b48SSukumar Swaminathan uint32_t hbqId:16; 3199*291a2b48SSukumar Swaminathan uint32_t rsvd3:12; 3200*291a2b48SSukumar Swaminathan uint32_t ringMask:4; 3201fcf3ce44SJohn Forte #endif 3202fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 3203*291a2b48SSukumar Swaminathan uint32_t ringMask:4; 3204*291a2b48SSukumar Swaminathan uint32_t rsvd3:12; 3205*291a2b48SSukumar Swaminathan uint32_t hbqId:16; 3206fcf3ce44SJohn Forte #endif 3207fcf3ce44SJohn Forte 3208fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 3209*291a2b48SSukumar Swaminathan uint32_t numEntries:16; 3210*291a2b48SSukumar Swaminathan uint32_t rsvd4:8; 3211*291a2b48SSukumar Swaminathan uint32_t headerLen:8; 3212fcf3ce44SJohn Forte #endif 3213fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 3214*291a2b48SSukumar Swaminathan uint32_t headerLen:8; 3215*291a2b48SSukumar Swaminathan uint32_t rsvd4:8; 3216*291a2b48SSukumar Swaminathan uint32_t numEntries:16; 3217fcf3ce44SJohn Forte #endif 3218fcf3ce44SJohn Forte 3219*291a2b48SSukumar Swaminathan uint32_t hbqaddrLow; 3220*291a2b48SSukumar Swaminathan uint32_t hbqaddrHigh; 3221fcf3ce44SJohn Forte 3222fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 3223*291a2b48SSukumar Swaminathan uint32_t rsvd5:31; 3224*291a2b48SSukumar Swaminathan uint32_t logEntry:1; 3225fcf3ce44SJohn Forte #endif 3226fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 3227*291a2b48SSukumar Swaminathan uint32_t logEntry:1; 3228*291a2b48SSukumar Swaminathan uint32_t rsvd5:31; 3229fcf3ce44SJohn Forte #endif 3230fcf3ce44SJohn Forte 3231*291a2b48SSukumar Swaminathan uint32_t rsvd6; /* w7 */ 3232*291a2b48SSukumar Swaminathan uint32_t rsvd7; /* w8 */ 3233*291a2b48SSukumar Swaminathan uint32_t rsvd8; /* w9 */ 3234fcf3ce44SJohn Forte 3235*291a2b48SSukumar Swaminathan HBQ_MASK hbqMasks[6]; 3236fcf3ce44SJohn Forte 3237*291a2b48SSukumar Swaminathan union 3238*291a2b48SSukumar Swaminathan { 3239*291a2b48SSukumar Swaminathan uint32_t allprofiles[12]; 3240fcf3ce44SJohn Forte 3241*291a2b48SSukumar Swaminathan struct 3242*291a2b48SSukumar Swaminathan { 3243fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 3244*291a2b48SSukumar Swaminathan uint32_t seqlenoff:16; 3245*291a2b48SSukumar Swaminathan uint32_t maxlen:16; 3246fcf3ce44SJohn Forte #endif 3247fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 3248*291a2b48SSukumar Swaminathan uint32_t maxlen:16; 3249*291a2b48SSukumar Swaminathan uint32_t seqlenoff:16; 3250fcf3ce44SJohn Forte #endif 3251fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 3252*291a2b48SSukumar Swaminathan uint32_t rsvd1:28; 3253*291a2b48SSukumar Swaminathan uint32_t seqlenbcnt:4; 3254fcf3ce44SJohn Forte #endif 3255fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 3256*291a2b48SSukumar Swaminathan uint32_t seqlenbcnt:4; 3257*291a2b48SSukumar Swaminathan uint32_t rsvd1:28; 3258fcf3ce44SJohn Forte #endif 3259*291a2b48SSukumar Swaminathan uint32_t rsvd[10]; 3260fcf3ce44SJohn Forte } profile2; 3261fcf3ce44SJohn Forte 3262*291a2b48SSukumar Swaminathan struct 3263*291a2b48SSukumar Swaminathan { 3264fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 3265*291a2b48SSukumar Swaminathan uint32_t seqlenoff:16; 3266*291a2b48SSukumar Swaminathan uint32_t maxlen:16; 3267fcf3ce44SJohn Forte #endif 3268fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 3269*291a2b48SSukumar Swaminathan uint32_t maxlen:16; 3270*291a2b48SSukumar Swaminathan uint32_t seqlenoff:16; 3271fcf3ce44SJohn Forte #endif 3272fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 3273*291a2b48SSukumar Swaminathan uint32_t cmdcodeoff:28; 3274*291a2b48SSukumar Swaminathan uint32_t rsvd1:12; 3275*291a2b48SSukumar Swaminathan uint32_t seqlenbcnt:4; 3276fcf3ce44SJohn Forte #endif 3277fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 3278*291a2b48SSukumar Swaminathan uint32_t seqlenbcnt:4; 3279*291a2b48SSukumar Swaminathan uint32_t rsvd1:12; 3280*291a2b48SSukumar Swaminathan uint32_t cmdcodeoff:28; 3281fcf3ce44SJohn Forte #endif 3282*291a2b48SSukumar Swaminathan uint32_t cmdmatch[8]; 3283fcf3ce44SJohn Forte 3284*291a2b48SSukumar Swaminathan uint32_t rsvd[2]; 3285fcf3ce44SJohn Forte } profile3; 3286fcf3ce44SJohn Forte 3287*291a2b48SSukumar Swaminathan struct 3288*291a2b48SSukumar Swaminathan { 3289fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 3290*291a2b48SSukumar Swaminathan uint32_t seqlenoff:16; 3291*291a2b48SSukumar Swaminathan uint32_t maxlen:16; 3292fcf3ce44SJohn Forte #endif 3293fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 3294*291a2b48SSukumar Swaminathan uint32_t maxlen:16; 3295*291a2b48SSukumar Swaminathan uint32_t seqlenoff:16; 3296fcf3ce44SJohn Forte #endif 3297fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 3298*291a2b48SSukumar Swaminathan uint32_t cmdcodeoff:28; 3299*291a2b48SSukumar Swaminathan uint32_t rsvd1:12; 3300*291a2b48SSukumar Swaminathan uint32_t seqlenbcnt:4; 3301fcf3ce44SJohn Forte #endif 3302fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 3303*291a2b48SSukumar Swaminathan uint32_t seqlenbcnt:4; 3304*291a2b48SSukumar Swaminathan uint32_t rsvd1:12; 3305*291a2b48SSukumar Swaminathan uint32_t cmdcodeoff:28; 3306fcf3ce44SJohn Forte #endif 3307*291a2b48SSukumar Swaminathan uint32_t cmdmatch[8]; 3308fcf3ce44SJohn Forte 3309*291a2b48SSukumar Swaminathan uint32_t rsvd[2]; 3310fcf3ce44SJohn Forte } profile5; 3311fcf3ce44SJohn Forte } profiles; 3312fcf3ce44SJohn Forte } CONFIG_HBQ_VAR; 3313fcf3ce44SJohn Forte 3314fcf3ce44SJohn Forte 3315fcf3ce44SJohn Forte /* Structure for MB Command REG_VPI(0x96) */ 3316*291a2b48SSukumar Swaminathan typedef struct 3317*291a2b48SSukumar Swaminathan { 3318fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 3319*291a2b48SSukumar Swaminathan uint32_t rsvd1; 3320*291a2b48SSukumar Swaminathan uint32_t rsvd2:8; 3321*291a2b48SSukumar Swaminathan uint32_t sid:24; 3322*291a2b48SSukumar Swaminathan uint32_t rsvd3; 3323*291a2b48SSukumar Swaminathan uint32_t rsvd4; 3324*291a2b48SSukumar Swaminathan uint32_t rsvd5; 3325*291a2b48SSukumar Swaminathan uint16_t rsvd6; 3326*291a2b48SSukumar Swaminathan uint16_t vpi; 3327fcf3ce44SJohn Forte #endif 3328fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 3329*291a2b48SSukumar Swaminathan uint32_t rsvd1; 3330*291a2b48SSukumar Swaminathan uint32_t sid:24; 3331*291a2b48SSukumar Swaminathan uint32_t rsvd2:8; 3332*291a2b48SSukumar Swaminathan uint32_t rsvd3; 3333*291a2b48SSukumar Swaminathan uint32_t rsvd4; 3334*291a2b48SSukumar Swaminathan uint32_t rsvd5; 3335*291a2b48SSukumar Swaminathan uint16_t vpi; 3336*291a2b48SSukumar Swaminathan uint16_t rsvd6; 3337fcf3ce44SJohn Forte #endif 3338fcf3ce44SJohn Forte } REG_VPI_VAR; 3339fcf3ce44SJohn Forte 3340fcf3ce44SJohn Forte /* Structure for MB Command UNREG_VPI (0x97) */ 3341*291a2b48SSukumar Swaminathan typedef struct 3342*291a2b48SSukumar Swaminathan { 3343*291a2b48SSukumar Swaminathan uint32_t rsvd1; 3344*291a2b48SSukumar Swaminathan uint32_t rsvd2; 3345*291a2b48SSukumar Swaminathan uint32_t rsvd3; 3346*291a2b48SSukumar Swaminathan uint32_t rsvd4; 3347*291a2b48SSukumar Swaminathan uint32_t rsvd5; 3348fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 3349*291a2b48SSukumar Swaminathan uint16_t rsvd6; 3350*291a2b48SSukumar Swaminathan uint16_t vpi; 3351fcf3ce44SJohn Forte #endif 3352fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 3353*291a2b48SSukumar Swaminathan uint16_t vpi; 3354*291a2b48SSukumar Swaminathan uint16_t rsvd6; 3355fcf3ce44SJohn Forte #endif 3356fcf3ce44SJohn Forte } UNREG_VPI_VAR; 3357fcf3ce44SJohn Forte 3358fcf3ce44SJohn Forte 3359*291a2b48SSukumar Swaminathan typedef struct 3360*291a2b48SSukumar Swaminathan { 3361fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 3362*291a2b48SSukumar Swaminathan uint32_t read_log:1; 3363*291a2b48SSukumar Swaminathan uint32_t clear_log:1; 3364*291a2b48SSukumar Swaminathan uint32_t mbox_rsp:1; 3365*291a2b48SSukumar Swaminathan uint32_t resv:28; 3366fcf3ce44SJohn Forte #endif 3367fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 3368*291a2b48SSukumar Swaminathan uint32_t resv:28; 3369*291a2b48SSukumar Swaminathan uint32_t mbox_rsp:1; 3370*291a2b48SSukumar Swaminathan uint32_t clear_log:1; 3371*291a2b48SSukumar Swaminathan uint32_t read_log:1; 3372fcf3ce44SJohn Forte #endif 3373fcf3ce44SJohn Forte 3374*291a2b48SSukumar Swaminathan uint32_t offset; 3375fcf3ce44SJohn Forte 3376*291a2b48SSukumar Swaminathan union 3377*291a2b48SSukumar Swaminathan { 3378*291a2b48SSukumar Swaminathan ULP_BDE sp; 3379*291a2b48SSukumar Swaminathan ULP_BDE64 sp64; 3380fcf3ce44SJohn Forte } un; 3381fcf3ce44SJohn Forte } READ_EVT_LOG_VAR; 3382fcf3ce44SJohn Forte 3383*291a2b48SSukumar Swaminathan typedef struct 3384*291a2b48SSukumar Swaminathan { 3385*291a2b48SSukumar Swaminathan 3386*291a2b48SSukumar Swaminathan #ifdef EMLXS_BIG_ENDIAN 3387*291a2b48SSukumar Swaminathan uint16_t split_log_next; 3388*291a2b48SSukumar Swaminathan uint16_t log_next; 3389*291a2b48SSukumar Swaminathan 3390*291a2b48SSukumar Swaminathan uint32_t size; 3391*291a2b48SSukumar Swaminathan 3392*291a2b48SSukumar Swaminathan uint32_t format:8; 3393*291a2b48SSukumar Swaminathan uint32_t resv2:22; 3394*291a2b48SSukumar Swaminathan uint32_t log_level:1; 3395*291a2b48SSukumar Swaminathan uint32_t split_log:1; 3396*291a2b48SSukumar Swaminathan #endif 3397*291a2b48SSukumar Swaminathan #ifdef EMLXS_LITTLE_ENDIAN 3398*291a2b48SSukumar Swaminathan uint16_t log_next; 3399*291a2b48SSukumar Swaminathan uint16_t split_log_next; 3400*291a2b48SSukumar Swaminathan 3401*291a2b48SSukumar Swaminathan uint32_t size; 3402*291a2b48SSukumar Swaminathan 3403*291a2b48SSukumar Swaminathan uint32_t split_log:1; 3404*291a2b48SSukumar Swaminathan uint32_t log_level:1; 3405*291a2b48SSukumar Swaminathan uint32_t resv2:22; 3406*291a2b48SSukumar Swaminathan uint32_t format:8; 3407*291a2b48SSukumar Swaminathan #endif 3408*291a2b48SSukumar Swaminathan 3409*291a2b48SSukumar Swaminathan uint32_t offset; 3410*291a2b48SSukumar Swaminathan } LOG_STATUS_VAR; 3411fcf3ce44SJohn Forte 3412fcf3ce44SJohn Forte /* Structure for MB Command CONFIG_PORT (0x88) */ 3413fcf3ce44SJohn Forte 3414fcf3ce44SJohn Forte 3415fcf3ce44SJohn Forte #ifdef SLI3_SUPPORT 3416fcf3ce44SJohn Forte 3417*291a2b48SSukumar Swaminathan typedef struct 3418*291a2b48SSukumar Swaminathan { 3419fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 3420*291a2b48SSukumar Swaminathan uint32_t cBE:1; 3421*291a2b48SSukumar Swaminathan uint32_t cET:1; 3422*291a2b48SSukumar Swaminathan uint32_t cHpcb:1; 3423*291a2b48SSukumar Swaminathan uint32_t rMA:1; 3424*291a2b48SSukumar Swaminathan uint32_t sli_mode:4; 3425*291a2b48SSukumar Swaminathan uint32_t pcbLen:24; /* bit 23:0 of memory based port */ 3426*291a2b48SSukumar Swaminathan /* config block */ 3427fcf3ce44SJohn Forte #endif 3428fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 3429*291a2b48SSukumar Swaminathan uint32_t pcbLen:24; /* bit 23:0 of memory based port */ 3430*291a2b48SSukumar Swaminathan /* config block */ 3431*291a2b48SSukumar Swaminathan uint32_t sli_mode:4; 3432*291a2b48SSukumar Swaminathan uint32_t rMA:1; 3433*291a2b48SSukumar Swaminathan uint32_t cHpcb:1; 3434*291a2b48SSukumar Swaminathan uint32_t cET:1; 3435*291a2b48SSukumar Swaminathan uint32_t cBE:1; 3436fcf3ce44SJohn Forte #endif 3437fcf3ce44SJohn Forte 3438*291a2b48SSukumar Swaminathan uint32_t pcbLow; /* bit 31:0 of memory based port */ 3439*291a2b48SSukumar Swaminathan /* config block */ 3440*291a2b48SSukumar Swaminathan uint32_t pcbHigh; /* bit 63:32 of memory based port */ 3441*291a2b48SSukumar Swaminathan /* config block */ 3442*291a2b48SSukumar Swaminathan uint32_t hbainit[5]; 3443fcf3ce44SJohn Forte 3444fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 3445*291a2b48SSukumar Swaminathan uint32_t hps:1; /* Host pointers in SLIM */ 3446*291a2b48SSukumar Swaminathan uint32_t rsvd:31; 3447fcf3ce44SJohn Forte #endif 3448fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 3449*291a2b48SSukumar Swaminathan uint32_t rsvd:31; 3450*291a2b48SSukumar Swaminathan uint32_t hps:1; /* Host pointers in SLIM */ 3451fcf3ce44SJohn Forte #endif 3452fcf3ce44SJohn Forte 3453fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 3454*291a2b48SSukumar Swaminathan uint32_t rsvd1:24; 3455*291a2b48SSukumar Swaminathan uint32_t cmv:1; /* Configure Max VPIs */ 3456*291a2b48SSukumar Swaminathan uint32_t ccrp:1; /* Config Command Ring Polling */ 3457*291a2b48SSukumar Swaminathan uint32_t csah:1; /* Configure Synchronous Abort */ 3458*291a2b48SSukumar Swaminathan /* Handling */ 3459*291a2b48SSukumar Swaminathan uint32_t chbs:1; /* Cofigure Host Backing store */ 3460*291a2b48SSukumar Swaminathan uint32_t cinb:1; /* Enable Interrupt Notification */ 3461*291a2b48SSukumar Swaminathan /* Block */ 3462*291a2b48SSukumar Swaminathan uint32_t cerbm:1; /* Configure Enhanced Receive */ 3463*291a2b48SSukumar Swaminathan /* Buffer Management */ 3464*291a2b48SSukumar Swaminathan uint32_t cmx:1; /* Configure Max XRIs */ 3465*291a2b48SSukumar Swaminathan uint32_t cmr:1; /* Configure Max RPIs */ 3466fcf3ce44SJohn Forte #endif 3467fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 3468*291a2b48SSukumar Swaminathan uint32_t cmr:1; /* Configure Max RPIs */ 3469*291a2b48SSukumar Swaminathan uint32_t cmx:1; /* Configure Max XRIs */ 3470*291a2b48SSukumar Swaminathan uint32_t cerbm:1; /* Configure Enhanced Receive */ 3471*291a2b48SSukumar Swaminathan /* Buffer Management */ 3472*291a2b48SSukumar Swaminathan uint32_t cinb:1; /* Enable Interrupt Notification */ 3473*291a2b48SSukumar Swaminathan /* Block */ 3474*291a2b48SSukumar Swaminathan uint32_t chbs:1; /* Cofigure Host Backing store */ 3475*291a2b48SSukumar Swaminathan uint32_t csah:1; /* Configure Synchronous Abort */ 3476*291a2b48SSukumar Swaminathan /* Handling */ 3477*291a2b48SSukumar Swaminathan uint32_t ccrp:1; /* Config Command Ring Polling */ 3478*291a2b48SSukumar Swaminathan uint32_t cmv:1; /* Configure Max VPIs */ 3479*291a2b48SSukumar Swaminathan uint32_t rsvd1:24; 3480fcf3ce44SJohn Forte #endif 3481fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 3482*291a2b48SSukumar Swaminathan uint32_t rsvd2:24; 3483*291a2b48SSukumar Swaminathan uint32_t gmv:1; /* Grant Max VPIs */ 3484*291a2b48SSukumar Swaminathan uint32_t gcrp:1; /* Grant Command Ring Polling */ 3485*291a2b48SSukumar Swaminathan uint32_t gsah:1; /* Grant Synchronous Abort Handling */ 3486*291a2b48SSukumar Swaminathan uint32_t ghbs:1; /* Grant Host Backing Store */ 3487*291a2b48SSukumar Swaminathan uint32_t ginb:1; /* Grant Interrupt Notification Block */ 3488*291a2b48SSukumar Swaminathan uint32_t gerbm:1; /* Grant ERBM Request */ 3489*291a2b48SSukumar Swaminathan uint32_t gmx:1; /* Grant Max XRIs */ 3490*291a2b48SSukumar Swaminathan uint32_t gmr:1; /* Grant Max RPIs */ 3491fcf3ce44SJohn Forte #endif 3492fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 3493*291a2b48SSukumar Swaminathan uint32_t gmr:1; /* Grant Max RPIs */ 3494*291a2b48SSukumar Swaminathan uint32_t gmx:1; /* Grant Max XRIs */ 3495*291a2b48SSukumar Swaminathan uint32_t gerbm:1; /* Grant ERBM Request */ 3496*291a2b48SSukumar Swaminathan uint32_t ginb:1; /* Grant Interrupt Notification Block */ 3497*291a2b48SSukumar Swaminathan uint32_t ghbs:1; /* Grant Host Backing Store */ 3498*291a2b48SSukumar Swaminathan uint32_t gsah:1; /* Grant Synchronous Abort Handling */ 3499*291a2b48SSukumar Swaminathan uint32_t gcrp:1; /* Grant Command Ring Polling */ 3500*291a2b48SSukumar Swaminathan uint32_t gmv:1; /* Grant Max VPIs */ 3501*291a2b48SSukumar Swaminathan uint32_t rsvd2:24; 3502fcf3ce44SJohn Forte #endif 3503fcf3ce44SJohn Forte 3504fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 3505*291a2b48SSukumar Swaminathan uint32_t max_rpi:16; /* Max RPIs Port should configure */ 3506*291a2b48SSukumar Swaminathan uint32_t max_xri:16; /* Max XRIs Port should configure */ 3507fcf3ce44SJohn Forte #endif 3508fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 3509*291a2b48SSukumar Swaminathan uint32_t max_xri:16; /* Max XRIs Port should configure */ 3510*291a2b48SSukumar Swaminathan uint32_t max_rpi:16; /* Max RPIs Port should configure */ 3511fcf3ce44SJohn Forte #endif 3512fcf3ce44SJohn Forte 3513fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 3514*291a2b48SSukumar Swaminathan uint32_t max_hbq:16; /* Max HBQs Host expect to configure */ 3515*291a2b48SSukumar Swaminathan uint32_t rsvd3:16; /* Max HBQs Host expect to configure */ 3516fcf3ce44SJohn Forte #endif 3517fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 3518*291a2b48SSukumar Swaminathan uint32_t rsvd3:16; /* Max HBQs Host expect to configure */ 3519*291a2b48SSukumar Swaminathan uint32_t max_hbq:16; /* Max HBQs Host expect to configure */ 3520fcf3ce44SJohn Forte #endif 3521fcf3ce44SJohn Forte 3522*291a2b48SSukumar Swaminathan uint32_t rsvd4; /* Reserved */ 3523fcf3ce44SJohn Forte 3524fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 3525*291a2b48SSukumar Swaminathan uint32_t rsvd5:16; /* Reserved */ 3526*291a2b48SSukumar Swaminathan uint32_t vpi_max:16; /* Max number of virt N-Ports */ 3527fcf3ce44SJohn Forte #endif 3528fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 3529*291a2b48SSukumar Swaminathan uint32_t vpi_max:16; /* Max number of virt N-Ports */ 3530*291a2b48SSukumar Swaminathan uint32_t rsvd5:16; /* Reserved */ 3531fcf3ce44SJohn Forte #endif 3532fcf3ce44SJohn Forte } CONFIG_PORT_VAR; 3533fcf3ce44SJohn Forte 3534fcf3ce44SJohn Forte #else /* !SLI3_SUPPORT */ 3535fcf3ce44SJohn Forte 3536*291a2b48SSukumar Swaminathan typedef struct 3537*291a2b48SSukumar Swaminathan { 3538*291a2b48SSukumar Swaminathan uint32_t pcbLen; 3539*291a2b48SSukumar Swaminathan uint32_t pcbLow; /* bit 31:0 of memory based port */ 3540*291a2b48SSukumar Swaminathan /* config block */ 3541*291a2b48SSukumar Swaminathan uint32_t pcbHigh; /* bit 63:32 of memory based port */ 3542*291a2b48SSukumar Swaminathan /* config block */ 3543*291a2b48SSukumar Swaminathan uint32_t hbainit; 3544fcf3ce44SJohn Forte } CONFIG_PORT_VAR; 3545fcf3ce44SJohn Forte 3546fcf3ce44SJohn Forte #endif /* SLI3_SUPPORT */ 3547fcf3ce44SJohn Forte 3548fcf3ce44SJohn Forte 3549fcf3ce44SJohn Forte 3550fcf3ce44SJohn Forte /* SLI-2 Port Control Block */ 3551fcf3ce44SJohn Forte 3552fcf3ce44SJohn Forte /* SLIM POINTER */ 3553fcf3ce44SJohn Forte #define SLIMOFF 0x30 /* WORD */ 3554fcf3ce44SJohn Forte 3555*291a2b48SSukumar Swaminathan typedef struct _SLI2_RDSC 3556*291a2b48SSukumar Swaminathan { 3557*291a2b48SSukumar Swaminathan uint32_t cmdEntries; 3558*291a2b48SSukumar Swaminathan uint32_t cmdAddrLow; 3559*291a2b48SSukumar Swaminathan uint32_t cmdAddrHigh; 3560fcf3ce44SJohn Forte 3561*291a2b48SSukumar Swaminathan uint32_t rspEntries; 3562*291a2b48SSukumar Swaminathan uint32_t rspAddrLow; 3563*291a2b48SSukumar Swaminathan uint32_t rspAddrHigh; 3564fcf3ce44SJohn Forte } SLI2_RDSC; 3565fcf3ce44SJohn Forte 3566*291a2b48SSukumar Swaminathan typedef struct _PCB 3567*291a2b48SSukumar Swaminathan { 3568fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 3569*291a2b48SSukumar Swaminathan uint32_t type:8; 3570fcf3ce44SJohn Forte #define TYPE_NATIVE_SLI2 0x01; 3571*291a2b48SSukumar Swaminathan uint32_t feature:8; 3572fcf3ce44SJohn Forte #define FEATURE_INITIAL_SLI2 0x01; 3573*291a2b48SSukumar Swaminathan uint32_t rsvd:12; 3574*291a2b48SSukumar Swaminathan uint32_t maxRing:4; 3575fcf3ce44SJohn Forte #endif 3576fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 3577*291a2b48SSukumar Swaminathan uint32_t maxRing:4; 3578*291a2b48SSukumar Swaminathan uint32_t rsvd:12; 3579*291a2b48SSukumar Swaminathan uint32_t feature:8; 3580fcf3ce44SJohn Forte #define FEATURE_INITIAL_SLI2 0x01; 3581*291a2b48SSukumar Swaminathan uint32_t type:8; 3582fcf3ce44SJohn Forte #define TYPE_NATIVE_SLI2 0x01; 3583fcf3ce44SJohn Forte #endif 3584fcf3ce44SJohn Forte 3585*291a2b48SSukumar Swaminathan uint32_t mailBoxSize; 3586*291a2b48SSukumar Swaminathan uint32_t mbAddrLow; 3587*291a2b48SSukumar Swaminathan uint32_t mbAddrHigh; 3588fcf3ce44SJohn Forte 3589*291a2b48SSukumar Swaminathan uint32_t hgpAddrLow; 3590*291a2b48SSukumar Swaminathan uint32_t hgpAddrHigh; 3591fcf3ce44SJohn Forte 3592*291a2b48SSukumar Swaminathan uint32_t pgpAddrLow; 3593*291a2b48SSukumar Swaminathan uint32_t pgpAddrHigh; 3594*291a2b48SSukumar Swaminathan SLI2_RDSC rdsc[MAX_RINGS_AVAILABLE]; 3595fcf3ce44SJohn Forte } PCB; 3596fcf3ce44SJohn Forte 3597fcf3ce44SJohn Forte /* NEW_FEATURE */ 3598*291a2b48SSukumar Swaminathan typedef struct 3599*291a2b48SSukumar Swaminathan { 3600fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 3601*291a2b48SSukumar Swaminathan uint32_t rsvd0:27; 3602*291a2b48SSukumar Swaminathan uint32_t discardFarp:1; 3603*291a2b48SSukumar Swaminathan uint32_t IPEnable:1; 3604*291a2b48SSukumar Swaminathan uint32_t nodeName:1; 3605*291a2b48SSukumar Swaminathan uint32_t portName:1; 3606*291a2b48SSukumar Swaminathan uint32_t filterEnable:1; 3607fcf3ce44SJohn Forte #endif 3608fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 3609*291a2b48SSukumar Swaminathan uint32_t filterEnable:1; 3610*291a2b48SSukumar Swaminathan uint32_t portName:1; 3611*291a2b48SSukumar Swaminathan uint32_t nodeName:1; 3612*291a2b48SSukumar Swaminathan uint32_t IPEnable:1; 3613*291a2b48SSukumar Swaminathan uint32_t discardFarp:1; 3614*291a2b48SSukumar Swaminathan uint32_t rsvd:27; 3615*291a2b48SSukumar Swaminathan #endif 3616*291a2b48SSukumar Swaminathan NAME_TYPE portname; 3617*291a2b48SSukumar Swaminathan NAME_TYPE nodename; 3618*291a2b48SSukumar Swaminathan uint32_t rsvd1; 3619*291a2b48SSukumar Swaminathan uint32_t rsvd2; 3620*291a2b48SSukumar Swaminathan uint32_t rsvd3; 3621*291a2b48SSukumar Swaminathan uint32_t IPAddress; 3622fcf3ce44SJohn Forte } CONFIG_FARP_VAR; 3623fcf3ce44SJohn Forte 3624fcf3ce44SJohn Forte 3625fcf3ce44SJohn Forte /* NEW_FEATURE */ 3626*291a2b48SSukumar Swaminathan typedef struct 3627*291a2b48SSukumar Swaminathan { 3628fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 3629*291a2b48SSukumar Swaminathan uint32_t defaultMessageNumber:16; 3630*291a2b48SSukumar Swaminathan uint32_t rsvd1:3; 3631*291a2b48SSukumar Swaminathan uint32_t nid:5; 3632*291a2b48SSukumar Swaminathan uint32_t rsvd2:5; 3633*291a2b48SSukumar Swaminathan uint32_t defaultPresent:1; 3634*291a2b48SSukumar Swaminathan uint32_t addAssociations:1; 3635*291a2b48SSukumar Swaminathan uint32_t reportAssociations:1; 3636fcf3ce44SJohn Forte #endif 3637fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 3638*291a2b48SSukumar Swaminathan uint32_t reportAssociations:1; 3639*291a2b48SSukumar Swaminathan uint32_t addAssociations:1; 3640*291a2b48SSukumar Swaminathan uint32_t defaultPresent:1; 3641*291a2b48SSukumar Swaminathan uint32_t rsvd2:5; 3642*291a2b48SSukumar Swaminathan uint32_t nid:5; 3643*291a2b48SSukumar Swaminathan uint32_t rsvd1:3; 3644*291a2b48SSukumar Swaminathan uint32_t defaultMessageNumber:16; 3645*291a2b48SSukumar Swaminathan #endif 3646*291a2b48SSukumar Swaminathan uint32_t attConditions; 3647*291a2b48SSukumar Swaminathan uint8_t attentionId[16]; 3648*291a2b48SSukumar Swaminathan uint16_t messageNumberByHA[32]; 3649*291a2b48SSukumar Swaminathan uint16_t messageNumberByID[16]; 3650*291a2b48SSukumar Swaminathan uint32_t rsvd3; 3651fcf3ce44SJohn Forte } CONFIG_MSI_VAR; 3652fcf3ce44SJohn Forte 3653fcf3ce44SJohn Forte 3654fcf3ce44SJohn Forte /* NEW_FEATURE */ 3655*291a2b48SSukumar Swaminathan typedef struct 3656*291a2b48SSukumar Swaminathan { 3657fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 3658*291a2b48SSukumar Swaminathan uint32_t defaultMessageNumber:8; 3659*291a2b48SSukumar Swaminathan uint32_t rsvd1:11; 3660*291a2b48SSukumar Swaminathan uint32_t nid:5; 3661*291a2b48SSukumar Swaminathan uint32_t rsvd2:5; 3662*291a2b48SSukumar Swaminathan uint32_t defaultPresent:1; 3663*291a2b48SSukumar Swaminathan uint32_t addAssociations:1; 3664*291a2b48SSukumar Swaminathan uint32_t reportAssociations:1; 3665fcf3ce44SJohn Forte #endif 3666fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 3667*291a2b48SSukumar Swaminathan uint32_t reportAssociations:1; 3668*291a2b48SSukumar Swaminathan uint32_t addAssociations:1; 3669*291a2b48SSukumar Swaminathan uint32_t defaultPresent:1; 3670*291a2b48SSukumar Swaminathan uint32_t rsvd2:5; 3671*291a2b48SSukumar Swaminathan uint32_t nid:5; 3672*291a2b48SSukumar Swaminathan uint32_t rsvd1:11; 3673*291a2b48SSukumar Swaminathan uint32_t defaultMessageNumber:8; 3674*291a2b48SSukumar Swaminathan #endif 3675*291a2b48SSukumar Swaminathan uint32_t attConditions1; 3676*291a2b48SSukumar Swaminathan uint32_t attConditions2; 3677*291a2b48SSukumar Swaminathan uint8_t attentionId[16]; 3678*291a2b48SSukumar Swaminathan uint8_t messageNumberByHA[64]; 3679*291a2b48SSukumar Swaminathan uint8_t messageNumberByID[16]; 3680*291a2b48SSukumar Swaminathan uint32_t autoClearByHA1; 3681*291a2b48SSukumar Swaminathan uint32_t autoClearByHA2; 3682*291a2b48SSukumar Swaminathan uint32_t autoClearByID; 3683*291a2b48SSukumar Swaminathan uint32_t resv3; 3684fcf3ce44SJohn Forte } CONFIG_MSIX_VAR; 3685fcf3ce44SJohn Forte 3686fcf3ce44SJohn Forte 3687fcf3ce44SJohn Forte /* Union of all Mailbox Command types */ 3688fcf3ce44SJohn Forte 3689*291a2b48SSukumar Swaminathan typedef union 3690*291a2b48SSukumar Swaminathan { 3691*291a2b48SSukumar Swaminathan uint32_t varWords[31]; 3692*291a2b48SSukumar Swaminathan LOAD_SM_VAR varLdSM; /* cmd = 1 (LOAD_SM) */ 3693*291a2b48SSukumar Swaminathan READ_NV_VAR varRDnvp; /* cmd = 2 (READ_NVPARMS) */ 3694*291a2b48SSukumar Swaminathan WRITE_NV_VAR varWTnvp; /* cmd = 3 (WRITE_NVPARMS) */ 3695*291a2b48SSukumar Swaminathan BIU_DIAG_VAR varBIUdiag; /* cmd = 4 (RUN_BIU_DIAG) */ 3696*291a2b48SSukumar Swaminathan INIT_LINK_VAR varInitLnk; /* cmd = 5 (INIT_LINK) */ 3697*291a2b48SSukumar Swaminathan DOWN_LINK_VAR varDwnLnk; /* cmd = 6 (DOWN_LINK) */ 3698*291a2b48SSukumar Swaminathan CONFIG_LINK varCfgLnk; /* cmd = 7 (CONFIG_LINK) */ 3699*291a2b48SSukumar Swaminathan PART_SLIM_VAR varSlim; /* cmd = 8 (PART_SLIM) */ 3700*291a2b48SSukumar Swaminathan CONFIG_RING_VAR varCfgRing; /* cmd = 9 (CONFIG_RING) */ 3701*291a2b48SSukumar Swaminathan RESET_RING_VAR varRstRing; /* cmd = 10 (RESET_RING) */ 3702*291a2b48SSukumar Swaminathan READ_CONFIG_VAR varRdConfig; /* cmd = 11 (READ_CONFIG) */ 3703*291a2b48SSukumar Swaminathan READ_RCONF_VAR varRdRConfig; /* cmd = 12 (READ_RCONFIG) */ 3704*291a2b48SSukumar Swaminathan READ_SPARM_VAR varRdSparm; /* cmd = 13 (READ_SPARM(64)) */ 3705*291a2b48SSukumar Swaminathan READ_STATUS_VAR varRdStatus; /* cmd = 14 (READ_STATUS) */ 3706*291a2b48SSukumar Swaminathan READ_RPI_VAR varRdRPI; /* cmd = 15 (READ_RPI(64)) */ 3707*291a2b48SSukumar Swaminathan READ_XRI_VAR varRdXRI; /* cmd = 16 (READ_XRI) */ 3708*291a2b48SSukumar Swaminathan READ_REV_VAR varRdRev; /* cmd = 17 (READ_REV) */ 3709*291a2b48SSukumar Swaminathan READ_LNK_VAR varRdLnk; /* cmd = 18 (READ_LNK_STAT) */ 3710*291a2b48SSukumar Swaminathan REG_LOGIN_VAR varRegLogin; /* cmd = 19 (REG_LOGIN(64)) */ 3711*291a2b48SSukumar Swaminathan UNREG_LOGIN_VAR varUnregLogin; /* cmd = 20 (UNREG_LOGIN) */ 3712*291a2b48SSukumar Swaminathan READ_LA_VAR varReadLA; /* cmd = 21 (READ_LA(64)) */ 3713*291a2b48SSukumar Swaminathan CLEAR_LA_VAR varClearLA; /* cmd = 22 (CLEAR_LA) */ 3714*291a2b48SSukumar Swaminathan DUMP_VAR varDmp; /* Warm Start DUMP mbx cmd */ 3715*291a2b48SSukumar Swaminathan UPDATE_CFG_VAR varUpdateCfg; /* cmd = 0x1b Warm Start */ 3716*291a2b48SSukumar Swaminathan /* UPDATE_CFG cmd */ 3717*291a2b48SSukumar Swaminathan DEL_LD_ENTRY_VAR varDelLdEntry; /* cmd = 0x1d (DEL_LD_ENTRY) */ 3718*291a2b48SSukumar Swaminathan UNREG_D_ID_VAR varUnregDID; /* cmd = 0x23 (UNREG_D_ID) */ 3719*291a2b48SSukumar Swaminathan CONFIG_FARP_VAR varCfgFarp; /* cmd = 0x25 (CONFIG_FARP) */ 3720*291a2b48SSukumar Swaminathan CONFIG_MSI_VAR varCfgMSI; /* cmd = 0x90 (CONFIG_MSI) */ 3721*291a2b48SSukumar Swaminathan CONFIG_MSIX_VAR varCfgMSIX; /* cmd = 0x30 (CONFIG_MSIX) */ 3722*291a2b48SSukumar Swaminathan CONFIG_HBQ_VAR varCfgHbq; /* cmd = 0x7C (CONFIG_HBQ) */ 3723*291a2b48SSukumar Swaminathan LOAD_AREA_VAR varLdArea; /* cmd = 0x81 (LOAD_AREA) */ 3724*291a2b48SSukumar Swaminathan CONFIG_PORT_VAR varCfgPort; /* cmd = 0x88 (CONFIG_PORT) */ 3725*291a2b48SSukumar Swaminathan LOAD_EXP_ROM_VAR varLdExpRom; /* cmd = 0x9C (LOAD_XP_ROM) */ 3726*291a2b48SSukumar Swaminathan REG_VPI_VAR varRegVpi; /* cmd = 0x96 (REG_VPI) */ 3727*291a2b48SSukumar Swaminathan UNREG_VPI_VAR varUnregVpi; /* cmd = 0x97 (UNREG_VPI) */ 3728*291a2b48SSukumar Swaminathan READ_EVT_LOG_VAR varRdEvtLog; /* cmd = 0x38 (READ_EVT_LOG) */ 3729*291a2b48SSukumar Swaminathan LOG_STATUS_VAR varLogStat; /* cmd = 0x37 */ 3730fcf3ce44SJohn Forte 3731fcf3ce44SJohn Forte } MAILVARIANTS; 3732fcf3ce44SJohn Forte 3733*291a2b48SSukumar Swaminathan #define MAILBOX_CMD_BSIZE 128 3734*291a2b48SSukumar Swaminathan #define MAILBOX_CMD_WSIZE 32 3735fcf3ce44SJohn Forte 3736fcf3ce44SJohn Forte 3737fcf3ce44SJohn Forte /* 3738fcf3ce44SJohn Forte * SLI-2 specific structures 3739fcf3ce44SJohn Forte */ 3740fcf3ce44SJohn Forte 3741*291a2b48SSukumar Swaminathan typedef struct _SLI1_DESC 3742*291a2b48SSukumar Swaminathan { 3743*291a2b48SSukumar Swaminathan emlxs_rings_t mbxCring[4]; 3744*291a2b48SSukumar Swaminathan uint32_t mbxUnused[24]; 3745*291a2b48SSukumar Swaminathan } SLI1_DESC; /* 128 bytes */ 3746fcf3ce44SJohn Forte 3747*291a2b48SSukumar Swaminathan typedef struct 3748*291a2b48SSukumar Swaminathan { 3749*291a2b48SSukumar Swaminathan uint32_t cmdPutInx; 3750*291a2b48SSukumar Swaminathan uint32_t rspGetInx; 3751fcf3ce44SJohn Forte } HGP; 3752fcf3ce44SJohn Forte 3753*291a2b48SSukumar Swaminathan typedef struct 3754*291a2b48SSukumar Swaminathan { 3755*291a2b48SSukumar Swaminathan uint32_t cmdGetInx; 3756*291a2b48SSukumar Swaminathan uint32_t rspPutInx; 3757fcf3ce44SJohn Forte } PGP; 3758fcf3ce44SJohn Forte 3759fcf3ce44SJohn Forte #ifdef SLI3_SUPPORT 3760*291a2b48SSukumar Swaminathan typedef struct _SLI2_DESC 3761*291a2b48SSukumar Swaminathan { 3762*291a2b48SSukumar Swaminathan HGP host[4]; 3763*291a2b48SSukumar Swaminathan PGP port[4]; 3764*291a2b48SSukumar Swaminathan uint32_t HBQ_PortGetIdx[16]; 3765*291a2b48SSukumar Swaminathan } SLI2_DESC; /* 128 bytes */ 3766fcf3ce44SJohn Forte #else 3767*291a2b48SSukumar Swaminathan typedef struct _SLI2_DESC 3768*291a2b48SSukumar Swaminathan { 3769*291a2b48SSukumar Swaminathan HGP host[4]; /* 8 words */ 3770*291a2b48SSukumar Swaminathan uint32_t unused[16]; 3771*291a2b48SSukumar Swaminathan PGP port[4]; /* 8 words */ 3772*291a2b48SSukumar Swaminathan } SLI2_DESC; /* 128 bytes */ 3773fcf3ce44SJohn Forte #endif /* SLI3_SUPPORT */ 3774fcf3ce44SJohn Forte 3775*291a2b48SSukumar Swaminathan typedef union 3776*291a2b48SSukumar Swaminathan { 3777*291a2b48SSukumar Swaminathan SLI1_DESC s1; /* 32 words, 128 bytes */ 3778*291a2b48SSukumar Swaminathan SLI2_DESC s2; /* 32 words, 128 bytes */ 3779fcf3ce44SJohn Forte } SLI_VAR; 3780fcf3ce44SJohn Forte 3781*291a2b48SSukumar Swaminathan typedef volatile struct 3782*291a2b48SSukumar Swaminathan { 3783fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 3784*291a2b48SSukumar Swaminathan uint16_t mbxStatus; 3785*291a2b48SSukumar Swaminathan uint8_t mbxCommand; 3786*291a2b48SSukumar Swaminathan uint8_t mbxReserved:6; 3787*291a2b48SSukumar Swaminathan uint8_t mbxHc:1; 3788*291a2b48SSukumar Swaminathan uint8_t mbxOwner:1; /* Low order bit first word */ 3789fcf3ce44SJohn Forte #endif 3790fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 3791*291a2b48SSukumar Swaminathan uint8_t mbxOwner:1; /* Low order bit first word */ 3792*291a2b48SSukumar Swaminathan uint8_t mbxHc:1; 3793*291a2b48SSukumar Swaminathan uint8_t mbxReserved:6; 3794*291a2b48SSukumar Swaminathan uint8_t mbxCommand; 3795*291a2b48SSukumar Swaminathan uint16_t mbxStatus; 3796fcf3ce44SJohn Forte #endif 3797*291a2b48SSukumar Swaminathan MAILVARIANTS un; /* 124 bytes */ 3798*291a2b48SSukumar Swaminathan SLI_VAR us; /* 128 bytes */ 3799*291a2b48SSukumar Swaminathan } MAILBOX; /* 256 bytes */ 3800fcf3ce44SJohn Forte 3801fcf3ce44SJohn Forte /* 3802fcf3ce44SJohn Forte * End Structure Definitions for Mailbox Commands 3803fcf3ce44SJohn Forte */ 3804fcf3ce44SJohn Forte 3805fcf3ce44SJohn Forte 3806fcf3ce44SJohn Forte /* 3807fcf3ce44SJohn Forte * Begin Structure Definitions for IOCB Commands 3808fcf3ce44SJohn Forte */ 3809fcf3ce44SJohn Forte 3810*291a2b48SSukumar Swaminathan typedef struct 3811*291a2b48SSukumar Swaminathan { 3812fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 3813*291a2b48SSukumar Swaminathan uint8_t statAction; 3814*291a2b48SSukumar Swaminathan uint8_t statRsn; 3815*291a2b48SSukumar Swaminathan uint8_t statBaExp; 3816*291a2b48SSukumar Swaminathan uint8_t statLocalError; 3817fcf3ce44SJohn Forte #endif 3818fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 3819*291a2b48SSukumar Swaminathan uint8_t statLocalError; 3820*291a2b48SSukumar Swaminathan uint8_t statBaExp; 3821*291a2b48SSukumar Swaminathan uint8_t statRsn; 3822*291a2b48SSukumar Swaminathan uint8_t statAction; 3823fcf3ce44SJohn Forte #endif 3824fcf3ce44SJohn Forte /* statAction FBSY reason codes */ 3825*291a2b48SSukumar Swaminathan #define FBSY_RSN_MASK 0xF0 /* Rsn stored in upper nibble */ 3826*291a2b48SSukumar Swaminathan #define FBSY_FABRIC_BSY 0x10 /* F_bsy due to Fabric BSY */ 3827*291a2b48SSukumar Swaminathan #define FBSY_NPORT_BSY 0x30 /* F_bsy due to N_port BSY */ 3828fcf3ce44SJohn Forte 3829fcf3ce44SJohn Forte /* statAction PBSY action codes */ 3830*291a2b48SSukumar Swaminathan #define PBSY_ACTION1 0x01 /* Sequence terminated - retry */ 3831*291a2b48SSukumar Swaminathan #define PBSY_ACTION2 0x02 /* Sequence active - retry */ 3832fcf3ce44SJohn Forte 3833fcf3ce44SJohn Forte /* statAction P/FRJT action codes */ 3834*291a2b48SSukumar Swaminathan #define RJT_RETRYABLE 0x01 /* Retryable class of error */ 3835*291a2b48SSukumar Swaminathan #define RJT_NO_RETRY 0x02 /* Non-Retryable class of error */ 3836fcf3ce44SJohn Forte 3837fcf3ce44SJohn Forte /* statRsn LS_RJT reason codes defined in LS_RJT structure */ 3838fcf3ce44SJohn Forte 3839fcf3ce44SJohn Forte /* statRsn P_BSY reason codes */ 3840*291a2b48SSukumar Swaminathan #define PBSY_NPORT_BSY 0x01 /* Physical N_port BSY */ 3841*291a2b48SSukumar Swaminathan #define PBSY_RESRCE_BSY 0x03 /* N_port resource BSY */ 3842fcf3ce44SJohn Forte #define PBSY_VU_BSY 0xFF /* See VU field for rsn */ 3843fcf3ce44SJohn Forte 3844fcf3ce44SJohn Forte /* statRsn P/F_RJT reason codes */ 3845fcf3ce44SJohn Forte #define RJT_BAD_D_ID 0x01 /* Invalid D_ID field */ 3846fcf3ce44SJohn Forte #define RJT_BAD_S_ID 0x02 /* Invalid S_ID field */ 3847fcf3ce44SJohn Forte #define RJT_UNAVAIL_TEMP 0x03 /* N_Port unavailable temp. */ 3848fcf3ce44SJohn Forte #define RJT_UNAVAIL_PERM 0x04 /* N_Port unavailable perm. */ 3849fcf3ce44SJohn Forte #define RJT_UNSUP_CLASS 0x05 /* Class not supported */ 3850fcf3ce44SJohn Forte #define RJT_DELIM_ERR 0x06 /* Delimiter usage error */ 3851fcf3ce44SJohn Forte #define RJT_UNSUP_TYPE 0x07 /* Type not supported */ 3852fcf3ce44SJohn Forte #define RJT_BAD_CONTROL 0x08 /* Invalid link conrtol */ 3853fcf3ce44SJohn Forte #define RJT_BAD_RCTL 0x09 /* R_CTL invalid */ 3854fcf3ce44SJohn Forte #define RJT_BAD_FCTL 0x0A /* F_CTL invalid */ 3855fcf3ce44SJohn Forte #define RJT_BAD_OXID 0x0B /* OX_ID invalid */ 3856fcf3ce44SJohn Forte #define RJT_BAD_RXID 0x0C /* RX_ID invalid */ 3857fcf3ce44SJohn Forte #define RJT_BAD_SEQID 0x0D /* SEQ_ID invalid */ 3858fcf3ce44SJohn Forte #define RJT_BAD_DFCTL 0x0E /* DF_CTL invalid */ 3859fcf3ce44SJohn Forte #define RJT_BAD_SEQCNT 0x0F /* SEQ_CNT invalid */ 3860fcf3ce44SJohn Forte #define RJT_BAD_PARM 0x10 /* Param. field invalid */ 3861fcf3ce44SJohn Forte #define RJT_XCHG_ERR 0x11 /* Exchange error */ 3862fcf3ce44SJohn Forte #define RJT_PROT_ERR 0x12 /* Protocol error */ 3863fcf3ce44SJohn Forte #define RJT_BAD_LENGTH 0x13 /* Invalid Length */ 3864fcf3ce44SJohn Forte #define RJT_UNEXPECTED_ACK 0x14 /* Unexpected ACK */ 3865fcf3ce44SJohn Forte #define RJT_LOGIN_REQUIRED 0x16 /* Login required */ 3866fcf3ce44SJohn Forte #define RJT_TOO_MANY_SEQ 0x17 /* Excessive sequences */ 3867fcf3ce44SJohn Forte #define RJT_XCHG_NOT_STRT 0x18 /* Exchange not started */ 3868fcf3ce44SJohn Forte #define RJT_UNSUP_SEC_HDR 0x19 /* Security hdr not supported */ 3869fcf3ce44SJohn Forte #define RJT_UNAVAIL_PATH 0x1A /* Fabric Path not available */ 3870fcf3ce44SJohn Forte #define RJT_VENDOR_UNIQUE 0xFF /* Vendor unique error */ 3871fcf3ce44SJohn Forte 3872fcf3ce44SJohn Forte /* statRsn BA_RJT reason codes */ 3873fcf3ce44SJohn Forte #define BARJT_BAD_CMD_CODE 0x01 /* Invalid command code */ 3874fcf3ce44SJohn Forte #define BARJT_LOGICAL_ERR 0x03 /* Logical error */ 3875fcf3ce44SJohn Forte #define BARJT_LOGICAL_BSY 0x05 /* Logical busy */ 3876fcf3ce44SJohn Forte #define BARJT_PROTOCOL_ERR 0x07 /* Protocol error */ 3877fcf3ce44SJohn Forte #define BARJT_VU_ERR 0xFF /* Vendor unique error */ 3878fcf3ce44SJohn Forte 3879fcf3ce44SJohn Forte /* LS_RJT reason explanation defined in LS_RJT structure */ 3880fcf3ce44SJohn Forte 3881fcf3ce44SJohn Forte /* BA_RJT reason explanation */ 3882*291a2b48SSukumar Swaminathan #define BARJT_EXP_INVALID_ID 0x01 /* Invalid OX_ID/RX_ID */ 3883*291a2b48SSukumar Swaminathan #define BARJT_EXP_ABORT_SEQ 0x05 /* Abort SEQ, no more info */ 3884fcf3ce44SJohn Forte 3885fcf3ce44SJohn Forte /* Local Reject errors */ 3886*291a2b48SSukumar Swaminathan #define IOERR_SUCCESS 0x00 3887*291a2b48SSukumar Swaminathan #define IOERR_MISSING_CONTINUE 0x01 3888*291a2b48SSukumar Swaminathan #define IOERR_SEQUENCE_TIMEOUT 0x02 3889*291a2b48SSukumar Swaminathan #define IOERR_INTERNAL_ERROR 0x03 3890*291a2b48SSukumar Swaminathan #define IOERR_INVALID_RPI 0x04 3891*291a2b48SSukumar Swaminathan #define IOERR_NO_XRI 0x05 3892*291a2b48SSukumar Swaminathan #define IOERR_ILLEGAL_COMMAND 0x06 3893*291a2b48SSukumar Swaminathan #define IOERR_XCHG_DROPPED 0x07 3894*291a2b48SSukumar Swaminathan #define IOERR_ILLEGAL_FIELD 0x08 3895fcf3ce44SJohn Forte /* RESERVED 0x09 */ 3896fcf3ce44SJohn Forte /* RESERVED 0x0A */ 3897*291a2b48SSukumar Swaminathan #define IOERR_RCV_BUFFER_WAITING 0x0B 3898fcf3ce44SJohn Forte /* RESERVED 0x0C */ 3899*291a2b48SSukumar Swaminathan #define IOERR_TX_DMA_FAILED 0x0D 3900*291a2b48SSukumar Swaminathan #define IOERR_RX_DMA_FAILED 0x0E 3901*291a2b48SSukumar Swaminathan #define IOERR_ILLEGAL_FRAME 0x0F 3902fcf3ce44SJohn Forte 3903fcf3ce44SJohn Forte /* RESERVED 0x10 */ 3904*291a2b48SSukumar Swaminathan #define IOERR_NO_RESOURCES 0x11 3905fcf3ce44SJohn Forte /* RESERVED 0x12 */ 3906*291a2b48SSukumar Swaminathan #define IOERR_ILLEGAL_LENGTH 0x13 3907*291a2b48SSukumar Swaminathan #define IOERR_UNSUPPORTED_FEATURE 0x14 3908*291a2b48SSukumar Swaminathan #define IOERR_ABORT_IN_PROGRESS 0x15 3909*291a2b48SSukumar Swaminathan #define IOERR_ABORT_REQUESTED 0x16 3910*291a2b48SSukumar Swaminathan #define IOERR_RCV_BUFFER_TIMEOUT 0x17 3911*291a2b48SSukumar Swaminathan #define IOERR_LOOP_OPEN_FAILURE 0x18 3912*291a2b48SSukumar Swaminathan #define IOERR_RING_RESET 0x19 3913*291a2b48SSukumar Swaminathan #define IOERR_LINK_DOWN 0x1A 3914*291a2b48SSukumar Swaminathan #define IOERR_CORRUPTED_DATA 0x1B 3915*291a2b48SSukumar Swaminathan #define IOERR_CORRUPTED_RPI 0x1C 3916*291a2b48SSukumar Swaminathan #define IOERR_OUT_OF_ORDER_DATA 0x1D 3917*291a2b48SSukumar Swaminathan #define IOERR_OUT_OF_ORDER_ACK 0x1E 3918*291a2b48SSukumar Swaminathan #define IOERR_DUP_FRAME 0x1F 3919*291a2b48SSukumar Swaminathan 3920*291a2b48SSukumar Swaminathan #define IOERR_LINK_CONTROL_FRAME 0x20 /* ACK_N received */ 3921*291a2b48SSukumar Swaminathan #define IOERR_BAD_HOST_ADDRESS 0x21 3922*291a2b48SSukumar Swaminathan #define IOERR_RCV_HDRBUF_WAITING 0x22 3923*291a2b48SSukumar Swaminathan #define IOERR_MISSING_HDR_BUFFER 0x23 3924*291a2b48SSukumar Swaminathan #define IOERR_MSEQ_CHAIN_CORRUPTED 0x24 3925*291a2b48SSukumar Swaminathan #define IOERR_ABORTMULT_REQUESTED 0x25 3926fcf3ce44SJohn Forte /* RESERVED 0x26 */ 3927fcf3ce44SJohn Forte /* RESERVED 0x27 */ 3928*291a2b48SSukumar Swaminathan #define IOERR_BUFFER_SHORTAGE 0x28 3929*291a2b48SSukumar Swaminathan #define IOERR_XRIBUF_WAITING 0x29 3930fcf3ce44SJohn Forte /* RESERVED 0x2A */ 3931*291a2b48SSukumar Swaminathan #define IOERR_MISSING_HBQ_ENTRY 0x2B 3932*291a2b48SSukumar Swaminathan #define IOERR_ABORT_EXT_REQ 0x2C 3933*291a2b48SSukumar Swaminathan #define IOERR_CLOSE_EXT_REQ 0x2D 3934fcf3ce44SJohn Forte /* RESERVED 0x2E */ 3935fcf3ce44SJohn Forte /* RESERVED 0x2F */ 3936fcf3ce44SJohn Forte 3937*291a2b48SSukumar Swaminathan #define IOERR_XRIBUF_MISSING 0x30 3938*291a2b48SSukumar Swaminathan #define IOERR_ASSI_RSP_SUPPRESSED 0x31 3939fcf3ce44SJohn Forte /* RESERVED 0x32 - 0x3F */ 3940fcf3ce44SJohn Forte 3941*291a2b48SSukumar Swaminathan #define IOERR_ROFFSET_INVAL 0x40 3942*291a2b48SSukumar Swaminathan #define IOERR_ROFFSET_MISSING 0x41 3943*291a2b48SSukumar Swaminathan #define IOERR_INSUF_BUFFER 0x42 3944*291a2b48SSukumar Swaminathan #define IOERR_MISSING_SI 0x43 3945*291a2b48SSukumar Swaminathan #define IOERR_MISSING_ES 0x44 3946*291a2b48SSukumar Swaminathan #define IOERR_INCOMP_XFER 0x45 3947fcf3ce44SJohn Forte /* RESERVED 0x46 - 0xFF */ 3948fcf3ce44SJohn Forte 3949fcf3ce44SJohn Forte /* Driver defined */ 3950*291a2b48SSukumar Swaminathan #define IOERR_ABORT_TIMEOUT 0xF0 3951fcf3ce44SJohn Forte } PARM_ERR; 3952fcf3ce44SJohn Forte 3953*291a2b48SSukumar Swaminathan typedef union 3954*291a2b48SSukumar Swaminathan { 3955*291a2b48SSukumar Swaminathan struct 3956*291a2b48SSukumar Swaminathan { 3957fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 3958*291a2b48SSukumar Swaminathan uint8_t Rctl; /* R_CTL field */ 3959*291a2b48SSukumar Swaminathan uint8_t Type; /* TYPE field */ 3960*291a2b48SSukumar Swaminathan uint8_t Dfctl; /* DF_CTL field */ 3961*291a2b48SSukumar Swaminathan uint8_t Fctl; /* Bits 0-7 of IOCB word 5 */ 3962fcf3ce44SJohn Forte #endif 3963fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 3964*291a2b48SSukumar Swaminathan uint8_t Fctl; /* Bits 0-7 of IOCB word 5 */ 3965*291a2b48SSukumar Swaminathan uint8_t Dfctl; /* DF_CTL field */ 3966*291a2b48SSukumar Swaminathan uint8_t Type; /* TYPE field */ 3967*291a2b48SSukumar Swaminathan uint8_t Rctl; /* R_CTL field */ 3968*291a2b48SSukumar Swaminathan #endif 3969*291a2b48SSukumar Swaminathan #define FCP_RTYPE 0x08 /* FCP_TARGET_MODE Type - Rctl */ 3970*291a2b48SSukumar Swaminathan 3971*291a2b48SSukumar Swaminathan #define BC 0x02 /* Broadcast Received - Fctl */ 3972*291a2b48SSukumar Swaminathan #define SI 0x04 /* Sequence Initiative */ 3973*291a2b48SSukumar Swaminathan #define LA 0x08 /* Ignore Link Attention state */ 3974*291a2b48SSukumar Swaminathan #define FSEQ 0x40 /* First Sequence */ 3975*291a2b48SSukumar Swaminathan #define LSEQ 0x80 /* Last Sequence */ 3976fcf3ce44SJohn Forte } hcsw; 3977*291a2b48SSukumar Swaminathan uint32_t reserved; 3978fcf3ce44SJohn Forte } WORD5; 3979fcf3ce44SJohn Forte 3980fcf3ce44SJohn Forte 3981fcf3ce44SJohn Forte /* IOCB Command template for a generic response */ 3982*291a2b48SSukumar Swaminathan typedef struct 3983*291a2b48SSukumar Swaminathan { 3984*291a2b48SSukumar Swaminathan uint32_t reserved[4]; 3985*291a2b48SSukumar Swaminathan PARM_ERR perr; 3986fcf3ce44SJohn Forte } GENERIC_RSP; 3987fcf3ce44SJohn Forte 3988fcf3ce44SJohn Forte 3989fcf3ce44SJohn Forte /* IOCB Command template for XMIT / XMIT_BCAST / RCV_SEQUENCE / XMIT_ELS */ 3990*291a2b48SSukumar Swaminathan typedef struct 3991*291a2b48SSukumar Swaminathan { 3992*291a2b48SSukumar Swaminathan ULP_BDE xrsqbde[2]; 3993*291a2b48SSukumar Swaminathan uint32_t xrsqRo; /* Starting Relative Offset */ 3994*291a2b48SSukumar Swaminathan WORD5 w5; /* Header control/status word */ 3995fcf3ce44SJohn Forte } XR_SEQ_FIELDS; 3996fcf3ce44SJohn Forte 3997fcf3ce44SJohn Forte /* IOCB Command template for ELS_REQUEST */ 3998*291a2b48SSukumar Swaminathan typedef struct 3999*291a2b48SSukumar Swaminathan { 4000*291a2b48SSukumar Swaminathan ULP_BDE elsReq; 4001*291a2b48SSukumar Swaminathan ULP_BDE elsRsp; 4002fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 4003*291a2b48SSukumar Swaminathan uint32_t word4Rsvd:7; 4004*291a2b48SSukumar Swaminathan uint32_t fl:1; 4005*291a2b48SSukumar Swaminathan uint32_t myID:24; 4006*291a2b48SSukumar Swaminathan uint32_t word5Rsvd:8; 4007*291a2b48SSukumar Swaminathan uint32_t remoteID:24; 4008fcf3ce44SJohn Forte #endif 4009fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 4010*291a2b48SSukumar Swaminathan uint32_t myID:24; 4011*291a2b48SSukumar Swaminathan uint32_t fl:1; 4012*291a2b48SSukumar Swaminathan uint32_t word4Rsvd:7; 4013*291a2b48SSukumar Swaminathan uint32_t remoteID:24; 4014*291a2b48SSukumar Swaminathan uint32_t word5Rsvd:8; 4015fcf3ce44SJohn Forte #endif 4016fcf3ce44SJohn Forte } ELS_REQUEST; 4017fcf3ce44SJohn Forte 4018fcf3ce44SJohn Forte /* IOCB Command template for RCV_ELS_REQ */ 4019*291a2b48SSukumar Swaminathan typedef struct 4020*291a2b48SSukumar Swaminathan { 4021*291a2b48SSukumar Swaminathan ULP_BDE elsReq[2]; 4022*291a2b48SSukumar Swaminathan uint32_t parmRo; 4023fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 4024*291a2b48SSukumar Swaminathan uint32_t word5Rsvd:8; 4025*291a2b48SSukumar Swaminathan uint32_t remoteID:24; 4026fcf3ce44SJohn Forte #endif 4027fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 4028*291a2b48SSukumar Swaminathan uint32_t remoteID:24; 4029*291a2b48SSukumar Swaminathan uint32_t word5Rsvd:8; 4030fcf3ce44SJohn Forte #endif 4031fcf3ce44SJohn Forte } RCV_ELS_REQ; 4032fcf3ce44SJohn Forte 4033fcf3ce44SJohn Forte /* IOCB Command template for ABORT / CLOSE_XRI */ 4034*291a2b48SSukumar Swaminathan typedef struct 4035*291a2b48SSukumar Swaminathan { 4036*291a2b48SSukumar Swaminathan uint32_t rsvd[3]; 4037*291a2b48SSukumar Swaminathan uint32_t abortType; 4038*291a2b48SSukumar Swaminathan #define ABORT_TYPE_ABTX 0x00000000 4039*291a2b48SSukumar Swaminathan #define ABORT_TYPE_ABTS 0x00000001 4040*291a2b48SSukumar Swaminathan uint32_t parm; 4041fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 4042*291a2b48SSukumar Swaminathan uint16_t abortContextTag; /* ulpContext from command to */ 4043*291a2b48SSukumar Swaminathan /* abort/close */ 4044*291a2b48SSukumar Swaminathan uint16_t abortIoTag; /* ulpIoTag from command to */ 4045*291a2b48SSukumar Swaminathan /* abort/close */ 4046fcf3ce44SJohn Forte #endif 4047fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 4048*291a2b48SSukumar Swaminathan uint16_t abortIoTag; /* ulpIoTag from command to */ 4049*291a2b48SSukumar Swaminathan /* abort/close */ 4050*291a2b48SSukumar Swaminathan uint16_t abortContextTag; /* ulpContext from command to */ 4051*291a2b48SSukumar Swaminathan /* abort/close */ 4052fcf3ce44SJohn Forte #endif 4053fcf3ce44SJohn Forte } AC_XRI; 4054fcf3ce44SJohn Forte 4055fcf3ce44SJohn Forte /* IOCB Command template for GET_RPI */ 4056*291a2b48SSukumar Swaminathan typedef struct 4057*291a2b48SSukumar Swaminathan { 4058*291a2b48SSukumar Swaminathan uint32_t rsvd[4]; 4059*291a2b48SSukumar Swaminathan uint32_t parmRo; 4060fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 4061*291a2b48SSukumar Swaminathan uint32_t word5Rsvd:8; 4062*291a2b48SSukumar Swaminathan uint32_t remoteID:24; 4063fcf3ce44SJohn Forte #endif 4064fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 4065*291a2b48SSukumar Swaminathan uint32_t remoteID:24; 4066*291a2b48SSukumar Swaminathan uint32_t word5Rsvd:8; 4067fcf3ce44SJohn Forte #endif 4068fcf3ce44SJohn Forte } GET_RPI; 4069fcf3ce44SJohn Forte 4070fcf3ce44SJohn Forte /* IOCB Command template for all FCP Initiator commands */ 4071*291a2b48SSukumar Swaminathan typedef struct 4072*291a2b48SSukumar Swaminathan { 4073*291a2b48SSukumar Swaminathan ULP_BDE fcpi_cmnd; /* FCP_CMND payload descriptor */ 4074*291a2b48SSukumar Swaminathan ULP_BDE fcpi_rsp; /* Rcv buffer */ 4075*291a2b48SSukumar Swaminathan uint32_t fcpi_parm; 4076*291a2b48SSukumar Swaminathan uint32_t fcpi_XRdy; /* transfer ready for IWRITE */ 4077fcf3ce44SJohn Forte } FCPI_FIELDS; 4078fcf3ce44SJohn Forte 4079fcf3ce44SJohn Forte /* IOCB Command template for all FCP Target commands */ 4080*291a2b48SSukumar Swaminathan typedef struct 4081*291a2b48SSukumar Swaminathan { 4082*291a2b48SSukumar Swaminathan ULP_BDE fcpt_Buffer[2]; /* FCP_CMND payload descriptor */ 4083*291a2b48SSukumar Swaminathan uint32_t fcpt_Offset; 4084*291a2b48SSukumar Swaminathan uint32_t fcpt_Length; /* transfer ready for IWRITE */ 4085fcf3ce44SJohn Forte } FCPT_FIELDS; 4086fcf3ce44SJohn Forte 4087fcf3ce44SJohn Forte /* SLI-2 IOCB structure definitions */ 4088fcf3ce44SJohn Forte 4089fcf3ce44SJohn Forte /* IOCB Command template for 64 bit XMIT / XMIT_BCAST / XMIT_ELS */ 4090*291a2b48SSukumar Swaminathan typedef struct 4091*291a2b48SSukumar Swaminathan { 4092*291a2b48SSukumar Swaminathan ULP_BDL bdl; 4093*291a2b48SSukumar Swaminathan uint32_t xrsqRo; /* Starting Relative Offset */ 4094*291a2b48SSukumar Swaminathan WORD5 w5; /* Header control/status word */ 4095fcf3ce44SJohn Forte } XMT_SEQ_FIELDS64; 4096fcf3ce44SJohn Forte 4097fcf3ce44SJohn Forte 4098fcf3ce44SJohn Forte /* IOCB Command template for 64 bit RCV_SEQUENCE64 */ 4099*291a2b48SSukumar Swaminathan typedef struct 4100*291a2b48SSukumar Swaminathan { 4101*291a2b48SSukumar Swaminathan ULP_BDE64 rcvBde; 4102*291a2b48SSukumar Swaminathan uint32_t rsvd1; 4103*291a2b48SSukumar Swaminathan uint32_t xrsqRo; /* Starting Relative Offset */ 4104*291a2b48SSukumar Swaminathan WORD5 w5; /* Header control/status word */ 4105fcf3ce44SJohn Forte } RCV_SEQ_FIELDS64; 4106fcf3ce44SJohn Forte 4107fcf3ce44SJohn Forte /* IOCB Command template for ELS_REQUEST64 */ 4108*291a2b48SSukumar Swaminathan typedef struct 4109*291a2b48SSukumar Swaminathan { 4110*291a2b48SSukumar Swaminathan ULP_BDL bdl; 4111fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 4112*291a2b48SSukumar Swaminathan uint32_t word4Rsvd:7; 4113*291a2b48SSukumar Swaminathan uint32_t fl:1; 4114*291a2b48SSukumar Swaminathan uint32_t myID:24; 4115fcf3ce44SJohn Forte 4116*291a2b48SSukumar Swaminathan uint32_t word5Rsvd:8; 4117*291a2b48SSukumar Swaminathan uint32_t remoteID:24; 4118fcf3ce44SJohn Forte #endif 4119fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 4120*291a2b48SSukumar Swaminathan uint32_t myID:24; 4121*291a2b48SSukumar Swaminathan uint32_t fl:1; 4122*291a2b48SSukumar Swaminathan uint32_t word4Rsvd:7; 4123fcf3ce44SJohn Forte 4124*291a2b48SSukumar Swaminathan uint32_t remoteID:24; 4125*291a2b48SSukumar Swaminathan uint32_t word5Rsvd:8; 4126fcf3ce44SJohn Forte #endif 4127fcf3ce44SJohn Forte } ELS_REQUEST64; 4128fcf3ce44SJohn Forte 4129fcf3ce44SJohn Forte 4130fcf3ce44SJohn Forte /* IOCB Command template for ASYNC_STATUS */ 4131*291a2b48SSukumar Swaminathan typedef struct 4132*291a2b48SSukumar Swaminathan { 4133*291a2b48SSukumar Swaminathan ULP_BDL resv; 4134*291a2b48SSukumar Swaminathan uint32_t parameter; 4135fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 4136*291a2b48SSukumar Swaminathan uint16_t EventCode; 4137*291a2b48SSukumar Swaminathan uint16_t SubContext; 4138fcf3ce44SJohn Forte #endif 4139fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 4140*291a2b48SSukumar Swaminathan uint16_t SubContext; 4141*291a2b48SSukumar Swaminathan uint16_t EventCode; 4142fcf3ce44SJohn Forte #endif 4143fcf3ce44SJohn Forte } ASYNC_STATUS; 4144fcf3ce44SJohn Forte 4145fcf3ce44SJohn Forte 4146fcf3ce44SJohn Forte /* IOCB Command template for QUE_RING_LIST64 */ 4147*291a2b48SSukumar Swaminathan typedef struct 4148*291a2b48SSukumar Swaminathan { 4149*291a2b48SSukumar Swaminathan ULP_BDL bdl; 4150*291a2b48SSukumar Swaminathan uint32_t rsvd1; 4151*291a2b48SSukumar Swaminathan uint32_t rsvd2; 4152fcf3ce44SJohn Forte } QUE_RING_LIST64; 4153fcf3ce44SJohn Forte 4154fcf3ce44SJohn Forte 4155fcf3ce44SJohn Forte /* IOCB Command template for GEN_REQUEST64 */ 4156*291a2b48SSukumar Swaminathan typedef struct 4157*291a2b48SSukumar Swaminathan { 4158*291a2b48SSukumar Swaminathan ULP_BDL bdl; 4159*291a2b48SSukumar Swaminathan uint32_t param; /* Starting Relative Offset */ 4160*291a2b48SSukumar Swaminathan WORD5 w5; /* Header control/status word */ 4161fcf3ce44SJohn Forte } GEN_REQUEST64; 4162fcf3ce44SJohn Forte 4163fcf3ce44SJohn Forte /* IOCB Command template for RCV_ELS_REQ64 */ 4164*291a2b48SSukumar Swaminathan typedef struct 4165*291a2b48SSukumar Swaminathan { 4166*291a2b48SSukumar Swaminathan ULP_BDE64 elsReq; 4167*291a2b48SSukumar Swaminathan uint32_t rcvd1; 4168*291a2b48SSukumar Swaminathan uint32_t parmRo; 4169fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 4170*291a2b48SSukumar Swaminathan uint32_t word5Rsvd:8; 4171*291a2b48SSukumar Swaminathan uint32_t remoteID:24; 4172fcf3ce44SJohn Forte #endif 4173fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 4174*291a2b48SSukumar Swaminathan uint32_t remoteID:24; 4175*291a2b48SSukumar Swaminathan uint32_t word5Rsvd:8; 4176fcf3ce44SJohn Forte #endif 4177fcf3ce44SJohn Forte } RCV_ELS_REQ64; 4178fcf3ce44SJohn Forte 4179fcf3ce44SJohn Forte /* IOCB Command template for all 64 bit FCP Initiator commands */ 4180*291a2b48SSukumar Swaminathan typedef struct 4181*291a2b48SSukumar Swaminathan { 4182*291a2b48SSukumar Swaminathan ULP_BDL bdl; 4183*291a2b48SSukumar Swaminathan uint32_t fcpi_parm; 4184*291a2b48SSukumar Swaminathan uint32_t fcpi_XRdy; /* transfer ready for IWRITE */ 4185fcf3ce44SJohn Forte } FCPI_FIELDS64; 4186fcf3ce44SJohn Forte 4187fcf3ce44SJohn Forte /* IOCB Command template for all 64 bit FCP Target commands */ 4188*291a2b48SSukumar Swaminathan typedef struct 4189*291a2b48SSukumar Swaminathan { 4190*291a2b48SSukumar Swaminathan ULP_BDL bdl; 4191*291a2b48SSukumar Swaminathan uint32_t fcpt_Offset; 4192*291a2b48SSukumar Swaminathan uint32_t fcpt_Length; /* transfer ready for IWRITE */ 4193fcf3ce44SJohn Forte } FCPT_FIELDS64; 4194fcf3ce44SJohn Forte 4195fcf3ce44SJohn Forte /* IOCB Command template for all 64 bit FCP Target commands */ 4196*291a2b48SSukumar Swaminathan typedef struct 4197*291a2b48SSukumar Swaminathan { 4198*291a2b48SSukumar Swaminathan uint32_t rsp_length; 4199*291a2b48SSukumar Swaminathan uint32_t rsvd1; 4200*291a2b48SSukumar Swaminathan uint32_t rsvd2; 4201*291a2b48SSukumar Swaminathan uint32_t iotag32; 4202*291a2b48SSukumar Swaminathan uint32_t status; 4203fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 4204*291a2b48SSukumar Swaminathan uint32_t rsvd:30; 4205*291a2b48SSukumar Swaminathan uint32_t lnk:1; 4206*291a2b48SSukumar Swaminathan #endif /* EMLXS_BIG_ENDIAN */ 4207fcf3ce44SJohn Forte 4208fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 4209*291a2b48SSukumar Swaminathan uint32_t lnk:1; 4210*291a2b48SSukumar Swaminathan uint32_t rsvd:30; 4211*291a2b48SSukumar Swaminathan #endif /* EMLXS_LITTLE_ENDIAN */ 4212fcf3ce44SJohn Forte } AUTO_TRSP; 4213fcf3ce44SJohn Forte 4214fcf3ce44SJohn Forte 4215*291a2b48SSukumar Swaminathan typedef struct 4216*291a2b48SSukumar Swaminathan { 4217*291a2b48SSukumar Swaminathan uint32_t io_tag64_low; /* Word 8 */ 4218*291a2b48SSukumar Swaminathan uint32_t io_tag64_high; /* Word 9 */ 4219fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 4220*291a2b48SSukumar Swaminathan uint32_t cs_ctl:8; /* Word 10, bit 31:24 */ 4221*291a2b48SSukumar Swaminathan uint32_t cs_en:1; /* Word 10, bit 23 */ 4222*291a2b48SSukumar Swaminathan uint32_t rsv:15; /* Word 10, bit 22:8 */ 4223*291a2b48SSukumar Swaminathan uint32_t ebde_count:8; /* Word 10, bit 7:0 */ 4224fcf3ce44SJohn Forte #endif 4225fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 4226*291a2b48SSukumar Swaminathan uint32_t ebde_count:8; /* Word 10, bit 7:0 */ 4227*291a2b48SSukumar Swaminathan uint32_t rsv:15; /* Word 10, bit 22:8 */ 4228*291a2b48SSukumar Swaminathan uint32_t cs_en:1; /* Word 10, bit 23 */ 4229*291a2b48SSukumar Swaminathan uint32_t cs_ctl:8; /* Word 10, bit 31:24 */ 4230*291a2b48SSukumar Swaminathan #endif 4231*291a2b48SSukumar Swaminathan uint32_t rsplen; /* Word 11 */ 4232*291a2b48SSukumar Swaminathan ULP_BDE64 ebde1; /* Word 12:14 */ 4233*291a2b48SSukumar Swaminathan ULP_BDE64 ebde2; /* Word 15:17 */ 4234*291a2b48SSukumar Swaminathan ULP_BDE64 ebde3; /* Word 18:20 */ 4235*291a2b48SSukumar Swaminathan ULP_BDE64 ebde4; /* Word 21:23 */ 4236*291a2b48SSukumar Swaminathan ULP_BDE64 ebde5; /* Word 24:26 */ 4237*291a2b48SSukumar Swaminathan ULP_BDE64 ebde6; /* Word 27:29 */ 4238fcf3ce44SJohn Forte } GENERIC_EXT_IOCB; 4239fcf3ce44SJohn Forte 4240fcf3ce44SJohn Forte /* 4241*291a2b48SSukumar Swaminathan * IOCB Command Extension template for 4242*291a2b48SSukumar Swaminathan * CMD_RCV_ELS64_CX (0xB7) or CMD_RCV_SEQ64_CX (0xB5) 4243fcf3ce44SJohn Forte */ 4244fcf3ce44SJohn Forte 4245*291a2b48SSukumar Swaminathan typedef struct 4246*291a2b48SSukumar Swaminathan { 4247*291a2b48SSukumar Swaminathan uint32_t hdr3; /* word 8 */ 4248fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 4249*291a2b48SSukumar Swaminathan uint16_t vpi; /* word 9 */ 4250*291a2b48SSukumar Swaminathan uint16_t buddy_xri; 4251fcf3ce44SJohn Forte 4252*291a2b48SSukumar Swaminathan uint32_t ccp:8; /* word 10 */ 4253*291a2b48SSukumar Swaminathan uint32_t ccpe:1; 4254*291a2b48SSukumar Swaminathan uint32_t rsvd:23; 4255fcf3ce44SJohn Forte #endif 4256fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 4257*291a2b48SSukumar Swaminathan uint16_t buddy_xri; /* word 9 */ 4258*291a2b48SSukumar Swaminathan uint16_t vpi; 4259fcf3ce44SJohn Forte 4260*291a2b48SSukumar Swaminathan uint32_t rsvd:23; /* word 10 */ 4261*291a2b48SSukumar Swaminathan uint32_t ccpe:1; 4262*291a2b48SSukumar Swaminathan uint32_t ccp:8; 4263fcf3ce44SJohn Forte #endif 4264*291a2b48SSukumar Swaminathan uint32_t seq_len; /* received sequence length */ 4265*291a2b48SSukumar Swaminathan ULP_BDL bde2; /* total 4 words */ 4266fcf3ce44SJohn Forte } RCV_SEQ_ELS_64_SLI3_EXT; 4267fcf3ce44SJohn Forte 4268fcf3ce44SJohn Forte 4269fcf3ce44SJohn Forte 4270*291a2b48SSukumar Swaminathan typedef volatile struct emlxs_iocb 4271*291a2b48SSukumar Swaminathan { /* IOCB structure */ 4272*291a2b48SSukumar Swaminathan union 4273*291a2b48SSukumar Swaminathan { 4274*291a2b48SSukumar Swaminathan GENERIC_RSP grsp; /* Generic response */ 4275*291a2b48SSukumar Swaminathan XR_SEQ_FIELDS xrseq; /* XMIT/BCAST/RCV_SEQ */ 4276*291a2b48SSukumar Swaminathan ULP_BDE cont[3]; /* up to 3 cont BDEs */ 4277*291a2b48SSukumar Swaminathan ELS_REQUEST elsreq; /* ELS_REQ template */ 4278*291a2b48SSukumar Swaminathan RCV_ELS_REQ rcvels; /* RCV_ELS_REQ */ 4279*291a2b48SSukumar Swaminathan /* template */ 4280*291a2b48SSukumar Swaminathan AC_XRI acxri; /* ABORT/CLOSE_XRI */ 4281*291a2b48SSukumar Swaminathan /* template */ 4282*291a2b48SSukumar Swaminathan GET_RPI getrpi; /* GET_RPI template */ 4283*291a2b48SSukumar Swaminathan FCPI_FIELDS fcpi; /* FCP Initiator */ 4284*291a2b48SSukumar Swaminathan /* template */ 4285*291a2b48SSukumar Swaminathan FCPT_FIELDS fcpt; /* FCP target */ 4286*291a2b48SSukumar Swaminathan /* template */ 4287fcf3ce44SJohn Forte 4288fcf3ce44SJohn Forte /* SLI-2 structures */ 4289fcf3ce44SJohn Forte 4290*291a2b48SSukumar Swaminathan ULP_BDE64 cont64[2]; /* up to 2 64 bit */ 4291*291a2b48SSukumar Swaminathan /* cont BDE_64s */ 4292*291a2b48SSukumar Swaminathan ELS_REQUEST64 elsreq64; /* ELS_REQ64 template */ 4293*291a2b48SSukumar Swaminathan QUE_RING_LIST64 qringlist64; /* QUE RING LIST64 */ 4294*291a2b48SSukumar Swaminathan /* template */ 4295*291a2b48SSukumar Swaminathan GEN_REQUEST64 genreq64; /* GEN_REQUEST64 */ 4296*291a2b48SSukumar Swaminathan /* template */ 4297*291a2b48SSukumar Swaminathan RCV_ELS_REQ64 rcvels64; /* RCV_ELS_REQ */ 4298*291a2b48SSukumar Swaminathan /* template */ 4299*291a2b48SSukumar Swaminathan XMT_SEQ_FIELDS64 xseq64; /* XMIT / BCAST cmd */ 4300*291a2b48SSukumar Swaminathan FCPI_FIELDS64 fcpi64; /* FCP 64 bit */ 4301*291a2b48SSukumar Swaminathan /* Initiator template */ 4302*291a2b48SSukumar Swaminathan FCPT_FIELDS64 fcpt64; /* FCP 64 bit target */ 4303*291a2b48SSukumar Swaminathan /* template */ 4304*291a2b48SSukumar Swaminathan AUTO_TRSP atrsp; /* FCP 64 bit target */ 4305*291a2b48SSukumar Swaminathan /* template */ 4306*291a2b48SSukumar Swaminathan 4307*291a2b48SSukumar Swaminathan RCV_SEQ_FIELDS64 rcvseq64; 4308*291a2b48SSukumar Swaminathan ASYNC_STATUS astat; 4309*291a2b48SSukumar Swaminathan 4310*291a2b48SSukumar Swaminathan uint32_t ulpWord[6]; /* generic 6 'words' */ 4311fcf3ce44SJohn Forte } un; 4312*291a2b48SSukumar Swaminathan union 4313*291a2b48SSukumar Swaminathan { 4314*291a2b48SSukumar Swaminathan struct 4315*291a2b48SSukumar Swaminathan { 4316fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 4317*291a2b48SSukumar Swaminathan uint16_t ulpContext; /* High order bits */ 4318*291a2b48SSukumar Swaminathan /* word6 */ 4319*291a2b48SSukumar Swaminathan uint16_t ulpIoTag; /* Low order bits */ 4320*291a2b48SSukumar Swaminathan /* word6 */ 4321fcf3ce44SJohn Forte #endif 4322fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 4323*291a2b48SSukumar Swaminathan uint16_t ulpIoTag; /* Low order bits */ 4324*291a2b48SSukumar Swaminathan /* word6 */ 4325*291a2b48SSukumar Swaminathan uint16_t ulpContext; /* High order bits */ 4326*291a2b48SSukumar Swaminathan /* word6 */ 4327fcf3ce44SJohn Forte #endif 4328fcf3ce44SJohn Forte } t1; 4329*291a2b48SSukumar Swaminathan struct 4330*291a2b48SSukumar Swaminathan { 4331fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 4332*291a2b48SSukumar Swaminathan uint16_t ulpContext; /* High order bits */ 4333*291a2b48SSukumar Swaminathan /* word6 */ 4334*291a2b48SSukumar Swaminathan uint16_t ulpIoTag1:2; /* Low order bits */ 4335*291a2b48SSukumar Swaminathan /* word6 */ 4336*291a2b48SSukumar Swaminathan uint16_t ulpIoTag0:14; /* Low order bits */ 4337*291a2b48SSukumar Swaminathan /* word6 */ 4338fcf3ce44SJohn Forte #endif 4339fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 4340*291a2b48SSukumar Swaminathan uint16_t ulpIoTag0:14; /* Low order bits */ 4341*291a2b48SSukumar Swaminathan /* word6 */ 4342*291a2b48SSukumar Swaminathan uint16_t ulpIoTag1:2; /* Low order bits */ 4343*291a2b48SSukumar Swaminathan /* word6 */ 4344*291a2b48SSukumar Swaminathan uint16_t ulpContext; /* High order bits */ 4345*291a2b48SSukumar Swaminathan /* word6 */ 4346fcf3ce44SJohn Forte #endif 4347fcf3ce44SJohn Forte } t2; 4348fcf3ce44SJohn Forte } un1; 4349fcf3ce44SJohn Forte #define ulpContext un1.t1.ulpContext 4350fcf3ce44SJohn Forte #define ulpIoTag un1.t1.ulpIoTag 4351fcf3ce44SJohn Forte #define ulpIoTag0 un1.t2.ulpIoTag0 4352fcf3ce44SJohn Forte #define ulpDelayXmit un1.t2.ulpIoTag1 4353fcf3ce44SJohn Forte 4354fcf3ce44SJohn Forte #define IOCB_DELAYXMIT_MSK 0x3000 4355fcf3ce44SJohn Forte 4356fcf3ce44SJohn Forte 4357*291a2b48SSukumar Swaminathan union 4358*291a2b48SSukumar Swaminathan { 4359*291a2b48SSukumar Swaminathan struct 4360*291a2b48SSukumar Swaminathan { 4361fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 4362*291a2b48SSukumar Swaminathan uint32_t ulpRsvdByte:8; 4363*291a2b48SSukumar Swaminathan uint32_t ulpXS:1; 4364*291a2b48SSukumar Swaminathan uint32_t ulpFCP2Rcvy:1; 4365*291a2b48SSukumar Swaminathan uint32_t ulpPU:2; 4366*291a2b48SSukumar Swaminathan uint32_t ulpIr:1; 4367*291a2b48SSukumar Swaminathan uint32_t ulpClass:3; 4368*291a2b48SSukumar Swaminathan uint32_t ulpCommand:8; 4369*291a2b48SSukumar Swaminathan uint32_t ulpStatus:4; 4370*291a2b48SSukumar Swaminathan uint32_t ulpBdeCount:2; 4371*291a2b48SSukumar Swaminathan uint32_t ulpLe:1; 4372*291a2b48SSukumar Swaminathan uint32_t ulpOwner:1; /* Low order bit */ 4373*291a2b48SSukumar Swaminathan /* word 7 */ 4374fcf3ce44SJohn Forte #endif 4375fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 4376*291a2b48SSukumar Swaminathan uint32_t ulpOwner:1; /* Low order bit */ 4377*291a2b48SSukumar Swaminathan /* word 7 */ 4378*291a2b48SSukumar Swaminathan uint32_t ulpLe:1; 4379*291a2b48SSukumar Swaminathan uint32_t ulpBdeCount:2; 4380*291a2b48SSukumar Swaminathan uint32_t ulpStatus:4; 4381*291a2b48SSukumar Swaminathan uint32_t ulpCommand:8; 4382*291a2b48SSukumar Swaminathan uint32_t ulpClass:3; 4383*291a2b48SSukumar Swaminathan uint32_t ulpIr:1; 4384*291a2b48SSukumar Swaminathan uint32_t ulpPU:2; 4385*291a2b48SSukumar Swaminathan uint32_t ulpFCP2Rcvy:1; 4386*291a2b48SSukumar Swaminathan uint32_t ulpXS:1; 4387*291a2b48SSukumar Swaminathan uint32_t ulpRsvdByte:8; 4388fcf3ce44SJohn Forte #endif 4389fcf3ce44SJohn Forte } t1; 4390fcf3ce44SJohn Forte 4391*291a2b48SSukumar Swaminathan struct 4392*291a2b48SSukumar Swaminathan { 4393fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 4394*291a2b48SSukumar Swaminathan uint32_t ulpRsvdByte:8; 4395*291a2b48SSukumar Swaminathan uint32_t ulpCT:2; 4396*291a2b48SSukumar Swaminathan uint32_t ulpPU:2; 4397*291a2b48SSukumar Swaminathan uint32_t ulpIr:1; 4398*291a2b48SSukumar Swaminathan uint32_t ulpClass:3; 4399*291a2b48SSukumar Swaminathan uint32_t ulpCommand:8; 4400*291a2b48SSukumar Swaminathan uint32_t ulpStatus:4; 4401*291a2b48SSukumar Swaminathan uint32_t ulpBdeCount:2; 4402*291a2b48SSukumar Swaminathan uint32_t ulpLe:1; 4403*291a2b48SSukumar Swaminathan uint32_t ulpOwner:1; /* Low order bit */ 4404*291a2b48SSukumar Swaminathan /* word 7 */ 4405fcf3ce44SJohn Forte #endif 4406fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 4407*291a2b48SSukumar Swaminathan uint32_t ulpOwner:1; /* Low order bit */ 4408*291a2b48SSukumar Swaminathan /* word 7 */ 4409*291a2b48SSukumar Swaminathan uint32_t ulpLe:1; 4410*291a2b48SSukumar Swaminathan uint32_t ulpBdeCount:2; 4411*291a2b48SSukumar Swaminathan uint32_t ulpStatus:4; 4412*291a2b48SSukumar Swaminathan uint32_t ulpCommand:8; 4413*291a2b48SSukumar Swaminathan uint32_t ulpClass:3; 4414*291a2b48SSukumar Swaminathan uint32_t ulpIr:1; 4415*291a2b48SSukumar Swaminathan uint32_t ulpPU:2; 4416*291a2b48SSukumar Swaminathan uint32_t ulpCT:2; 4417*291a2b48SSukumar Swaminathan uint32_t ulpRsvdByte:8; 4418fcf3ce44SJohn Forte #endif 4419fcf3ce44SJohn Forte } t2; 4420fcf3ce44SJohn Forte } un2; 4421fcf3ce44SJohn Forte 4422*291a2b48SSukumar Swaminathan #define ulpCT un2.t2.ulpCT 4423*291a2b48SSukumar Swaminathan #define ulpRsvdByte un2.t1.ulpRsvdByte 4424*291a2b48SSukumar Swaminathan #define ulpXS un2.t1.ulpXS 4425*291a2b48SSukumar Swaminathan #define ulpFCP2Rcvy un2.t1.ulpFCP2Rcvy 4426*291a2b48SSukumar Swaminathan #define ulpPU un2.t1.ulpPU 4427*291a2b48SSukumar Swaminathan #define ulpIr un2.t1.ulpIr 4428*291a2b48SSukumar Swaminathan #define ulpClass un2.t1.ulpClass 4429*291a2b48SSukumar Swaminathan #define ulpCommand un2.t1.ulpCommand 4430*291a2b48SSukumar Swaminathan #define ulpStatus un2.t1.ulpStatus 4431*291a2b48SSukumar Swaminathan #define ulpBdeCount un2.t1.ulpBdeCount 4432*291a2b48SSukumar Swaminathan #define ulpLe un2.t1.ulpLe 4433*291a2b48SSukumar Swaminathan #define ulpOwner un2.t1.ulpOwner 4434fcf3ce44SJohn Forte /* 32 bytes at this point */ 4435fcf3ce44SJohn Forte 4436fcf3ce44SJohn Forte #ifdef SLI3_SUPPORT 4437*291a2b48SSukumar Swaminathan union 4438*291a2b48SSukumar Swaminathan { 4439*291a2b48SSukumar Swaminathan GENERIC_EXT_IOCB ext_iocb; 4440*291a2b48SSukumar Swaminathan RCV_SEQ_ELS_64_SLI3_EXT ext_rcv; 4441*291a2b48SSukumar Swaminathan uint32_t sli3Words[24]; /* 96 extra bytes */ 4442*291a2b48SSukumar Swaminathan /* for SLI-3 */ 4443fcf3ce44SJohn Forte } unsli3; 4444fcf3ce44SJohn Forte /* 128 bytes at this point */ 4445fcf3ce44SJohn Forte #endif /* SLI3_SUPPORT */ 4446fcf3ce44SJohn Forte 4447*291a2b48SSukumar Swaminathan #define IOCB_FCP 1 /* IOCB is used for */ 4448*291a2b48SSukumar Swaminathan /* FCP ELS cmds - ulpRsvByte */ 4449*291a2b48SSukumar Swaminathan #define IOCB_IP 2 /* IOCB is used for IP ELS cmds */ 4450*291a2b48SSukumar Swaminathan #define PARM_UNUSED 0 /* PU field (Word 4) not used */ 4451*291a2b48SSukumar Swaminathan #define PARM_REL_OFF 1 /* PU field (Word 4) = R. O. */ 4452*291a2b48SSukumar Swaminathan #define PARM_READ_CHECK 2 /* PU field (Word 4) = Data Xfer Len */ 4453*291a2b48SSukumar Swaminathan #define CLASS1 0 /* Class 1 */ 4454*291a2b48SSukumar Swaminathan #define CLASS2 1 /* Class 2 */ 4455*291a2b48SSukumar Swaminathan #define CLASS3 2 /* Class 3 */ 4456*291a2b48SSukumar Swaminathan #define CLASS_FCP_INTERMIX 7 /* FCP Data->Cls 1, all else->Cls 2 */ 4457*291a2b48SSukumar Swaminathan 4458*291a2b48SSukumar Swaminathan #define IOSTAT_SUCCESS 0x0 /* ulpStatus */ 4459fcf3ce44SJohn Forte #define IOSTAT_FCP_RSP_ERROR 0x1 4460*291a2b48SSukumar Swaminathan #define IOSTAT_REMOTE_STOP 0x2 4461*291a2b48SSukumar Swaminathan #define IOSTAT_LOCAL_REJECT 0x3 4462*291a2b48SSukumar Swaminathan #define IOSTAT_NPORT_RJT 0x4 4463*291a2b48SSukumar Swaminathan #define IOSTAT_FABRIC_RJT 0x5 4464*291a2b48SSukumar Swaminathan #define IOSTAT_NPORT_BSY 0x6 4465*291a2b48SSukumar Swaminathan #define IOSTAT_FABRIC_BSY 0x7 4466*291a2b48SSukumar Swaminathan #define IOSTAT_INTERMED_RSP 0x8 4467*291a2b48SSukumar Swaminathan #define IOSTAT_LS_RJT 0x9 4468*291a2b48SSukumar Swaminathan #define IOSTAT_RESERVED_A 0xA 4469*291a2b48SSukumar Swaminathan #define IOSTAT_CMD_REJECT 0xB 4470fcf3ce44SJohn Forte #define IOSTAT_FCP_TGT_LENCHK 0xC 4471fcf3ce44SJohn Forte #define IOSTAT_NEED_BUF_ENTRY 0xD 4472*291a2b48SSukumar Swaminathan #define IOSTAT_RESERVED_E 0xE 4473fcf3ce44SJohn Forte #define IOSTAT_ILLEGAL_FRAME_RCVD 0xF 4474fcf3ce44SJohn Forte 4475fcf3ce44SJohn Forte /* Special error codes */ 4476*291a2b48SSukumar Swaminathan #define IOSTAT_DATA_OVERRUN 0x10 /* Added for resid handling */ 4477*291a2b48SSukumar Swaminathan #define IOSTAT_DATA_UNDERRUN 0x11 /* Added for resid handling */ 4478fcf3ce44SJohn Forte } emlxs_iocb_t; 4479fcf3ce44SJohn Forte typedef emlxs_iocb_t IOCB; 4480fcf3ce44SJohn Forte 4481fcf3ce44SJohn Forte 4482*291a2b48SSukumar Swaminathan typedef struct emlxs_iocbq 4483*291a2b48SSukumar Swaminathan { 4484*291a2b48SSukumar Swaminathan emlxs_iocb_t iocb; 4485*291a2b48SSukumar Swaminathan struct emlxs_iocbq *next; 4486fcf3ce44SJohn Forte 4487*291a2b48SSukumar Swaminathan uint8_t *bp; /* ptr to data buffer structure */ 4488*291a2b48SSukumar Swaminathan void *port; /* Board info pointer */ 4489*291a2b48SSukumar Swaminathan void *ring; /* Ring pointer */ 4490*291a2b48SSukumar Swaminathan void *node; /* Node pointer */ 4491*291a2b48SSukumar Swaminathan void *sbp; /* Pkt pointer */ 4492*291a2b48SSukumar Swaminathan uint32_t flag; 4493fcf3ce44SJohn Forte 4494fcf3ce44SJohn Forte #define IOCB_POOL_ALLOCATED 0x00000001 4495fcf3ce44SJohn Forte #define IOCB_PRIORITY 0x00000002 4496fcf3ce44SJohn Forte #define IOCB_SPECIAL 0x00000004 4497fcf3ce44SJohn Forte } emlxs_iocbq_t; 4498fcf3ce44SJohn Forte typedef emlxs_iocbq_t IOCBQ; 4499fcf3ce44SJohn Forte 4500fcf3ce44SJohn Forte 4501*291a2b48SSukumar Swaminathan typedef struct emlxs_mbq 4502*291a2b48SSukumar Swaminathan { 4503*291a2b48SSukumar Swaminathan volatile uint32_t mbox[MAILBOX_CMD_WSIZE]; 4504*291a2b48SSukumar Swaminathan struct emlxs_mbq *next; 4505fcf3ce44SJohn Forte 4506fcf3ce44SJohn Forte /* Defferred handling pointers */ 4507*291a2b48SSukumar Swaminathan uint8_t *bp; /* ptr to data buffer */ 4508*291a2b48SSukumar Swaminathan /* structure */ 4509*291a2b48SSukumar Swaminathan uint8_t *sbp; /* ptr to emlxs_buf_t */ 4510*291a2b48SSukumar Swaminathan /* structure */ 4511*291a2b48SSukumar Swaminathan uint8_t *ubp; /* ptr to fc_unsol_buf_t */ 4512*291a2b48SSukumar Swaminathan /* structure */ 4513*291a2b48SSukumar Swaminathan uint8_t *iocbq; /* ptr to IOCBQ structure */ 4514*291a2b48SSukumar Swaminathan uint32_t flag; 4515fcf3ce44SJohn Forte 4516fcf3ce44SJohn Forte #define MBQ_POOL_ALLOCATED 0x00000001 4517fcf3ce44SJohn Forte #define MBQ_PASSTHRU 0x00000002 4518fcf3ce44SJohn Forte #define MBQ_COMPLETED 0x00010000 /* Used for MBX_SLEEP */ 4519fcf3ce44SJohn Forte #define MBQ_INIT_MASK 0x0000ffff 4520fcf3ce44SJohn Forte 4521fcf3ce44SJohn Forte #ifdef MBOX_EXT_SUPPORT 4522*291a2b48SSukumar Swaminathan uint8_t *extbuf; /* ptr to mailbox ext buffer */ 4523*291a2b48SSukumar Swaminathan uint32_t extsize; /* size of mailbox ext buffer */ 4524*291a2b48SSukumar Swaminathan #endif /* MBOX_EXT_SUPPORT */ 4525fcf3ce44SJohn Forte } emlxs_mbq_t; 4526fcf3ce44SJohn Forte typedef emlxs_mbq_t MAILBOXQ; 4527fcf3ce44SJohn Forte 4528fcf3ce44SJohn Forte 4529fcf3ce44SJohn Forte /* We currently do not support IOCBs in SLI1 mode */ 4530*291a2b48SSukumar Swaminathan typedef struct 4531*291a2b48SSukumar Swaminathan { 4532*291a2b48SSukumar Swaminathan MAILBOX mbx; 4533fcf3ce44SJohn Forte #ifdef MBOX_EXT_SUPPORT 4534*291a2b48SSukumar Swaminathan uint8_t mbxExt[MBOX_EXTENSION_SIZE]; 4535*291a2b48SSukumar Swaminathan #endif /* MBOX_EXT_SUPPORT */ 4536*291a2b48SSukumar Swaminathan uint8_t pad[(SLI_SLIM1_SIZE - 4537*291a2b48SSukumar Swaminathan (sizeof (MAILBOX) + MBOX_EXTENSION_SIZE))]; 4538fcf3ce44SJohn Forte } SLIM1; 4539fcf3ce44SJohn Forte 4540fcf3ce44SJohn Forte 4541*291a2b48SSukumar Swaminathan typedef struct 4542*291a2b48SSukumar Swaminathan { 4543*291a2b48SSukumar Swaminathan MAILBOX mbx; 4544fcf3ce44SJohn Forte #ifdef MBOX_EXT_SUPPORT 4545*291a2b48SSukumar Swaminathan uint8_t mbxExt[MBOX_EXTENSION_SIZE]; 4546*291a2b48SSukumar Swaminathan #endif /* MBOX_EXT_SUPPORT */ 4547*291a2b48SSukumar Swaminathan PCB pcb; 4548*291a2b48SSukumar Swaminathan uint8_t IOCBs[SLI_IOCB_MAX_SIZE]; 4549fcf3ce44SJohn Forte } SLIM2; 4550fcf3ce44SJohn Forte 4551fcf3ce44SJohn Forte 4552fcf3ce44SJohn Forte 4553fcf3ce44SJohn Forte /* 4554fcf3ce44SJohn Forte * This file defines the Header File for the FDMI HBA Management Service 4555fcf3ce44SJohn Forte */ 4556fcf3ce44SJohn Forte 4557fcf3ce44SJohn Forte /* 4558fcf3ce44SJohn Forte * FDMI HBA MAnagement Operations Command Codes 4559fcf3ce44SJohn Forte */ 4560*291a2b48SSukumar Swaminathan #define SLI_MGMT_GRHL 0x100 /* Get registered HBA list */ 4561*291a2b48SSukumar Swaminathan #define SLI_MGMT_GHAT 0x101 /* Get HBA attributes */ 4562*291a2b48SSukumar Swaminathan #define SLI_MGMT_GRPL 0x102 /* Get registered Port list */ 4563*291a2b48SSukumar Swaminathan #define SLI_MGMT_GPAT 0x110 /* Get Port attributes */ 4564*291a2b48SSukumar Swaminathan #define SLI_MGMT_RHBA 0x200 /* Register HBA */ 4565*291a2b48SSukumar Swaminathan #define SLI_MGMT_RHAT 0x201 /* Register HBA atttributes */ 4566*291a2b48SSukumar Swaminathan #define SLI_MGMT_RPRT 0x210 /* Register Port */ 4567*291a2b48SSukumar Swaminathan #define SLI_MGMT_RPA 0x211 /* Register Port attributes */ 4568*291a2b48SSukumar Swaminathan #define SLI_MGMT_DHBA 0x300 /* De-register HBA */ 4569*291a2b48SSukumar Swaminathan #define SLI_MGMT_DPRT 0x310 /* De-register Port */ 4570fcf3ce44SJohn Forte 4571fcf3ce44SJohn Forte /* 4572fcf3ce44SJohn Forte * Management Service Subtypes 4573fcf3ce44SJohn Forte */ 4574*291a2b48SSukumar Swaminathan #define SLI_CT_FDMI_Subtypes 0x10 4575fcf3ce44SJohn Forte 4576fcf3ce44SJohn Forte 4577fcf3ce44SJohn Forte /* 4578fcf3ce44SJohn Forte * HBA Management Service Reject Code 4579fcf3ce44SJohn Forte */ 4580*291a2b48SSukumar Swaminathan #define REJECT_CODE 0x9 /* Unable to perform command request */ 4581fcf3ce44SJohn Forte 4582fcf3ce44SJohn Forte /* 4583fcf3ce44SJohn Forte * HBA Management Service Reject Reason Code 4584fcf3ce44SJohn Forte * Please refer to the Reason Codes above 4585fcf3ce44SJohn Forte */ 4586fcf3ce44SJohn Forte 4587fcf3ce44SJohn Forte /* 4588fcf3ce44SJohn Forte * HBA Attribute Types 4589fcf3ce44SJohn Forte */ 4590*291a2b48SSukumar Swaminathan #define NODE_NAME 0x1 4591*291a2b48SSukumar Swaminathan #define MANUFACTURER 0x2 4592*291a2b48SSukumar Swaminathan #define SERIAL_NUMBER 0x3 4593*291a2b48SSukumar Swaminathan #define MODEL 0x4 4594*291a2b48SSukumar Swaminathan #define MODEL_DESCRIPTION 0x5 4595*291a2b48SSukumar Swaminathan #define HARDWARE_VERSION 0x6 4596*291a2b48SSukumar Swaminathan #define DRIVER_VERSION 0x7 4597*291a2b48SSukumar Swaminathan #define OPTION_ROM_VERSION 0x8 4598*291a2b48SSukumar Swaminathan #define FIRMWARE_VERSION 0x9 4599*291a2b48SSukumar Swaminathan #define VENDOR_SPECIFIC 0xa 4600*291a2b48SSukumar Swaminathan #define DRV_NAME 0xb 4601*291a2b48SSukumar Swaminathan #define OS_NAME_VERSION 0xc 4602*291a2b48SSukumar Swaminathan #define MAX_CT_PAYLOAD_LEN 0xd 4603fcf3ce44SJohn Forte 4604fcf3ce44SJohn Forte /* 4605fcf3ce44SJohn Forte * Port Attrubute Types 4606fcf3ce44SJohn Forte */ 4607*291a2b48SSukumar Swaminathan #define SUPPORTED_FC4_TYPES 0x1 4608*291a2b48SSukumar Swaminathan #define SUPPORTED_SPEED 0x2 4609*291a2b48SSukumar Swaminathan #define PORT_SPEED 0x3 4610*291a2b48SSukumar Swaminathan #define MAX_FRAME_SIZE 0x4 4611*291a2b48SSukumar Swaminathan #define OS_DEVICE_NAME 0x5 4612*291a2b48SSukumar Swaminathan 4613*291a2b48SSukumar Swaminathan union AttributesDef 4614*291a2b48SSukumar Swaminathan { 4615fcf3ce44SJohn Forte /* Structure is in Big Endian format */ 4616*291a2b48SSukumar Swaminathan struct 4617*291a2b48SSukumar Swaminathan { 4618*291a2b48SSukumar Swaminathan uint32_t AttrType:16; 4619*291a2b48SSukumar Swaminathan uint32_t AttrLen:16; 4620fcf3ce44SJohn Forte } bits; 4621*291a2b48SSukumar Swaminathan uint32_t word; 4622fcf3ce44SJohn Forte }; 4623fcf3ce44SJohn Forte 4624fcf3ce44SJohn Forte /* 4625fcf3ce44SJohn Forte * HBA Attribute Entry (8 - 260 bytes) 4626fcf3ce44SJohn Forte */ 4627*291a2b48SSukumar Swaminathan typedef struct 4628*291a2b48SSukumar Swaminathan { 4629*291a2b48SSukumar Swaminathan union AttributesDef ad; 4630*291a2b48SSukumar Swaminathan union 4631*291a2b48SSukumar Swaminathan { 4632*291a2b48SSukumar Swaminathan uint32_t VendorSpecific; 4633*291a2b48SSukumar Swaminathan uint32_t SupportSpeed; 4634*291a2b48SSukumar Swaminathan uint32_t PortSpeed; 4635*291a2b48SSukumar Swaminathan uint32_t MaxFrameSize; 4636*291a2b48SSukumar Swaminathan uint32_t MaxCTPayloadLen; 4637*291a2b48SSukumar Swaminathan uint8_t SupportFC4Types[32]; 4638*291a2b48SSukumar Swaminathan uint8_t OsDeviceName[256]; 4639*291a2b48SSukumar Swaminathan uint8_t Manufacturer[64]; 4640*291a2b48SSukumar Swaminathan uint8_t SerialNumber[64]; 4641*291a2b48SSukumar Swaminathan uint8_t Model[256]; 4642*291a2b48SSukumar Swaminathan uint8_t ModelDescription[256]; 4643*291a2b48SSukumar Swaminathan uint8_t HardwareVersion[256]; 4644*291a2b48SSukumar Swaminathan uint8_t DriverVersion[256]; 4645*291a2b48SSukumar Swaminathan uint8_t OptionROMVersion[256]; 4646*291a2b48SSukumar Swaminathan uint8_t FirmwareVersion[256]; 4647*291a2b48SSukumar Swaminathan uint8_t DriverName[256]; 4648*291a2b48SSukumar Swaminathan NAME_TYPE NodeName; 4649fcf3ce44SJohn Forte } un; 4650fcf3ce44SJohn Forte } ATTRIBUTE_ENTRY, *PATTRIBUTE_ENTRY; 4651fcf3ce44SJohn Forte 4652fcf3ce44SJohn Forte 4653fcf3ce44SJohn Forte /* 4654fcf3ce44SJohn Forte * HBA Attribute Block 4655fcf3ce44SJohn Forte */ 4656*291a2b48SSukumar Swaminathan typedef struct 4657*291a2b48SSukumar Swaminathan { 4658*291a2b48SSukumar Swaminathan uint32_t EntryCnt; /* Number of HBA attribute entries */ 4659*291a2b48SSukumar Swaminathan ATTRIBUTE_ENTRY Entry; /* Variable-length array */ 4660fcf3ce44SJohn Forte } ATTRIBUTE_BLOCK, *PATTRIBUTE_BLOCK; 4661fcf3ce44SJohn Forte 4662fcf3ce44SJohn Forte 4663fcf3ce44SJohn Forte /* 4664fcf3ce44SJohn Forte * Port Entry 4665fcf3ce44SJohn Forte */ 4666*291a2b48SSukumar Swaminathan typedef struct 4667*291a2b48SSukumar Swaminathan { 4668*291a2b48SSukumar Swaminathan NAME_TYPE PortName; 4669fcf3ce44SJohn Forte } PORT_ENTRY, *PPORT_ENTRY; 4670fcf3ce44SJohn Forte 4671fcf3ce44SJohn Forte /* 4672fcf3ce44SJohn Forte * HBA Identifier 4673fcf3ce44SJohn Forte */ 4674*291a2b48SSukumar Swaminathan typedef struct 4675*291a2b48SSukumar Swaminathan { 4676*291a2b48SSukumar Swaminathan NAME_TYPE PortName; 4677fcf3ce44SJohn Forte } HBA_IDENTIFIER, *PHBA_IDENTIFIER; 4678fcf3ce44SJohn Forte 4679fcf3ce44SJohn Forte /* 4680fcf3ce44SJohn Forte * Registered Port List Format 4681fcf3ce44SJohn Forte */ 4682*291a2b48SSukumar Swaminathan typedef struct 4683*291a2b48SSukumar Swaminathan { 4684*291a2b48SSukumar Swaminathan uint32_t EntryCnt; 4685*291a2b48SSukumar Swaminathan PORT_ENTRY pe; /* Variable-length array */ 4686fcf3ce44SJohn Forte } REG_PORT_LIST, *PREG_PORT_LIST; 4687fcf3ce44SJohn Forte 4688fcf3ce44SJohn Forte /* 4689fcf3ce44SJohn Forte * Register HBA(RHBA) 4690fcf3ce44SJohn Forte */ 4691*291a2b48SSukumar Swaminathan typedef struct 4692*291a2b48SSukumar Swaminathan { 4693*291a2b48SSukumar Swaminathan HBA_IDENTIFIER hi; 4694*291a2b48SSukumar Swaminathan REG_PORT_LIST rpl; /* variable-length array */ 4695fcf3ce44SJohn Forte } REG_HBA, *PREG_HBA; 4696fcf3ce44SJohn Forte 4697fcf3ce44SJohn Forte /* 4698fcf3ce44SJohn Forte * Register HBA Attributes (RHAT) 4699fcf3ce44SJohn Forte */ 4700*291a2b48SSukumar Swaminathan typedef struct 4701*291a2b48SSukumar Swaminathan { 4702*291a2b48SSukumar Swaminathan NAME_TYPE HBA_PortName; 4703*291a2b48SSukumar Swaminathan ATTRIBUTE_BLOCK ab; 4704fcf3ce44SJohn Forte } REG_HBA_ATTRIBUTE, *PREG_HBA_ATTRIBUTE; 4705fcf3ce44SJohn Forte 4706fcf3ce44SJohn Forte /* 4707fcf3ce44SJohn Forte * Register Port Attributes (RPA) 4708fcf3ce44SJohn Forte */ 4709*291a2b48SSukumar Swaminathan typedef struct 4710*291a2b48SSukumar Swaminathan { 4711*291a2b48SSukumar Swaminathan NAME_TYPE HBA_PortName; 4712*291a2b48SSukumar Swaminathan NAME_TYPE PortName; 4713*291a2b48SSukumar Swaminathan ATTRIBUTE_BLOCK ab; 4714fcf3ce44SJohn Forte } REG_PORT_ATTRIBUTE, *PREG_PORT_ATTRIBUTE; 4715fcf3ce44SJohn Forte 4716fcf3ce44SJohn Forte /* 4717fcf3ce44SJohn Forte * Get Registered HBA List (GRHL) Accept Payload Format 4718fcf3ce44SJohn Forte */ 4719*291a2b48SSukumar Swaminathan typedef struct 4720*291a2b48SSukumar Swaminathan { 4721*291a2b48SSukumar Swaminathan uint32_t HBA__Entry_Cnt; /* Number of Registered HBA Ids */ 4722*291a2b48SSukumar Swaminathan NAME_TYPE HBA_PortName; /* Variable-length array */ 4723fcf3ce44SJohn Forte } GRHL_ACC_PAYLOAD, *PGRHL_ACC_PAYLOAD; 4724fcf3ce44SJohn Forte 4725fcf3ce44SJohn Forte /* 4726fcf3ce44SJohn Forte * Get Registered Port List (GRPL) Accept Payload Format 4727fcf3ce44SJohn Forte */ 4728*291a2b48SSukumar Swaminathan typedef struct 4729*291a2b48SSukumar Swaminathan { 4730*291a2b48SSukumar Swaminathan uint32_t RPL_Entry_Cnt; /* No of Reg Port Entries */ 4731*291a2b48SSukumar Swaminathan PORT_ENTRY eg_Port_Entry[1]; /* Variable-length array */ 4732fcf3ce44SJohn Forte } GRPL_ACC_PAYLOAD, *PGRPL_ACC_PAYLOAD; 4733fcf3ce44SJohn Forte 4734fcf3ce44SJohn Forte /* 4735fcf3ce44SJohn Forte * Get Port Attributes (GPAT) Accept Payload Format 4736fcf3ce44SJohn Forte */ 4737fcf3ce44SJohn Forte 4738*291a2b48SSukumar Swaminathan typedef struct 4739*291a2b48SSukumar Swaminathan { 4740*291a2b48SSukumar Swaminathan ATTRIBUTE_BLOCK pab; 4741fcf3ce44SJohn Forte } GPAT_ACC_PAYLOAD, *PGPAT_ACC_PAYLOAD; 4742fcf3ce44SJohn Forte 4743fcf3ce44SJohn Forte /* 4744fcf3ce44SJohn Forte * Use for Firmware DownLoad 4745fcf3ce44SJohn Forte */ 4746fcf3ce44SJohn Forte 4747*291a2b48SSukumar Swaminathan /* download.h */ 4748*291a2b48SSukumar Swaminathan 4749*291a2b48SSukumar Swaminathan #define REDUCED_SRAM_CFG 0x7FFFC /* 9802DC */ 4750*291a2b48SSukumar Swaminathan #define FULL_SRAM_CFG 0x13FFFC /* 9802 */ 4751*291a2b48SSukumar Swaminathan 4752*291a2b48SSukumar Swaminathan #define SLI_FW_TYPE_SHIFT(x) ((x << 20)) 4753*291a2b48SSukumar Swaminathan #define SLI_FW_ADAPTER_TYPE_MASK 0x00f00000 4754*291a2b48SSukumar Swaminathan #define SLI_FW_TYPE_6000 SLI_FW_TYPE_SHIFT(0) 4755*291a2b48SSukumar Swaminathan #define SLI_FW_TYPE_7000 SLI_FW_TYPE_SHIFT(1) 4756*291a2b48SSukumar Swaminathan #define SLI_FW_TYPE_8000 SLI_FW_TYPE_SHIFT(2) 4757*291a2b48SSukumar Swaminathan #define SLI_FW_TYPE_850 SLI_FW_TYPE_SHIFT(3) 4758*291a2b48SSukumar Swaminathan #define SLI_FW_TYPE_9000 SLI_FW_TYPE_SHIFT(4) 4759*291a2b48SSukumar Swaminathan #define SLI_FW_TYPE_950 SLI_FW_TYPE_SHIFT(5) 4760*291a2b48SSukumar Swaminathan #define SLI_FW_TYPE_9802 SLI_FW_TYPE_SHIFT(6) /* [022702] */ 4761*291a2b48SSukumar Swaminathan #define SLI_FW_TYPE_982 SLI_FW_TYPE_SHIFT(7) 4762*291a2b48SSukumar Swaminathan #define SLI_FW_TYPE_10000 SLI_FW_TYPE_SHIFT(8) 4763*291a2b48SSukumar Swaminathan #define SLI_FW_TYPE_1050 SLI_FW_TYPE_SHIFT(9) 4764*291a2b48SSukumar Swaminathan #define SLI_FW_TYPE_X1000 SLI_FW_TYPE_SHIFT(0xa) 4765*291a2b48SSukumar Swaminathan #define SLI_FW_TYPE_101 SLI_FW_TYPE_SHIFT(0xb) /* LP101 */ 4766*291a2b48SSukumar Swaminathan 4767*291a2b48SSukumar Swaminathan 4768*291a2b48SSukumar Swaminathan enum emlxs_prog_type 4769*291a2b48SSukumar Swaminathan { 4770fcf3ce44SJohn Forte TEST_PROGRAM, /* 0 */ 4771fcf3ce44SJohn Forte UTIL_PROGRAM, /* 1 */ 4772fcf3ce44SJohn Forte FUNC_FIRMWARE, /* 2 */ 4773fcf3ce44SJohn Forte BOOT_BIOS, /* 3 */ 4774fcf3ce44SJohn Forte CONFIG_DATA, /* 4 */ 4775fcf3ce44SJohn Forte SEQUENCER_CODE, /* 5 */ 4776fcf3ce44SJohn Forte SLI1_OVERLAY, /* 6 */ 4777fcf3ce44SJohn Forte SLI2_OVERLAY, /* 7 */ 4778fcf3ce44SJohn Forte GASKET, /* 8 */ 4779fcf3ce44SJohn Forte HARDWARE_IMAGE, /* 9 */ 4780fcf3ce44SJohn Forte SBUS_FCODE, /* A */ 4781fcf3ce44SJohn Forte SLI3_OVERLAY, /* B */ 4782fcf3ce44SJohn Forte RESERVED_C, 4783fcf3ce44SJohn Forte RESERVED_D, 4784fcf3ce44SJohn Forte SLI4_OVERLAY, /* E */ 4785fcf3ce44SJohn Forte KERNEL_CODE, /* F */ 4786fcf3ce44SJohn Forte MAX_PROG_TYPES 4787fcf3ce44SJohn Forte } emlxs_prog_type_t; 4788fcf3ce44SJohn Forte 4789fcf3ce44SJohn Forte 4790*291a2b48SSukumar Swaminathan typedef struct emlxs_fw_file 4791*291a2b48SSukumar Swaminathan { 4792*291a2b48SSukumar Swaminathan uint32_t version; 4793*291a2b48SSukumar Swaminathan uint32_t revcomp; 4794*291a2b48SSukumar Swaminathan char label[16]; 4795*291a2b48SSukumar Swaminathan uint32_t offset; 4796fcf3ce44SJohn Forte } emlxs_fw_file_t; 4797fcf3ce44SJohn Forte 4798*291a2b48SSukumar Swaminathan typedef struct emlxs_fw_image 4799*291a2b48SSukumar Swaminathan { 4800fcf3ce44SJohn Forte emlxs_fw_file_t awc; 4801fcf3ce44SJohn Forte emlxs_fw_file_t bwc; 4802fcf3ce44SJohn Forte emlxs_fw_file_t dwc; 4803fcf3ce44SJohn Forte emlxs_fw_file_t prog[MAX_PROG_TYPES]; 4804fcf3ce44SJohn Forte } emlxs_fw_image_t; 4805fcf3ce44SJohn Forte 4806fcf3ce44SJohn Forte 4807fcf3ce44SJohn Forte 4808fcf3ce44SJohn Forte 4809*291a2b48SSukumar Swaminathan #define NOP_IMAGE_TYPE 0xe1a00000 4810fcf3ce44SJohn Forte 4811*291a2b48SSukumar Swaminathan #define FLASH_BASE_ADR 0x01400000 4812*291a2b48SSukumar Swaminathan #define DL_FROM_SLIM_OFFSET MBOX_EXTENSION_OFFSET 4813fcf3ce44SJohn Forte 4814fcf3ce44SJohn Forte #ifdef MBOX_EXT_SUPPORT 4815*291a2b48SSukumar Swaminathan #define DL_SLIM_SEG_BYTE_COUNT MBOX_EXTENSION_SIZE 4816fcf3ce44SJohn Forte #else 4817*291a2b48SSukumar Swaminathan #define DL_SLIM_SEG_BYTE_COUNT 128 4818*291a2b48SSukumar Swaminathan #endif /* MBOX_EXT_SUPPORT */ 4819*291a2b48SSukumar Swaminathan 4820*291a2b48SSukumar Swaminathan #define SLI_CKSUM_LENGTH 4 4821*291a2b48SSukumar Swaminathan #define SLI_CKSUM_SEED 0x55555555 4822*291a2b48SSukumar Swaminathan #define SLI_CKSUM_ERR 0x1982abcd 4823*291a2b48SSukumar Swaminathan 4824*291a2b48SSukumar Swaminathan #define AIF_NOOP 0xe1a00000 4825*291a2b48SSukumar Swaminathan #define AIF_BLAL 0xeb000000 4826*291a2b48SSukumar Swaminathan #define OS_EXIT 0xef000011 4827*291a2b48SSukumar Swaminathan #define OS_GETENV 0xef000010 4828*291a2b48SSukumar Swaminathan #define AIF_IMAGEBASE 0x00008000 4829*291a2b48SSukumar Swaminathan #define AIF_BLZINIT 0xeb00000c 4830*291a2b48SSukumar Swaminathan #define DEBUG_TASK 0xef041d41 4831*291a2b48SSukumar Swaminathan #define AIF_DBG_SRC 2 4832*291a2b48SSukumar Swaminathan #define AIF_DBG_LL 1 4833*291a2b48SSukumar Swaminathan #define AIF_DATABASAT 0x100 4834*291a2b48SSukumar Swaminathan 4835*291a2b48SSukumar Swaminathan #define JEDEC_ID_ADDRESS 0x0080001c 4836*291a2b48SSukumar Swaminathan #define MAX_RBUS_SRAM_SIZE_ADR 0x788 4837*291a2b48SSukumar Swaminathan #define MAX_IBUS_SRAM_SIZE_ADR 0x78c 4838*291a2b48SSukumar Swaminathan #define FULL_RBUS_SRAM_CFG 0x7fffc 4839*291a2b48SSukumar Swaminathan #define FULL_IBUS_SRAM_CFG 0x187fffc 4840*291a2b48SSukumar Swaminathan #define REDUCED_RBUS_SRAM_CFG 0x5fffc 4841*291a2b48SSukumar Swaminathan #define REDUCED_IBUS_SRAM_CFG 0x183fffc 4842*291a2b48SSukumar Swaminathan 4843*291a2b48SSukumar Swaminathan #define FULL_SRAM_CFG_PROG_ID 1 4844*291a2b48SSukumar Swaminathan #define REDUCED_SRAM_CFG_PROG_ID 2 4845*291a2b48SSukumar Swaminathan #define OTHER_SRAM_CFG_PROG_ID 3 4846*291a2b48SSukumar Swaminathan 4847*291a2b48SSukumar Swaminathan #define NO_FLASH_MEM_AVAIL 0xf1 4848*291a2b48SSukumar Swaminathan 4849*291a2b48SSukumar Swaminathan #define PROG_TYPE_MASK 0xff000000 4850*291a2b48SSukumar Swaminathan #define PROG_TYPE_SHIFT 24 4851*291a2b48SSukumar Swaminathan 4852*291a2b48SSukumar Swaminathan #define FLASH_LOAD_LIST_ADR 0x79c 4853*291a2b48SSukumar Swaminathan #define RAM_LOAD_ENTRY_SIZE 9 4854*291a2b48SSukumar Swaminathan #define FLASH_LOAD_ENTRY_SIZE 6 4855*291a2b48SSukumar Swaminathan #define RAM_LOAD_ENTRY_TYPE 0 4856*291a2b48SSukumar Swaminathan #define FLASH_LOAD_ENTRY_TYPE 1 4857*291a2b48SSukumar Swaminathan 4858*291a2b48SSukumar Swaminathan #define CFG_DATA_NO_REGION -3 4859*291a2b48SSukumar Swaminathan 4860*291a2b48SSukumar Swaminathan #define SLI_IMAGE_START 0x20080 4861*291a2b48SSukumar Swaminathan #define SLI_VERSION_LOC 0x270 4862fcf3ce44SJohn Forte 4863fcf3ce44SJohn Forte /* def for new 2MB Flash (Pegasus ...) */ 4864fcf3ce44SJohn Forte #define MBX_LOAD_AREA 0x81 4865fcf3ce44SJohn Forte #define MBX_LOAD_EXP_ROM 0x9C 4866fcf3ce44SJohn Forte 4867fcf3ce44SJohn Forte #define FILE_TYPE_AWC 0xE1A01001 4868fcf3ce44SJohn Forte #define FILE_TYPE_DWC 0xE1A02002 4869fcf3ce44SJohn Forte #define FILE_TYPE_BWC 0xE1A03003 4870fcf3ce44SJohn Forte 4871fcf3ce44SJohn Forte #define AREA_ID_MASK 0xFFFFFF0F 4872fcf3ce44SJohn Forte #define AREA_ID_AWC 0x00000001 4873fcf3ce44SJohn Forte #define AREA_ID_DWC 0x00000002 4874fcf3ce44SJohn Forte #define AREA_ID_BWC 0x00000003 4875fcf3ce44SJohn Forte 4876fcf3ce44SJohn Forte #define CMD_START_ERASE 1 4877fcf3ce44SJohn Forte #define CMD_CONTINUE_ERASE 2 4878fcf3ce44SJohn Forte #define CMD_DOWNLOAD 3 4879fcf3ce44SJohn Forte #define CMD_END_DOWNLOAD 4 4880fcf3ce44SJohn Forte 4881fcf3ce44SJohn Forte #define RSP_ERASE_STARTED 1 4882fcf3ce44SJohn Forte #define RSP_ERASE_COMPLETE 2 4883fcf3ce44SJohn Forte #define RSP_DOWNLOAD_MORE 3 4884fcf3ce44SJohn Forte #define RSP_DOWNLOAD_DONE 4 4885fcf3ce44SJohn Forte 4886fcf3ce44SJohn Forte #define EROM_CMD_FIND_IMAGE 8 4887fcf3ce44SJohn Forte #define EROM_CMD_CONTINUE_ERASE 9 4888fcf3ce44SJohn Forte #define EROM_CMD_COPY 10 4889fcf3ce44SJohn Forte 4890fcf3ce44SJohn Forte #define EROM_RSP_ERASE_STARTED 8 4891fcf3ce44SJohn Forte #define EROM_RSP_ERASE_COMPLETE 9 4892fcf3ce44SJohn Forte #define EROM_RSP_COPY_MORE 10 4893fcf3ce44SJohn Forte #define EROM_RSP_COPY_DONE 11 4894fcf3ce44SJohn Forte 4895*291a2b48SSukumar Swaminathan #define ALLext 1 4896*291a2b48SSukumar Swaminathan #define DWCext 2 4897*291a2b48SSukumar Swaminathan #define BWCext 3 4898fcf3ce44SJohn Forte 4899*291a2b48SSukumar Swaminathan #define NO_ALL 0 4900fcf3ce44SJohn Forte #define ALL_WITHOUT_BWC 1 4901fcf3ce44SJohn Forte #define ALL_WITH_BWC 2 4902fcf3ce44SJohn Forte 4903fcf3ce44SJohn Forte #define KERNEL_START_ADDRESS 0x000000 4904fcf3ce44SJohn Forte #define DOWNLOAD_START_ADDRESS 0x040000 4905fcf3ce44SJohn Forte #define EXP_ROM_START_ADDRESS 0x180000 4906fcf3ce44SJohn Forte #define SCRATCH_START_ADDRESS 0x1C0000 4907fcf3ce44SJohn Forte #define CONFIG_START_ADDRESS 0x1E0000 4908fcf3ce44SJohn Forte 4909fcf3ce44SJohn Forte 4910*291a2b48SSukumar Swaminathan typedef struct SliAifHdr 4911*291a2b48SSukumar Swaminathan { 4912*291a2b48SSukumar Swaminathan uint32_t CompressBr; 4913*291a2b48SSukumar Swaminathan uint32_t RelocBr; 4914*291a2b48SSukumar Swaminathan uint32_t ZinitBr; 4915*291a2b48SSukumar Swaminathan uint32_t EntryBr; 4916*291a2b48SSukumar Swaminathan uint32_t Area_ID; 4917*291a2b48SSukumar Swaminathan uint32_t RoSize; 4918*291a2b48SSukumar Swaminathan uint32_t RwSize; 4919*291a2b48SSukumar Swaminathan uint32_t DbgSize; 4920*291a2b48SSukumar Swaminathan uint32_t ZinitSize; 4921*291a2b48SSukumar Swaminathan uint32_t DbgType; 4922*291a2b48SSukumar Swaminathan uint32_t ImageBase; 4923*291a2b48SSukumar Swaminathan uint32_t Area_Size; 4924*291a2b48SSukumar Swaminathan uint32_t AddressMode; 4925*291a2b48SSukumar Swaminathan uint32_t DataBase; 4926*291a2b48SSukumar Swaminathan uint32_t AVersion; 4927*291a2b48SSukumar Swaminathan uint32_t Spare2; 4928*291a2b48SSukumar Swaminathan uint32_t DebugSwi; 4929*291a2b48SSukumar Swaminathan uint32_t ZinitCode[15]; 4930fcf3ce44SJohn Forte } AIF_HDR, *PAIF_HDR; 4931fcf3ce44SJohn Forte 4932*291a2b48SSukumar Swaminathan typedef struct ImageHdr 4933*291a2b48SSukumar Swaminathan { 4934*291a2b48SSukumar Swaminathan uint32_t BlockSize; 4935*291a2b48SSukumar Swaminathan PROG_ID Id; 4936*291a2b48SSukumar Swaminathan uint32_t Flags; 4937*291a2b48SSukumar Swaminathan uint32_t EntryAdr; 4938*291a2b48SSukumar Swaminathan uint32_t InitAdr; 4939*291a2b48SSukumar Swaminathan uint32_t ExitAdr; 4940*291a2b48SSukumar Swaminathan uint32_t ImageBase; 4941*291a2b48SSukumar Swaminathan uint32_t ImageSize; 4942*291a2b48SSukumar Swaminathan uint32_t ZinitSize; 4943*291a2b48SSukumar Swaminathan uint32_t RelocSize; 4944*291a2b48SSukumar Swaminathan uint32_t HdrCks; 4945fcf3ce44SJohn Forte } IMAGE_HDR, *PIMAGE_HDR; 4946fcf3ce44SJohn Forte 4947fcf3ce44SJohn Forte 4948fcf3ce44SJohn Forte 4949*291a2b48SSukumar Swaminathan typedef struct 4950*291a2b48SSukumar Swaminathan { 4951*291a2b48SSukumar Swaminathan PROG_ID prog_id; 4952fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 4953*291a2b48SSukumar Swaminathan uint32_t pci_cfg_rsvd:27; 4954*291a2b48SSukumar Swaminathan uint32_t use_hdw_def:1; 4955*291a2b48SSukumar Swaminathan uint32_t pci_cfg_sel:3; 4956*291a2b48SSukumar Swaminathan uint32_t pci_cfg_lookup_sel:1; 4957fcf3ce44SJohn Forte #endif 4958fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 4959*291a2b48SSukumar Swaminathan uint32_t pci_cfg_lookup_sel:1; 4960*291a2b48SSukumar Swaminathan uint32_t pci_cfg_sel:3; 4961*291a2b48SSukumar Swaminathan uint32_t use_hdw_def:1; 4962*291a2b48SSukumar Swaminathan uint32_t pci_cfg_rsvd:27; 4963*291a2b48SSukumar Swaminathan #endif 4964*291a2b48SSukumar Swaminathan union 4965*291a2b48SSukumar Swaminathan { 4966*291a2b48SSukumar Swaminathan PROG_ID boot_bios_id; 4967*291a2b48SSukumar Swaminathan uint32_t boot_bios_wd[2]; 4968fcf3ce44SJohn Forte } u0; 4969*291a2b48SSukumar Swaminathan PROG_ID sli1_prog_id; 4970*291a2b48SSukumar Swaminathan PROG_ID sli2_prog_id; 4971*291a2b48SSukumar Swaminathan PROG_ID sli3_prog_id; 4972*291a2b48SSukumar Swaminathan PROG_ID sli4_prog_id; 4973*291a2b48SSukumar Swaminathan union 4974*291a2b48SSukumar Swaminathan { 4975*291a2b48SSukumar Swaminathan PROG_ID EROM_prog_id; 4976*291a2b48SSukumar Swaminathan uint32_t EROM_prog_wd[2]; 4977fcf3ce44SJohn Forte } u1; 4978fcf3ce44SJohn Forte } WAKE_UP_PARMS, *PWAKE_UP_PARMS; 4979fcf3ce44SJohn Forte 4980fcf3ce44SJohn Forte 4981*291a2b48SSukumar Swaminathan #define PROG_DESCR_STR_LEN 24 4982*291a2b48SSukumar Swaminathan #define MAX_LOAD_ENTRY 10 4983fcf3ce44SJohn Forte 4984*291a2b48SSukumar Swaminathan typedef struct 4985*291a2b48SSukumar Swaminathan { 4986*291a2b48SSukumar Swaminathan uint32_t next; 4987*291a2b48SSukumar Swaminathan uint32_t prev; 4988*291a2b48SSukumar Swaminathan uint32_t start_adr; 4989*291a2b48SSukumar Swaminathan uint32_t len; 4990*291a2b48SSukumar Swaminathan union 4991*291a2b48SSukumar Swaminathan { 4992*291a2b48SSukumar Swaminathan PROG_ID id; 4993*291a2b48SSukumar Swaminathan uint32_t wd[2]; 4994fcf3ce44SJohn Forte } un; 4995*291a2b48SSukumar Swaminathan uint8_t prog_descr[PROG_DESCR_STR_LEN]; 4996fcf3ce44SJohn Forte } LOAD_ENTRY; 4997fcf3ce44SJohn Forte 4998*291a2b48SSukumar Swaminathan typedef struct 4999*291a2b48SSukumar Swaminathan { 5000*291a2b48SSukumar Swaminathan uint32_t head; 5001*291a2b48SSukumar Swaminathan uint32_t tail; 5002*291a2b48SSukumar Swaminathan uint32_t entry_cnt; 5003*291a2b48SSukumar Swaminathan LOAD_ENTRY load_entry[MAX_LOAD_ENTRY]; 5004fcf3ce44SJohn Forte } LOAD_LIST; 5005fcf3ce44SJohn Forte 5006fcf3ce44SJohn Forte 5007fcf3ce44SJohn Forte 5008*291a2b48SSukumar Swaminathan #define SLI_HW_REVISION_CHECK(x, y) ((x & 0xf0) == y) 5009*291a2b48SSukumar Swaminathan #define SLI_FCODE_REVISION_CHECK(x, y) (x == y) 5010fcf3ce44SJohn Forte 5011fcf3ce44SJohn Forte 5012fcf3ce44SJohn Forte #ifdef __cplusplus 5013fcf3ce44SJohn Forte } 5014fcf3ce44SJohn Forte #endif 5015fcf3ce44SJohn Forte 5016fcf3ce44SJohn Forte #endif /* _EMLXS_HW_H */ 5017