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 * 8*8f23e9faSHans Rosenfeld * You can obtain a copy of the license at 9*8f23e9faSHans Rosenfeld * http://www.opensource.org/licenses/cddl1.txt. 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*8f23e9faSHans Rosenfeld * Copyright (c) 2004-2011 Emulex. All rights reserved. 2482527734SSukumar Swaminathan * Use is subject to license terms. 25fcf3ce44SJohn Forte */ 26fcf3ce44SJohn Forte 27fcf3ce44SJohn Forte #ifndef _EMLXS_MENLO_H 28fcf3ce44SJohn Forte #define _EMLXS_MENLO_H 29fcf3ce44SJohn Forte 30fcf3ce44SJohn Forte #ifdef __cplusplus 31fcf3ce44SJohn Forte extern "C" { 32fcf3ce44SJohn Forte #endif 33fcf3ce44SJohn Forte 34fcf3ce44SJohn Forte #ifdef MENLO_SUPPORT 35fcf3ce44SJohn Forte 36fcf3ce44SJohn Forte /* 37291a2b48SSukumar Swaminathan * COMMANDS 38fcf3ce44SJohn Forte */ 39fcf3ce44SJohn Forte 40291a2b48SSukumar Swaminathan typedef struct menlo_init_cmd 41291a2b48SSukumar Swaminathan { 42291a2b48SSukumar Swaminathan uint32_t code; /* Command code = MENLO_CMD_INITIALIZE */ 43fcf3ce44SJohn Forte uint32_t bb_credit; /* Menlo FC BB Credit */ 44fcf3ce44SJohn Forte uint32_t frame_size; /* Menlo FC receive frame size */ 45fcf3ce44SJohn Forte 46fcf3ce44SJohn Forte } menlo_init_cmd_t; 47fcf3ce44SJohn Forte 48fcf3ce44SJohn Forte 49291a2b48SSukumar Swaminathan typedef struct menlo_fw_download_cmd 50291a2b48SSukumar Swaminathan { 51291a2b48SSukumar Swaminathan uint32_t code; /* Command code = MENLO_CMD_FW_DOWNLOAD */ 52291a2b48SSukumar Swaminathan uint32_t length; /* Firmware image length in bytes */ 53291a2b48SSukumar Swaminathan /* (4 byte aligned) */ 54291a2b48SSukumar Swaminathan uint32_t type; /* Firmware image type */ 55fcf3ce44SJohn Forte 56fcf3ce44SJohn Forte #define MENLO_IMAGE_TYPE_OP 1 57fcf3ce44SJohn Forte #define MENLO_IMAGE_TYPE_DIAG 2 58fcf3ce44SJohn Forte 59fcf3ce44SJohn Forte /* Followed by length bytes of firmware image */ 60fcf3ce44SJohn Forte /* Firmware image will be in Little Endian format */ 61fcf3ce44SJohn Forte 62fcf3ce44SJohn Forte } menlo_fw_download_cmd_t; 63fcf3ce44SJohn Forte 64fcf3ce44SJohn Forte 65291a2b48SSukumar Swaminathan typedef struct menlo_memory_cmd 66291a2b48SSukumar Swaminathan { 67291a2b48SSukumar Swaminathan uint32_t code; /* Command code */ 68fcf3ce44SJohn Forte uint32_t address; /* Menlo memory address */ 69fcf3ce44SJohn Forte uint32_t length; /* Number of words */ 70fcf3ce44SJohn Forte 71fcf3ce44SJohn Forte } menlo_memory_cmd_t; 72fcf3ce44SJohn Forte 73fcf3ce44SJohn Forte 74291a2b48SSukumar Swaminathan typedef struct menlo_fte_insert_cmd 75291a2b48SSukumar Swaminathan { 76291a2b48SSukumar Swaminathan uint32_t code; /* Command code = MENLO_CMD_FTE_INSERT */ 77291a2b48SSukumar Swaminathan uint32_t mask; /* mask = True or False */ 78fcf3ce44SJohn Forte 79fcf3ce44SJohn Forte #define MENLO_SRC_MASK_FALSE 0 80fcf3ce44SJohn Forte #define MENLO_SRC_MASK_TRUE 1 81fcf3ce44SJohn Forte 82291a2b48SSukumar Swaminathan uint32_t fcid; /* FCID of remote port */ 83fcf3ce44SJohn Forte uint8_t wwpn[8]; /* WWPN of remote port */ 84fcf3ce44SJohn Forte 85fcf3ce44SJohn Forte } menlo_fte_insert_cmd_t; 86fcf3ce44SJohn Forte 87fcf3ce44SJohn Forte 88291a2b48SSukumar Swaminathan typedef struct menlo_fte_delete_cmd 89291a2b48SSukumar Swaminathan { 90291a2b48SSukumar Swaminathan uint32_t code; /* Command code = MENLO_CMD_FTE_DELETE */ 91291a2b48SSukumar Swaminathan uint32_t fcid; /* FCID of remote port */ 92fcf3ce44SJohn Forte uint8_t wwpn[8]; /* WWPN of remote port */ 93fcf3ce44SJohn Forte 94fcf3ce44SJohn Forte } menlo_fte_delete_cmd_t; 95fcf3ce44SJohn Forte 96fcf3ce44SJohn Forte 97291a2b48SSukumar Swaminathan typedef struct menlo_get_cmd 98291a2b48SSukumar Swaminathan { 99291a2b48SSukumar Swaminathan uint32_t code; /* Command code */ 100fcf3ce44SJohn Forte uint32_t context; /* Context */ 101fcf3ce44SJohn Forte 102fcf3ce44SJohn Forte /* MENLO_CMD_GET_PORT_STATS */ 103fcf3ce44SJohn Forte #define MENLO_PORT_ETH0 0 104fcf3ce44SJohn Forte #define MENLO_PORT_ETH1 1 105fcf3ce44SJohn Forte #define MENLO_PORT_NSL0 2 106fcf3ce44SJohn Forte #define MENLO_PORT_NSL1 3 107fcf3ce44SJohn Forte #define MENLO_PORT_FC0 4 108fcf3ce44SJohn Forte #define MENLO_PORT_FC1 5 109fcf3ce44SJohn Forte 110fcf3ce44SJohn Forte /* MENLO_CMD_GET_LIF_STATS */ 111fcf3ce44SJohn Forte #define MENLO_LIF_ETH0 0 112fcf3ce44SJohn Forte #define MENLO_LIF_ETH1 1 113fcf3ce44SJohn Forte #define MENLO_LIF_FC0 2 114fcf3ce44SJohn Forte #define MENLO_LIF_FC1 3 115fcf3ce44SJohn Forte 116fcf3ce44SJohn Forte /* MENLO_CMD_GET_LB_MODE */ 117fcf3ce44SJohn Forte #define MENLO_NSL_PORT_ID_0 0 118fcf3ce44SJohn Forte #define MENLO_NSL_PORT_ID_1 1 119fcf3ce44SJohn Forte 120fcf3ce44SJohn Forte uint32_t length; /* Max response length */ 121fcf3ce44SJohn Forte 122fcf3ce44SJohn Forte } menlo_get_cmd_t; 123fcf3ce44SJohn Forte 124fcf3ce44SJohn Forte 125291a2b48SSukumar Swaminathan typedef struct menlo_set_cmd 126291a2b48SSukumar Swaminathan { 127291a2b48SSukumar Swaminathan uint32_t code; /* Command code = MENLO_CMD_SET_PAUSE */ 128fcf3ce44SJohn Forte uint32_t value1; /* value1 */ 129fcf3ce44SJohn Forte uint32_t value2; /* value2 */ 130fcf3ce44SJohn Forte 131fcf3ce44SJohn Forte /* MENLO_CMD_SET_PAUSE values */ 132291a2b48SSukumar Swaminathan #define MENLO_PAUSE_TYPE_SP 1 133fcf3ce44SJohn Forte #define MENLO_PAUSE_TYPE_PPP 2 134fcf3ce44SJohn Forte 135291a2b48SSukumar Swaminathan /* PPP Priority bits : [ ][ ][ ][ ][X][ ][ ][ ] */ 136291a2b48SSukumar Swaminathan /* COS : 7 6 5 4 3 2 1 0 */ 137fcf3ce44SJohn Forte #define MENLO_PPP_COS0 0x01 138fcf3ce44SJohn Forte #define MENLO_PPP_COS1 0x02 139fcf3ce44SJohn Forte #define MENLO_PPP_COS2 0x04 140fcf3ce44SJohn Forte #define MENLO_PPP_COS3 0x08 141fcf3ce44SJohn Forte #define MENLO_PPP_COS4 0x10 142fcf3ce44SJohn Forte #define MENLO_PPP_COS5 0x20 143fcf3ce44SJohn Forte #define MENLO_PPP_COS6 0x40 144fcf3ce44SJohn Forte #define MENLO_PPP_COS7 0x80 145fcf3ce44SJohn Forte 146fcf3ce44SJohn Forte /* MENLO_CMD_SET_FCOE_COS values */ 147fcf3ce44SJohn Forte #define MENLO_FCOE_COS 3 148fcf3ce44SJohn Forte 149fcf3ce44SJohn Forte /* MENLO_CMD_SET_UIF_PORT_TYPE values */ 150fcf3ce44SJohn Forte #define MENLO_PORT_TYPE_ACCESS 1 151fcf3ce44SJohn Forte #define MENLO_PORT_TYPE_TRUNK 2 152fcf3ce44SJohn Forte 153fcf3ce44SJohn Forte /* MENLO_CMD_SET_MODE values */ 154fcf3ce44SJohn Forte #define MENLO_MAINTENANCE_MODE_DISABLE 0 155fcf3ce44SJohn Forte #define MENLO_MAINTENANCE_MODE_ENABLE 1 156fcf3ce44SJohn Forte 157fcf3ce44SJohn Forte } menlo_set_cmd_t; 158fcf3ce44SJohn Forte 159fcf3ce44SJohn Forte 160291a2b48SSukumar Swaminathan typedef struct menlo_loopback_cmd 161291a2b48SSukumar Swaminathan { 162291a2b48SSukumar Swaminathan uint32_t code; /* Command code = MENLO_CMD_LOOPBACK */ 163fcf3ce44SJohn Forte uint32_t context; /* context = NSL port 0 or 1 */ 164fcf3ce44SJohn Forte 165fcf3ce44SJohn Forte #define MENLO_NSL_PORT_ID_0 0 166fcf3ce44SJohn Forte #define MENLO_NSL_PORT_ID_1 1 167fcf3ce44SJohn Forte 168291a2b48SSukumar Swaminathan uint32_t type; /* type = loopback mode enable or disable */ 169fcf3ce44SJohn Forte 170fcf3ce44SJohn Forte #define MENLO_LOOPBACK_DISABLE 0 171fcf3ce44SJohn Forte #define MENLO_LOOPBACK_ENABLE 1 172fcf3ce44SJohn Forte 173fcf3ce44SJohn Forte } menlo_loopback_cmd_t; 174fcf3ce44SJohn Forte 175fcf3ce44SJohn Forte 176291a2b48SSukumar Swaminathan typedef struct menlo_reset_cmd 177291a2b48SSukumar Swaminathan { 178291a2b48SSukumar Swaminathan uint32_t code; /* Command code = MENLO_CMD_RESET */ 179fcf3ce44SJohn Forte uint32_t firmware; 180fcf3ce44SJohn Forte 181fcf3ce44SJohn Forte #define MENLO_FW_OPERATIONAL 0 182fcf3ce44SJohn Forte #define MENLO_FW_GOLDEN 1 183fcf3ce44SJohn Forte 184fcf3ce44SJohn Forte } menlo_reset_cmd_t; 185fcf3ce44SJohn Forte 186291a2b48SSukumar Swaminathan typedef struct menlo_fru_data_cmd 187291a2b48SSukumar Swaminathan { 188291a2b48SSukumar Swaminathan uint32_t code; /* Response code */ 189fcf3ce44SJohn Forte uint8_t mac0[8]; /* MAC address of port 0 */ 190fcf3ce44SJohn Forte uint8_t mac1[8]; /* MAC address of port 1 */ 191fcf3ce44SJohn Forte uint32_t flags; 192fcf3ce44SJohn Forte 193fcf3ce44SJohn Forte /* Valid flags */ 194fcf3ce44SJohn Forte #define MENLO_FLAG_SINGLE_CHANNEL 0x00000001 195fcf3ce44SJohn Forte #define MENLO_FLAG_DUAL_CHANNEL 0x00000002 196fcf3ce44SJohn Forte 197fcf3ce44SJohn Forte } menlo_fru_data_cmd_t; 198fcf3ce44SJohn Forte 199fcf3ce44SJohn Forte 200291a2b48SSukumar Swaminathan typedef struct menlo_diag_cmd 201291a2b48SSukumar Swaminathan { 202291a2b48SSukumar Swaminathan uint32_t code; /* Response code */ 203fcf3ce44SJohn Forte uint32_t loop_count; /* loop_count = 0 indicates loop forever */ 204291a2b48SSukumar Swaminathan /* loop_count > 0 indicates number of test */ 205291a2b48SSukumar Swaminathan /* iterations */ 206291a2b48SSukumar Swaminathan /* NOTE : one test iteration takes */ 207291a2b48SSukumar Swaminathan /* approximately 2-3 seconds */ 208291a2b48SSukumar Swaminathan uint32_t test_bitmap; /* Each bit represents a separate test to be */ 209fcf3ce44SJohn Forte /* performed */ 210291a2b48SSukumar Swaminathan /* test_bitmap = 0 will result in a */ 211291a2b48SSukumar Swaminathan /* MENLO_ERR_INVALID_FLAG error */ 212fcf3ce44SJohn Forte } menlo_diag_cmd_t; 213fcf3ce44SJohn Forte 214fcf3ce44SJohn Forte 215291a2b48SSukumar Swaminathan /* Hornet 2 */ 216291a2b48SSukumar Swaminathan 217291a2b48SSukumar Swaminathan #define MAX_SUPPORTED_VLANS 4 218291a2b48SSukumar Swaminathan 219291a2b48SSukumar Swaminathan typedef struct fip_params 220291a2b48SSukumar Swaminathan { 221291a2b48SSukumar Swaminathan uint8_t sw_name[8]; /* Switch name */ 222291a2b48SSukumar Swaminathan uint8_t fabric_name[8]; /* Fabric name */ 223291a2b48SSukumar Swaminathan uint8_t sup_addr_mode; /* Support addressing modes */ 224291a2b48SSukumar Swaminathan 225291a2b48SSukumar Swaminathan /* FCoE Addressing Mode */ 226291a2b48SSukumar Swaminathan #define SPMA_ADDR_MODE 1 227291a2b48SSukumar Swaminathan #define FPMA_ADDR_MODE 2 228291a2b48SSukumar Swaminathan 229291a2b48SSukumar Swaminathan uint8_t pref_addr_mode; /* Preferred addressing modes */ 230291a2b48SSukumar Swaminathan uint16_t fcf_disc_tov; /* Discovery tmo period (multiple 500ms) */ 231291a2b48SSukumar Swaminathan uint16_t vlan_id[MAX_SUPPORTED_VLANS]; /* VLAN list */ 232291a2b48SSukumar Swaminathan 233291a2b48SSukumar Swaminathan } fip_params_t; 234291a2b48SSukumar Swaminathan 235291a2b48SSukumar Swaminathan typedef struct non_fip_params 236291a2b48SSukumar Swaminathan { 237291a2b48SSukumar Swaminathan uint32_t fc_map; /* Configured FC_MAP */ 238291a2b48SSukumar Swaminathan 239291a2b48SSukumar Swaminathan } non_fip_params_t; 240291a2b48SSukumar Swaminathan 241291a2b48SSukumar Swaminathan typedef union menlo_fcoe_params 242291a2b48SSukumar Swaminathan { 243291a2b48SSukumar Swaminathan fip_params_t fip; /* FIP specific parameters */ 244291a2b48SSukumar Swaminathan non_fip_params_t non_fip; /* Non-FIP specific parameters */ 245291a2b48SSukumar Swaminathan } menlo_fcoe_params_t; 246291a2b48SSukumar Swaminathan 247291a2b48SSukumar Swaminathan typedef struct menlo_set_fcoe_params_cmd 248291a2b48SSukumar Swaminathan { 249291a2b48SSukumar Swaminathan uint32_t code; /* Command code=MENLO_CMD_SET_FCOE_PARAMS */ 250291a2b48SSukumar Swaminathan uint32_t fcoe_mode; /* FIP or Non-FIP */ 251291a2b48SSukumar Swaminathan 252291a2b48SSukumar Swaminathan /* FCoE Operation Mode */ 253291a2b48SSukumar Swaminathan #define FCOE_MODE_NON_FIP 0 254291a2b48SSukumar Swaminathan #define FCOE_MODE_FIP 1 255291a2b48SSukumar Swaminathan 256291a2b48SSukumar Swaminathan uint32_t lport_id; /* Logical port identification */ 257291a2b48SSukumar Swaminathan menlo_fcoe_params_t params; /* Specific FCoE parameters */ 258291a2b48SSukumar Swaminathan 259291a2b48SSukumar Swaminathan } menlo_set_fcoe_params_cmd_t; 260291a2b48SSukumar Swaminathan 261291a2b48SSukumar Swaminathan 262291a2b48SSukumar Swaminathan typedef struct set_facl_cmd 263291a2b48SSukumar Swaminathan { 264291a2b48SSukumar Swaminathan uint32_t code; /* Command code = MENLO_CMD_SET_FACL */ 265291a2b48SSukumar Swaminathan uint32_t lport_id; /* Logical port identification */ 266291a2b48SSukumar Swaminathan uint32_t num_acls; /* Number of ACL entries */ 267291a2b48SSukumar Swaminathan uint32_t facl_list; /* List of returned Fabric ACL, facl_t */ 268291a2b48SSukumar Swaminathan } set_facl_cmd_t; 269291a2b48SSukumar Swaminathan 270291a2b48SSukumar Swaminathan typedef struct facl 271291a2b48SSukumar Swaminathan { 272291a2b48SSukumar Swaminathan uint8_t fabric_name[8]; /* Fabric name */ 273291a2b48SSukumar Swaminathan uint8_t sw_name[8]; /* Switch name */ 274291a2b48SSukumar Swaminathan uint32_t acc_ctrl; /* PERMIT or DENY */ 275291a2b48SSukumar Swaminathan } facl_t; 276291a2b48SSukumar Swaminathan 277291a2b48SSukumar Swaminathan typedef struct fcf_id 278291a2b48SSukumar Swaminathan { 279291a2b48SSukumar Swaminathan uint8_t sw_name[8]; /* Switch name */ 280291a2b48SSukumar Swaminathan uint8_t fabric_name[8]; /* Fabric name */ 281291a2b48SSukumar Swaminathan 282291a2b48SSukumar Swaminathan } fcf_id_t; 283291a2b48SSukumar Swaminathan 284291a2b48SSukumar Swaminathan typedef struct create_vl_cmd 285291a2b48SSukumar Swaminathan { 286291a2b48SSukumar Swaminathan uint32_t code; /* Command code = MENLO_CMD_CREATE_VL */ 287291a2b48SSukumar Swaminathan uint32_t lport_id; /* Logical port identification */ 288291a2b48SSukumar Swaminathan fcf_id_t fcf; /* Specific FCF */ 289291a2b48SSukumar Swaminathan 290291a2b48SSukumar Swaminathan } create_vl_cmd_t; 291291a2b48SSukumar Swaminathan 292291a2b48SSukumar Swaminathan typedef struct delete_vl_cmd 293291a2b48SSukumar Swaminathan { 294291a2b48SSukumar Swaminathan uint32_t code; /* Command code = MENLO_CMD_CREATE_VL */ 295291a2b48SSukumar Swaminathan uint32_t vl_handle; /* Handle of created VL */ 296291a2b48SSukumar Swaminathan 297291a2b48SSukumar Swaminathan } delete_vl_cmd_t; 298291a2b48SSukumar Swaminathan 299291a2b48SSukumar Swaminathan #define MAX_GROUPS 8 /* Max supported by hardware */ 300291a2b48SSukumar Swaminathan 301291a2b48SSukumar Swaminathan typedef struct menlo_pg_info 302291a2b48SSukumar Swaminathan { 303291a2b48SSukumar Swaminathan uint32_t num_pg; /* Number of PGs specified */ 304291a2b48SSukumar Swaminathan uint8_t pg_ids[MAX_GROUPS]; /* PG membership bitmaps */ 305291a2b48SSukumar Swaminathan uint8_t pg_bw[MAX_GROUPS]; /* BW for each PG in 10% gran. */ 306291a2b48SSukumar Swaminathan 307291a2b48SSukumar Swaminathan } menlo_pg_info_t; 308291a2b48SSukumar Swaminathan 309291a2b48SSukumar Swaminathan typedef struct menlo_set_pg_info_cmd 310291a2b48SSukumar Swaminathan { 311291a2b48SSukumar Swaminathan uint32_t code; /* Command code = MENLO_CMD_SET_PG */ 312291a2b48SSukumar Swaminathan menlo_pg_info_t pg_info; /* PG information */ 313291a2b48SSukumar Swaminathan 314291a2b48SSukumar Swaminathan } menlo_set_pg_info_cmd_t; 315291a2b48SSukumar Swaminathan 316291a2b48SSukumar Swaminathan 317291a2b48SSukumar Swaminathan typedef struct menlo_set_host_eth_pfc_flag 318291a2b48SSukumar Swaminathan { 319291a2b48SSukumar Swaminathan uint32_t code; /* Command code=MENLO_CMD_SET_HOST_ETH_PFC_FLAG */ 320291a2b48SSukumar Swaminathan uint32_t host_pfc_enable; /* 1 = PFC on Host if enabled */ 321291a2b48SSukumar Swaminathan 322291a2b48SSukumar Swaminathan /* Host PFC Flag Definitions */ 323291a2b48SSukumar Swaminathan #define MENLO_HOST_PFC_DISABLE 0x0 324291a2b48SSukumar Swaminathan #define MENLO_HOST_PFC_ENABLE 0x1 325291a2b48SSukumar Swaminathan 326291a2b48SSukumar Swaminathan } menlo_set_host_eth_pfc_flag_t; 327291a2b48SSukumar Swaminathan 328291a2b48SSukumar Swaminathan 329291a2b48SSukumar Swaminathan 330291a2b48SSukumar Swaminathan typedef union menlo_cmd 331291a2b48SSukumar Swaminathan { 332291a2b48SSukumar Swaminathan uint32_t word[5]; 333291a2b48SSukumar Swaminathan uint32_t code; /* Command code */ 334fcf3ce44SJohn Forte 335fcf3ce44SJohn Forte /* Command codes */ 336291a2b48SSukumar Swaminathan #define MENLO_CMD_INITIALIZE 0x00000001 337291a2b48SSukumar Swaminathan #define MENLO_CMD_FW_DOWNLOAD 0x00000002 338291a2b48SSukumar Swaminathan #define MENLO_CMD_READ_MEMORY 0x00000003 339291a2b48SSukumar Swaminathan #define MENLO_CMD_WRITE_MEMORY 0x00000004 340291a2b48SSukumar Swaminathan #define MENLO_CMD_FTE_INSERT 0x00000005 341291a2b48SSukumar Swaminathan #define MENLO_CMD_FTE_DELETE 0x00000006 342291a2b48SSukumar Swaminathan 343291a2b48SSukumar Swaminathan #define MENLO_CMD_GET_INIT 0x00000007 344291a2b48SSukumar Swaminathan #define MENLO_CMD_GET_CONFIG 0x00000008 345291a2b48SSukumar Swaminathan #define MENLO_CMD_GET_PORT_STATS 0x00000009 346291a2b48SSukumar Swaminathan #define MENLO_CMD_GET_LIF_STATS 0x0000000A 347291a2b48SSukumar Swaminathan #define MENLO_CMD_GET_ASIC_STATS 0x0000000B 348291a2b48SSukumar Swaminathan #define MENLO_CMD_GET_LOG_CONFIG 0x0000000C 349291a2b48SSukumar Swaminathan #define MENLO_CMD_GET_LOG_DATA 0x0000000D 350291a2b48SSukumar Swaminathan #define MENLO_CMD_GET_PANIC_LOG 0x0000000E 351291a2b48SSukumar Swaminathan #define MENLO_CMD_GET_LB_MODE 0x0000000F 352291a2b48SSukumar Swaminathan 353291a2b48SSukumar Swaminathan #define MENLO_CMD_SET_PAUSE 0x00000010 354291a2b48SSukumar Swaminathan #define MENLO_CMD_SET_FCOE_COS 0x00000011 355291a2b48SSukumar Swaminathan #define MENLO_CMD_SET_UIF_PORT_TYPE 0x00000012 356291a2b48SSukumar Swaminathan 357291a2b48SSukumar Swaminathan #define MENLO_CMD_DIAGNOSTICS 0x00000013 358291a2b48SSukumar Swaminathan #define MENLO_CMD_LOOPBACK 0x00000014 359291a2b48SSukumar Swaminathan #define MENLO_CMD_GET_FTABLE 0x00000015 360291a2b48SSukumar Swaminathan #define MENLO_CMD_GET_SFP_DATA 0x00000016 361291a2b48SSukumar Swaminathan #define MENLO_CMD_SET_FRU_DATA 0x00000017 362291a2b48SSukumar Swaminathan #define MENLO_CMD_GET_FRU_DATA 0x00000018 363291a2b48SSukumar Swaminathan #define MENLO_CMD_SET_FCOE_FORMAT 0x00000019 364291a2b48SSukumar Swaminathan #define MENLO_CMD_GET_DIAG_LOG 0x00000020 365291a2b48SSukumar Swaminathan #define MENLO_CMD_PANIC 0x00000021 366291a2b48SSukumar Swaminathan #define MENLO_CMD_SET_FCOE_PARAMS 0x00000022 367291a2b48SSukumar Swaminathan #define MENLO_CMD_GET_FCOE_PARAMS 0x00000023 368291a2b48SSukumar Swaminathan #define MENLO_CMD_GET_FCF_LIST 0x00000024 369291a2b48SSukumar Swaminathan #define MENLO_CMD_SET_FACL 0x00000025 370291a2b48SSukumar Swaminathan #define MENLO_CMD_GET_FACL 0x00000026 371291a2b48SSukumar Swaminathan #define MENLO_CMD_CREATE_VL 0x00000027 372291a2b48SSukumar Swaminathan #define MENLO_CMD_DELETE_VL 0x00000028 373291a2b48SSukumar Swaminathan #define MENLO_CMD_SET_PG 0x00000029 374291a2b48SSukumar Swaminathan #define MENLO_CMD_GET_PG 0x0000002A 375291a2b48SSukumar Swaminathan #define MENLO_CMD_SET_HOST_ETH_PFC_FLAG 0x0000002B 376291a2b48SSukumar Swaminathan #define MENLO_CMD_GET_HOST_ETH_PFC_FLAG 0x0000002C 377291a2b48SSukumar Swaminathan #define MENLO_CMD_GET_DCBX_MODE 0x0000002D 378fcf3ce44SJohn Forte 379fcf3ce44SJohn Forte 380291a2b48SSukumar Swaminathan /* Zephyr specific Menlo commands */ 381291a2b48SSukumar Swaminathan #define MENLO_CMD_RESET 0x80000001 382291a2b48SSukumar Swaminathan #define MENLO_CMD_SET_MODE 0x80000002 383291a2b48SSukumar Swaminathan 384291a2b48SSukumar Swaminathan menlo_init_cmd_t init; 385291a2b48SSukumar Swaminathan menlo_fw_download_cmd_t fw; 386291a2b48SSukumar Swaminathan menlo_memory_cmd_t mem; 387291a2b48SSukumar Swaminathan menlo_fte_insert_cmd_t fte_insert; 388291a2b48SSukumar Swaminathan menlo_fte_delete_cmd_t fte_delete; 389291a2b48SSukumar Swaminathan menlo_get_cmd_t get; 390291a2b48SSukumar Swaminathan menlo_set_cmd_t set; 391291a2b48SSukumar Swaminathan menlo_loopback_cmd_t lb; 392291a2b48SSukumar Swaminathan menlo_reset_cmd_t reset; 393291a2b48SSukumar Swaminathan menlo_fru_data_cmd_t fru; 394291a2b48SSukumar Swaminathan menlo_diag_cmd_t diag; 395291a2b48SSukumar Swaminathan menlo_set_host_eth_pfc_flag_t pfc; 396fcf3ce44SJohn Forte } menlo_cmd_t; 397fcf3ce44SJohn Forte 398fcf3ce44SJohn Forte 399fcf3ce44SJohn Forte /* 400291a2b48SSukumar Swaminathan * RESPONSES 401fcf3ce44SJohn Forte */ 402fcf3ce44SJohn Forte 403291a2b48SSukumar Swaminathan typedef struct menlo_init_rsp 404291a2b48SSukumar Swaminathan { 405fcf3ce44SJohn Forte uint32_t code; 406fcf3ce44SJohn Forte uint32_t bb_credit; /* Menlo FC BB Credit */ 407fcf3ce44SJohn Forte uint32_t frame_size; /* Menlo FC receive frame size */ 408fcf3ce44SJohn Forte uint32_t fw_version; /* Menlo firmware version */ 409fcf3ce44SJohn Forte uint32_t reset_status; /* Reason for previous reset */ 410fcf3ce44SJohn Forte 411fcf3ce44SJohn Forte #define MENLO_RESET_STATUS_NORMAL 0 412fcf3ce44SJohn Forte #define MENLO_RESET_STATUS_PANIC 1 413fcf3ce44SJohn Forte 414fcf3ce44SJohn Forte uint32_t maint_status; /* Menlo Maintenance Mode status at link up */ 415fcf3ce44SJohn Forte 416fcf3ce44SJohn Forte #define MENLO_MAINTENANCE_MODE_DISABLE 0 417fcf3ce44SJohn Forte #define MENLO_MAINTENANCE_MODE_ENABLE 1 418fcf3ce44SJohn Forte 419fcf3ce44SJohn Forte uint32_t fw_type; 420fcf3ce44SJohn Forte 421fcf3ce44SJohn Forte #define MENLO_FW_TYPE_OPERATIONAL 0xABCD0001 422fcf3ce44SJohn Forte #define MENLO_FW_TYPE_GOLDEN 0xABCD0002 423fcf3ce44SJohn Forte #define MENLO_FW_TYPE_DIAG 0xABCD0003 424fcf3ce44SJohn Forte 425291a2b48SSukumar Swaminathan uint32_t fru_data_valid; /* 0=invalid, 1=valid */ 426fcf3ce44SJohn Forte } menlo_init_rsp_t; 427fcf3ce44SJohn Forte 428fcf3ce44SJohn Forte 429fcf3ce44SJohn Forte #define MENLO_MAX_FC_PORTS 2 430fcf3ce44SJohn Forte #define MENLO_MAX_UIF_PORTS 2 431fcf3ce44SJohn Forte 432291a2b48SSukumar Swaminathan typedef struct menlo_get_config_rsp 433291a2b48SSukumar Swaminathan { 434fcf3ce44SJohn Forte uint32_t code; 435fcf3ce44SJohn Forte 436fcf3ce44SJohn Forte uint32_t pause_type[MENLO_MAX_UIF_PORTS]; 437fcf3ce44SJohn Forte uint32_t priority[MENLO_MAX_UIF_PORTS]; 438fcf3ce44SJohn Forte uint32_t fcoe_cos[MENLO_MAX_FC_PORTS]; 439fcf3ce44SJohn Forte uint32_t uif_port_type[MENLO_MAX_UIF_PORTS]; 440fcf3ce44SJohn Forte 441291a2b48SSukumar Swaminathan uint32_t log_cfg_size; /* Size of log config region. */ 442291a2b48SSukumar Swaminathan /* Needed for */ 443291a2b48SSukumar Swaminathan /* MENLO_CMD_GET_LOG_CONFIG */ 444291a2b48SSukumar Swaminathan uint32_t panic_log_size; /* Size of panic log region. */ 445291a2b48SSukumar Swaminathan /* Needed for MENLO_CMD_GET_PANIC_LOG */ 446fcf3ce44SJohn Forte 447fcf3ce44SJohn Forte uint32_t dcx_present[MENLO_MAX_UIF_PORTS]; 448fcf3ce44SJohn Forte 449fcf3ce44SJohn Forte uint32_t current_pause_type[MENLO_MAX_UIF_PORTS]; 450fcf3ce44SJohn Forte uint32_t current_priority[MENLO_MAX_UIF_PORTS]; 451fcf3ce44SJohn Forte uint32_t current_fcoe_cos[MENLO_MAX_FC_PORTS]; 452fcf3ce44SJohn Forte uint32_t current_uif_port_type[MENLO_MAX_UIF_PORTS]; 453fcf3ce44SJohn Forte 454291a2b48SSukumar Swaminathan uint32_t fcoe_format; /* Bit field - single bit will be set */ 455fcf3ce44SJohn Forte /* (See below) */ 456291a2b48SSukumar Swaminathan uint32_t current_fcoe_format; /* Bit field - single bit will be set */ 457291a2b48SSukumar Swaminathan /* (See below) */ 458fcf3ce44SJohn Forte uint32_t supported_fcoe_format; /* Bit field - multiple bits may be */ 459fcf3ce44SJohn Forte /* set (See below) */ 460fcf3ce44SJohn Forte 461291a2b48SSukumar Swaminathan #define FCOE_FRAME_FORMAT_P0 0x00010000 /* Pre-T11 format */ 462291a2b48SSukumar Swaminathan #define FCOE_FRAME_FORMAT_T0 0x00000001 /* T11 format Rev 0 */ 463fcf3ce44SJohn Forte #define FCOE_FRAME_FORMAT_T1 0x00000002 464fcf3ce44SJohn Forte #define FCOE_FRAME_FORMAT_T2 0x00000004 465fcf3ce44SJohn Forte #define FCOE_FRAME_FORMAT_T3 0x00000008 466fcf3ce44SJohn Forte #define FCOE_FRAME_FORMAT_T4 0x00000010 467fcf3ce44SJohn Forte #define FCOE_FRAME_FORMAT_T5 0x00000020 468fcf3ce44SJohn Forte #define FCOE_FRAME_FORMAT_T6 0x00000040 469fcf3ce44SJohn Forte #define FCOE_FRAME_FORMAT_T7 0x00000080 470fcf3ce44SJohn Forte #define FCOE_FRAME_FORMAT_T8 0x00000100 471fcf3ce44SJohn Forte #define FCOE_FRAME_FORMAT_T9 0x00000200 472fcf3ce44SJohn Forte #define FCOE_FRAME_FORMAT_T10 0x00000400 473fcf3ce44SJohn Forte #define FCOE_FRAME_FORMAT_T11 0x00000800 474fcf3ce44SJohn Forte #define FCOE_FRAME_FORMAT_T12 0x00001000 475fcf3ce44SJohn Forte #define FCOE_FRAME_FORMAT_T13 0x00002000 476fcf3ce44SJohn Forte #define FCOE_FRAME_FORMAT_T14 0x00004000 477fcf3ce44SJohn Forte #define FCOE_FRAME_FORMAT_T15 0x00008000 478fcf3ce44SJohn Forte } menlo_get_config_rsp_t; 479fcf3ce44SJohn Forte 480fcf3ce44SJohn Forte 481291a2b48SSukumar Swaminathan typedef struct menlo_fc_stats_rsp 482291a2b48SSukumar Swaminathan { 483fcf3ce44SJohn Forte uint32_t code; 484fcf3ce44SJohn Forte 485fcf3ce44SJohn Forte uint64_t rx_class_2_frames; 486fcf3ce44SJohn Forte uint64_t rx_class_3_frames; 487fcf3ce44SJohn Forte uint64_t rx_class_F_frames; 488fcf3ce44SJohn Forte uint64_t rx_class_other_frames; 489fcf3ce44SJohn Forte 490fcf3ce44SJohn Forte uint64_t tx_class_2_frames; 491fcf3ce44SJohn Forte uint64_t tx_class_3_frames; 492fcf3ce44SJohn Forte uint64_t tx_class_F_frames; 493fcf3ce44SJohn Forte uint64_t tx_class_other_frames; 494fcf3ce44SJohn Forte 495fcf3ce44SJohn Forte uint64_t rx_class_2_words; 496fcf3ce44SJohn Forte uint64_t rx_class_3_words; 497fcf3ce44SJohn Forte uint64_t rx_class_F_words; 498fcf3ce44SJohn Forte uint64_t rx_class_other_words; 499fcf3ce44SJohn Forte 500fcf3ce44SJohn Forte uint64_t tx_class_2_words; 501fcf3ce44SJohn Forte uint64_t tx_class_3_words; 502fcf3ce44SJohn Forte uint64_t tx_class_F_words; 503fcf3ce44SJohn Forte uint64_t tx_class_other_words; 504fcf3ce44SJohn Forte 505fcf3ce44SJohn Forte uint64_t rx_class_2_frames_bad; 506fcf3ce44SJohn Forte uint64_t rx_class_3_frames_bad; 507fcf3ce44SJohn Forte uint64_t rx_class_F_frames_bad; 508fcf3ce44SJohn Forte uint64_t rx_class_other_frames_bad; 509fcf3ce44SJohn Forte 510fcf3ce44SJohn Forte uint64_t tx_class_2_frames_bad; 511fcf3ce44SJohn Forte uint64_t tx_class_3_frames_bad; 512fcf3ce44SJohn Forte uint64_t tx_class_F_frames_bad; 513fcf3ce44SJohn Forte uint64_t tx_class_other_frames_bad; 514fcf3ce44SJohn Forte } menlo_fc_stats_rsp_t; 515fcf3ce44SJohn Forte 516fcf3ce44SJohn Forte 517291a2b48SSukumar Swaminathan typedef struct menlo_network_stats_rsp 518291a2b48SSukumar Swaminathan { 519fcf3ce44SJohn Forte uint32_t code; 520fcf3ce44SJohn Forte 521fcf3ce44SJohn Forte uint64_t tx_pkt_lt64; 522fcf3ce44SJohn Forte uint64_t tx_pkt_64; 523fcf3ce44SJohn Forte uint64_t tx_pkt_65; 524fcf3ce44SJohn Forte uint64_t tx_pkt_128; 525fcf3ce44SJohn Forte uint64_t tx_pkt_256; 526fcf3ce44SJohn Forte uint64_t tx_pkt_512; 527fcf3ce44SJohn Forte uint64_t tx_pkt_1024; 528fcf3ce44SJohn Forte uint64_t tx_pkt_1519; 529fcf3ce44SJohn Forte uint64_t tx_pkt_2048; 530fcf3ce44SJohn Forte uint64_t tx_pkt_4096; 531fcf3ce44SJohn Forte uint64_t tx_pkt_8192; 532fcf3ce44SJohn Forte uint64_t tx_pkt_gt9216; 533fcf3ce44SJohn Forte uint64_t tx_pkt_total; 534fcf3ce44SJohn Forte uint64_t tx_octet_sok; 535fcf3ce44SJohn Forte uint64_t tx_pkt_ok; 536fcf3ce44SJohn Forte uint64_t tx_ucast; 537fcf3ce44SJohn Forte uint64_t tx_mcast; 538fcf3ce44SJohn Forte uint64_t tx_bcast; 539fcf3ce44SJohn Forte uint64_t tx_vlan; 540fcf3ce44SJohn Forte uint64_t tx_pause; 541fcf3ce44SJohn Forte uint64_t tx_priority_pause; 542fcf3ce44SJohn Forte uint64_t tx_frame_error; 543fcf3ce44SJohn Forte 544fcf3ce44SJohn Forte uint64_t rx_pkt_lt64; 545fcf3ce44SJohn Forte uint64_t rx_pkt_64; 546fcf3ce44SJohn Forte uint64_t rx_pkt_65; 547fcf3ce44SJohn Forte uint64_t rx_pkt_128; 548fcf3ce44SJohn Forte uint64_t rx_pkt_256; 549fcf3ce44SJohn Forte uint64_t rx_pkt_512; 550fcf3ce44SJohn Forte uint64_t rx_pkt_1024; 551fcf3ce44SJohn Forte uint64_t rx_pkt_1519; 552fcf3ce44SJohn Forte uint64_t rx_pkt_2048; 553fcf3ce44SJohn Forte uint64_t rx_pkt_4096; 554fcf3ce44SJohn Forte uint64_t rx_pkt_8192; 555fcf3ce44SJohn Forte uint64_t rx_pkt_gt9216; 556fcf3ce44SJohn Forte uint64_t rx_pkt_total; 557fcf3ce44SJohn Forte uint64_t rx_octet_sok; 558fcf3ce44SJohn Forte uint64_t rx_pkt_ok; 559fcf3ce44SJohn Forte uint64_t rx_ucast; 560fcf3ce44SJohn Forte uint64_t rx_mcast; 561fcf3ce44SJohn Forte uint64_t rx_bcast; 562fcf3ce44SJohn Forte uint64_t rx_vlan; 563fcf3ce44SJohn Forte uint64_t rx_oversize; 564fcf3ce44SJohn Forte uint64_t rx_toolong; 565fcf3ce44SJohn Forte uint64_t rx_discard; 566fcf3ce44SJohn Forte uint64_t rx_undersize; 567fcf3ce44SJohn Forte uint64_t rx_fragment; 568fcf3ce44SJohn Forte uint64_t rx_crc_err; 569fcf3ce44SJohn Forte uint64_t rx_inrange_err; 570fcf3ce44SJohn Forte uint64_t rx_jabber; 571fcf3ce44SJohn Forte uint64_t rx_pause; 572fcf3ce44SJohn Forte uint64_t rx_priority_pause; 573fcf3ce44SJohn Forte } menlo_network_stats_rsp_t; 574fcf3ce44SJohn Forte 575fcf3ce44SJohn Forte 576291a2b48SSukumar Swaminathan typedef struct menlo_lif_stats_rsp 577291a2b48SSukumar Swaminathan { 578fcf3ce44SJohn Forte uint32_t code; 579fcf3ce44SJohn Forte 580fcf3ce44SJohn Forte uint64_t eg_pkt_count; 581fcf3ce44SJohn Forte uint64_t ig_pkt_count; 582fcf3ce44SJohn Forte 583fcf3ce44SJohn Forte uint64_t eg_byte_count; 584fcf3ce44SJohn Forte uint64_t ig_byte_count; 585fcf3ce44SJohn Forte 586fcf3ce44SJohn Forte uint64_t eg_error_count; 587fcf3ce44SJohn Forte uint64_t ig_error_count; 588fcf3ce44SJohn Forte 589fcf3ce44SJohn Forte uint64_t eg_drop_count; 590fcf3ce44SJohn Forte uint64_t ig_drop_count; 591fcf3ce44SJohn Forte } menlo_lif_stats_rsp_t; 592fcf3ce44SJohn Forte 593fcf3ce44SJohn Forte 594291a2b48SSukumar Swaminathan typedef struct menlo_asic_stats_rsp 595291a2b48SSukumar Swaminathan { 596fcf3ce44SJohn Forte uint32_t code; 597fcf3ce44SJohn Forte 598fcf3ce44SJohn Forte uint64_t eq_cputx0_cecount; 599fcf3ce44SJohn Forte uint64_t eq_cputx0_dropacl; 600fcf3ce44SJohn Forte uint64_t eq_cputx0_dropovr; 601fcf3ce44SJohn Forte uint64_t eq_cputx0_droprunt; 602fcf3ce44SJohn Forte uint64_t eq_cputx0_poperr; 603fcf3ce44SJohn Forte uint64_t eq_cputx0_pusherr; 604fcf3ce44SJohn Forte uint64_t eq_cputx0_truncovr; 605fcf3ce44SJohn Forte uint64_t eq_cputx0_uecount; 606fcf3ce44SJohn Forte 607fcf3ce44SJohn Forte uint64_t eq_cputx1_cecount; 608fcf3ce44SJohn Forte uint64_t eq_cputx1_dropacl; 609fcf3ce44SJohn Forte uint64_t eq_cputx1_dropovr; 610fcf3ce44SJohn Forte uint64_t eq_cputx1_droprunt; 611fcf3ce44SJohn Forte uint64_t eq_cputx1_poperr; 612fcf3ce44SJohn Forte uint64_t eq_cputx1_pusherr; 613fcf3ce44SJohn Forte uint64_t eq_cputx1_truncovr; 614fcf3ce44SJohn Forte uint64_t eq_cputx1_uecount; 615fcf3ce44SJohn Forte 616fcf3ce44SJohn Forte uint64_t eq_eth0_dropovr; 617fcf3ce44SJohn Forte uint64_t eq_eth0_droprunt; 618fcf3ce44SJohn Forte uint64_t eq_eth0_truncovr; 619fcf3ce44SJohn Forte 620fcf3ce44SJohn Forte uint64_t eq_eth0a_cecount; 621fcf3ce44SJohn Forte uint64_t eq_eth0a_dropacl; 622fcf3ce44SJohn Forte uint64_t eq_eth0a_poperr; 623fcf3ce44SJohn Forte uint64_t eq_eth0a_pusherr; 624fcf3ce44SJohn Forte uint64_t eq_eth0a_uecount; 625fcf3ce44SJohn Forte 626fcf3ce44SJohn Forte uint64_t eq_eth0b_cecount; 627fcf3ce44SJohn Forte uint64_t eq_eth0b_dropacl; 628fcf3ce44SJohn Forte uint64_t eq_eth0b_poperr; 629fcf3ce44SJohn Forte uint64_t eq_eth0b_pusherr; 630fcf3ce44SJohn Forte uint64_t eq_eth0b_uecount; 631fcf3ce44SJohn Forte 632fcf3ce44SJohn Forte uint64_t eq_eth1_dropovr; 633fcf3ce44SJohn Forte uint64_t eq_eth1_droprunt; 634fcf3ce44SJohn Forte uint64_t eq_eth1_truncovr; 635fcf3ce44SJohn Forte 636fcf3ce44SJohn Forte uint64_t eq_eth1a_cecount; 637fcf3ce44SJohn Forte uint64_t eq_eth1a_dropacl; 638fcf3ce44SJohn Forte uint64_t eq_eth1a_poperr; 639fcf3ce44SJohn Forte uint64_t eq_eth1a_pusherr; 640fcf3ce44SJohn Forte uint64_t eq_eth1a_uecount; 641fcf3ce44SJohn Forte 642fcf3ce44SJohn Forte uint64_t eq_eth1b_cecount; 643fcf3ce44SJohn Forte uint64_t eq_eth1b_dropacl; 644fcf3ce44SJohn Forte uint64_t eq_eth1b_poperr; 645fcf3ce44SJohn Forte uint64_t eq_eth1b_pusherr; 646fcf3ce44SJohn Forte uint64_t eq_eth1b_uecount; 647fcf3ce44SJohn Forte 648fcf3ce44SJohn Forte uint64_t eq_fc0_cecount; 649fcf3ce44SJohn Forte uint64_t eq_fc0_dropacl; 650fcf3ce44SJohn Forte uint64_t eq_fc0_dropovr; 651fcf3ce44SJohn Forte uint64_t eq_fc0_droprunt; 652fcf3ce44SJohn Forte uint64_t eq_fc0_poperr; 653fcf3ce44SJohn Forte uint64_t eq_fc0_pusherr; 654fcf3ce44SJohn Forte uint64_t eq_fc0_truncovr; 655fcf3ce44SJohn Forte uint64_t eq_fc0_uecount; 656fcf3ce44SJohn Forte 657fcf3ce44SJohn Forte uint64_t eq_fc1_cecount; 658fcf3ce44SJohn Forte uint64_t eq_fc1_dropacl; 659fcf3ce44SJohn Forte uint64_t eq_fc1_dropovr; 660fcf3ce44SJohn Forte uint64_t eq_fc1_droprunt; 661fcf3ce44SJohn Forte uint64_t eq_fc1_poperr; 662fcf3ce44SJohn Forte uint64_t eq_fc1_pusherr; 663fcf3ce44SJohn Forte uint64_t eq_fc1_truncovr; 664fcf3ce44SJohn Forte uint64_t eq_fc1_uecount; 665fcf3ce44SJohn Forte 666fcf3ce44SJohn Forte uint64_t eq_fl_cecount; 667fcf3ce44SJohn Forte uint64_t eq_fl_uecount; 668fcf3ce44SJohn Forte 669fcf3ce44SJohn Forte uint64_t eq_pkt_buf_cecount; 670fcf3ce44SJohn Forte uint64_t eq_pkt_buf_uecount; 671fcf3ce44SJohn Forte 672fcf3ce44SJohn Forte uint64_t iq_cpurx0_cecount; 673fcf3ce44SJohn Forte uint64_t iq_cpurx0_n0_dropovr; 674fcf3ce44SJohn Forte uint64_t iq_cpurx0_n0_truncovr; 675fcf3ce44SJohn Forte uint64_t iq_cpurx0_n1_dropovr; 676fcf3ce44SJohn Forte uint64_t iq_cpurx0_n1_truncovr; 677fcf3ce44SJohn Forte uint64_t iq_cpurx0_poperr; 678fcf3ce44SJohn Forte uint64_t iq_cpurx0_pusherr; 679fcf3ce44SJohn Forte uint64_t iq_cpurx0_uecount; 680fcf3ce44SJohn Forte 681fcf3ce44SJohn Forte uint64_t iq_cpurx1_cecount; 682fcf3ce44SJohn Forte uint64_t iq_cpurx1_n0_dropovr; 683fcf3ce44SJohn Forte uint64_t iq_cpurx1_n0_truncovr; 684fcf3ce44SJohn Forte uint64_t iq_cpurx1_n1_dropovr; 685fcf3ce44SJohn Forte uint64_t iq_cpurx1_n1_truncovr; 686fcf3ce44SJohn Forte uint64_t iq_cpurx1_poperr; 687fcf3ce44SJohn Forte uint64_t iq_cpurx1_pusherr; 688fcf3ce44SJohn Forte uint64_t iq_cpurx1_uecount; 689fcf3ce44SJohn Forte 690fcf3ce44SJohn Forte uint64_t iq_cputx_cecount; 691fcf3ce44SJohn Forte uint64_t iq_cputx_dropovr; 692fcf3ce44SJohn Forte uint64_t iq_cputx_droprunt; 693fcf3ce44SJohn Forte uint64_t iq_cputx_poperr; 694fcf3ce44SJohn Forte uint64_t iq_cputx_pusherr; 695fcf3ce44SJohn Forte uint64_t iq_cputx_truncovr; 696fcf3ce44SJohn Forte uint64_t iq_cputx_uecount; 697fcf3ce44SJohn Forte 698fcf3ce44SJohn Forte uint64_t iq_eth0a_cecount; 699fcf3ce44SJohn Forte uint64_t iq_eth0a_n0_dropovr; 700fcf3ce44SJohn Forte uint64_t iq_eth0a_n0_truncovr; 701fcf3ce44SJohn Forte uint64_t iq_eth0a_n1_dropovr; 702fcf3ce44SJohn Forte uint64_t iq_eth0a_n1_truncovr; 703fcf3ce44SJohn Forte uint64_t iq_eth0a_poperr; 704fcf3ce44SJohn Forte uint64_t iq_eth0a_pusherr; 705fcf3ce44SJohn Forte uint64_t iq_eth0a_uecount; 706fcf3ce44SJohn Forte 707fcf3ce44SJohn Forte uint64_t iq_eth0b_cecount; 708fcf3ce44SJohn Forte uint64_t iq_eth0b_n0_dropovr; 709fcf3ce44SJohn Forte uint64_t iq_eth0b_n0_truncovr; 710fcf3ce44SJohn Forte uint64_t iq_eth0b_n1_dropovr; 711fcf3ce44SJohn Forte uint64_t iq_eth0b_n1_truncovr; 712fcf3ce44SJohn Forte uint64_t iq_eth0b_poperr; 713fcf3ce44SJohn Forte uint64_t iq_eth0b_pusherr; 714fcf3ce44SJohn Forte uint64_t iq_eth0b_uecount; 715fcf3ce44SJohn Forte 716fcf3ce44SJohn Forte uint64_t iq_eth1a_cecount; 717fcf3ce44SJohn Forte uint64_t iq_eth1a_n0_dropovr; 718fcf3ce44SJohn Forte uint64_t iq_eth1a_n0_truncovr; 719fcf3ce44SJohn Forte uint64_t iq_eth1a_n1_dropovr; 720fcf3ce44SJohn Forte uint64_t iq_eth1a_n1_truncovr; 721fcf3ce44SJohn Forte uint64_t iq_eth1a_poperr; 722fcf3ce44SJohn Forte uint64_t iq_eth1a_pusherr; 723fcf3ce44SJohn Forte uint64_t iq_eth1a_uecount; 724fcf3ce44SJohn Forte 725fcf3ce44SJohn Forte uint64_t iq_eth1b_cecount; 726fcf3ce44SJohn Forte uint64_t iq_eth1b_n0_dropovr; 727fcf3ce44SJohn Forte uint64_t iq_eth1b_n0_truncovr; 728fcf3ce44SJohn Forte uint64_t iq_eth1b_n1_dropovr; 729fcf3ce44SJohn Forte uint64_t iq_eth1b_n1_truncovr; 730fcf3ce44SJohn Forte uint64_t iq_eth1b_poperr; 731fcf3ce44SJohn Forte uint64_t iq_eth1b_pusherr; 732fcf3ce44SJohn Forte uint64_t iq_eth1b_uecount; 733fcf3ce44SJohn Forte 734fcf3ce44SJohn Forte uint64_t iq_fc0_cecount; 735fcf3ce44SJohn Forte uint64_t iq_fc0_n0_dropovr; 736fcf3ce44SJohn Forte uint64_t iq_fc0_n0_truncovr; 737fcf3ce44SJohn Forte uint64_t iq_fc0_n1_dropovr; 738fcf3ce44SJohn Forte uint64_t iq_fc0_n1_truncovr; 739fcf3ce44SJohn Forte uint64_t iq_fc0_poperr; 740fcf3ce44SJohn Forte uint64_t iq_fc0_pusherr; 741fcf3ce44SJohn Forte uint64_t iq_fc0_uecount; 742fcf3ce44SJohn Forte 743fcf3ce44SJohn Forte uint64_t iq_fc1_cecount; 744fcf3ce44SJohn Forte uint64_t iq_fc1_n0_dropovr; 745fcf3ce44SJohn Forte uint64_t iq_fc1_n0_truncovr; 746fcf3ce44SJohn Forte uint64_t iq_fc1_n1_dropovr; 747fcf3ce44SJohn Forte uint64_t iq_fc1_n1_truncovr; 748fcf3ce44SJohn Forte uint64_t iq_fc1_poperr; 749fcf3ce44SJohn Forte uint64_t iq_fc1_pusherr; 750fcf3ce44SJohn Forte uint64_t iq_fc1_uecount; 751fcf3ce44SJohn Forte 752fcf3ce44SJohn Forte uint64_t iq_fl_cecount; 753fcf3ce44SJohn Forte uint64_t iq_fl_uecount; 754fcf3ce44SJohn Forte 755fcf3ce44SJohn Forte uint64_t iq_n0_cecount; 756fcf3ce44SJohn Forte uint64_t iq_n0_dropacl; 757fcf3ce44SJohn Forte uint64_t iq_n0_dropovr; 758fcf3ce44SJohn Forte uint64_t iq_n0_droprunt; 759fcf3ce44SJohn Forte uint64_t iq_n0_poperr; 760fcf3ce44SJohn Forte uint64_t iq_n0_pusherr; 761fcf3ce44SJohn Forte uint64_t iq_n0_truncovr; 762fcf3ce44SJohn Forte uint64_t iq_n0_uecount; 763fcf3ce44SJohn Forte 764fcf3ce44SJohn Forte uint64_t iq_n1_cecount; 765fcf3ce44SJohn Forte uint64_t iq_n1_dropacl; 766fcf3ce44SJohn Forte uint64_t iq_n1_dropovr; 767fcf3ce44SJohn Forte uint64_t iq_n1_droprunt; 768fcf3ce44SJohn Forte uint64_t iq_n1_poperr; 769fcf3ce44SJohn Forte uint64_t iq_n1_pusherr; 770fcf3ce44SJohn Forte uint64_t iq_n1_truncovr; 771fcf3ce44SJohn Forte uint64_t iq_n1_uecount; 772fcf3ce44SJohn Forte 773fcf3ce44SJohn Forte uint64_t iq_pkt_buf_cecount; 774fcf3ce44SJohn Forte uint64_t iq_pkt_buf_uecount; 775fcf3ce44SJohn Forte 776fcf3ce44SJohn Forte uint64_t iq_rc_cecount; 777fcf3ce44SJohn Forte uint64_t iq_rc_uecount; 778fcf3ce44SJohn Forte 779fcf3ce44SJohn Forte uint64_t misc_mmem_cecount; 780fcf3ce44SJohn Forte uint64_t misc_mmem_uecount; 781fcf3ce44SJohn Forte 782fcf3ce44SJohn Forte uint64_t net_eg0_learn_req_drop; 783fcf3ce44SJohn Forte uint64_t net_eg0_pkt_drop_cmd; 784fcf3ce44SJohn Forte uint64_t net_eg0_pkt_drop_lifcfg_invalid; 785fcf3ce44SJohn Forte uint64_t net_eg0_pkt_drop_lifmap_no_hit; 786fcf3ce44SJohn Forte uint64_t net_eg0_pkt_drop_src_bind; 787fcf3ce44SJohn Forte 788fcf3ce44SJohn Forte uint64_t net_eg1_learn_req_drop; 789fcf3ce44SJohn Forte uint64_t net_eg1_pkt_drop_cmd; 790fcf3ce44SJohn Forte uint64_t net_eg1_pkt_drop_lifcfg_invalid; 791fcf3ce44SJohn Forte uint64_t net_eg1_pkt_drop_lifmap_no_hit; 792fcf3ce44SJohn Forte uint64_t net_eg1_pkt_drop_src_bind; 793fcf3ce44SJohn Forte 794fcf3ce44SJohn Forte uint64_t net_ig0_fwd_lookup_no_hit; 795fcf3ce44SJohn Forte uint64_t net_ig0_pkt_drop_fc_multicast; 796fcf3ce44SJohn Forte uint64_t net_ig0_pkt_drop_invalid_fc_lif; 797fcf3ce44SJohn Forte uint64_t net_ig0_pkt_null_pif; 798fcf3ce44SJohn Forte 799fcf3ce44SJohn Forte uint64_t net_ig1_fwd_lookup_no_hit; 800fcf3ce44SJohn Forte uint64_t net_ig1_pkt_drop_fc_multicast; 801fcf3ce44SJohn Forte uint64_t net_ig1_pkt_drop_invalid_fc_lif; 802fcf3ce44SJohn Forte uint64_t net_ig1_pkt_null_pif; 803fcf3ce44SJohn Forte 804fcf3ce44SJohn Forte uint64_t host10gbe_port0_rx_pause_cfc; 805fcf3ce44SJohn Forte uint64_t host10gbe_port0_rx_pause_pfc; 806fcf3ce44SJohn Forte uint64_t host10gbe_port0_tx_pause_cfc; 807fcf3ce44SJohn Forte uint64_t host10gbe_port0_tx_pause_pfc; 808fcf3ce44SJohn Forte 809fcf3ce44SJohn Forte uint64_t host10gbe_port1_rx_pause_cfc; 810fcf3ce44SJohn Forte uint64_t host10gbe_port1_rx_pause_pfc; 811fcf3ce44SJohn Forte uint64_t host10gbe_port1_tx_pause_cfc; 812fcf3ce44SJohn Forte uint64_t host10gbe_port1_tx_pause_pfc; 813fcf3ce44SJohn Forte 814fcf3ce44SJohn Forte uint64_t dce_port0_rx_pause_cfc; 815fcf3ce44SJohn Forte uint64_t dce_port0_rx_pause_pfc; 816fcf3ce44SJohn Forte uint64_t dce_port0_tx_pause_cfc; 817fcf3ce44SJohn Forte uint64_t dce_port0_tx_pause_pfc; 818fcf3ce44SJohn Forte 819fcf3ce44SJohn Forte uint64_t dce_port1_rx_pause_cfc; 820fcf3ce44SJohn Forte uint64_t dce_port1_rx_pause_pfc; 821fcf3ce44SJohn Forte uint64_t dce_port1_tx_pause_cfc; 822fcf3ce44SJohn Forte uint64_t dce_port1_tx_pause_pfc; 823fcf3ce44SJohn Forte } menlo_asic_stats_rsp_t; 824fcf3ce44SJohn Forte 825fcf3ce44SJohn Forte 826fcf3ce44SJohn Forte #define MENLO_LOG_NAME_SIZE 20 827fcf3ce44SJohn Forte 828291a2b48SSukumar Swaminathan typedef struct menlo_log 829291a2b48SSukumar Swaminathan { 830fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 831fcf3ce44SJohn Forte uint16_t num_entries; 832fcf3ce44SJohn Forte uint16_t id; 833fcf3ce44SJohn Forte 834fcf3ce44SJohn Forte uint16_t rsvd; 835fcf3ce44SJohn Forte uint16_t entry_size; 836291a2b48SSukumar Swaminathan #endif /* EMLXS_BIG_ENDIAN */ 837fcf3ce44SJohn Forte 838fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 839fcf3ce44SJohn Forte uint16_t id; 840fcf3ce44SJohn Forte uint16_t num_entries; 841fcf3ce44SJohn Forte 842fcf3ce44SJohn Forte uint16_t entry_size; 843fcf3ce44SJohn Forte uint16_t rsvd; 844291a2b48SSukumar Swaminathan #endif /* EMLXS_LITTLE_ENDIAN */ 845fcf3ce44SJohn Forte 846fcf3ce44SJohn Forte char name[MENLO_LOG_NAME_SIZE]; 847fcf3ce44SJohn Forte } menlo_log_t; 848fcf3ce44SJohn Forte 849fcf3ce44SJohn Forte 850291a2b48SSukumar Swaminathan typedef struct menlo_log_config_rsp 851291a2b48SSukumar Swaminathan { 852fcf3ce44SJohn Forte uint32_t code; 853fcf3ce44SJohn Forte 854fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 855fcf3ce44SJohn Forte uint16_t rsvd; 856291a2b48SSukumar Swaminathan uint16_t num_logs; /* Number of logs in log array */ 857291a2b48SSukumar Swaminathan #endif /* EMLXS_BIG_ENDIAN */ 858fcf3ce44SJohn Forte 859fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 860291a2b48SSukumar Swaminathan uint16_t num_logs; /* Number of logs in log array */ 861fcf3ce44SJohn Forte uint16_t rsvd; 862291a2b48SSukumar Swaminathan #endif /* EMLXS_LITTLE_ENDIAN */ 863fcf3ce44SJohn Forte 864291a2b48SSukumar Swaminathan uint32_t data; /* First word of array: */ 865291a2b48SSukumar Swaminathan /* menlo_log_t log[num_logs] */ 866fcf3ce44SJohn Forte } menlo_log_config_rsp_t; 867fcf3ce44SJohn Forte 868fcf3ce44SJohn Forte 869291a2b48SSukumar Swaminathan typedef struct menlo_log_data_rsp 870291a2b48SSukumar Swaminathan { 871fcf3ce44SJohn Forte uint32_t code; 872fcf3ce44SJohn Forte 873fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 874fcf3ce44SJohn Forte uint16_t rsvd; 875291a2b48SSukumar Swaminathan uint16_t head; /* Index of oldest log entry in circular */ 876291a2b48SSukumar Swaminathan /* data array */ 877291a2b48SSukumar Swaminathan #endif /* EMLXS_BIG_ENDIAN */ 878fcf3ce44SJohn Forte 879fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 880291a2b48SSukumar Swaminathan uint16_t head; /* Index of oldest log entry in circular */ 881291a2b48SSukumar Swaminathan /* data array */ 882fcf3ce44SJohn Forte uint16_t rsvd; 883291a2b48SSukumar Swaminathan #endif /* EMLXS_LITTLE_ENDIAN */ 884fcf3ce44SJohn Forte 885291a2b48SSukumar Swaminathan uint32_t data; /* char array[num_entries][entry_size] */ 886fcf3ce44SJohn Forte } menlo_log_data_rsp_t; 887fcf3ce44SJohn Forte 888fcf3ce44SJohn Forte 889fcf3ce44SJohn Forte #define MENLO_NUM_GP_REGS 32 890fcf3ce44SJohn Forte 891291a2b48SSukumar Swaminathan typedef struct menlo_panic_log_data_rsp 892291a2b48SSukumar Swaminathan { 893fcf3ce44SJohn Forte uint32_t code; 894291a2b48SSukumar Swaminathan uint32_t rsvd_flag; /* N/A to mgmt utility */ 895291a2b48SSukumar Swaminathan uint32_t type; /* Panic type (See beleow) */ 896fcf3ce44SJohn Forte 897fcf3ce44SJohn Forte #define MENLO_PANIC_TYPE_SOLICITED 0xdead0001 898fcf3ce44SJohn Forte #define MENLO_PANIC_TYPE_EXCEPTION 0xdead0002 899fcf3ce44SJohn Forte 900fcf3ce44SJohn Forte uint32_t regs_epc; 901fcf3ce44SJohn Forte uint32_t regs_cp0_cause; 902fcf3ce44SJohn Forte uint32_t regs_cp0_status; 903fcf3ce44SJohn Forte uint32_t regs_gp[MENLO_NUM_GP_REGS]; 904fcf3ce44SJohn Forte 905fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 906291a2b48SSukumar Swaminathan uint16_t num_entries; /* Number of entries in data array */ 907291a2b48SSukumar Swaminathan uint16_t log_present; /* Number of entries in data array */ 908fcf3ce44SJohn Forte 909291a2b48SSukumar Swaminathan uint16_t head; /* Index of oldest log entry in circular */ 910291a2b48SSukumar Swaminathan /* data buffer */ 911fcf3ce44SJohn Forte uint16_t entry_size; /* Size of each entry */ 912291a2b48SSukumar Swaminathan #endif /* EMLXS_BIG_ENDIAN */ 913fcf3ce44SJohn Forte 914fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 915291a2b48SSukumar Swaminathan uint16_t log_present; /* Number of entries in data array */ 916291a2b48SSukumar Swaminathan uint16_t num_entries; /* Number of entries in data array */ 917fcf3ce44SJohn Forte 918fcf3ce44SJohn Forte uint16_t entry_size; /* Size of each entry */ 919291a2b48SSukumar Swaminathan uint16_t head; /* Index of oldest log entry in circular */ 920291a2b48SSukumar Swaminathan /* data buffer */ 921291a2b48SSukumar Swaminathan #endif /* EMLXS_LITTLE_ENDIAN */ 922fcf3ce44SJohn Forte 923291a2b48SSukumar Swaminathan uint32_t data; /* char array[num_entries][entry_size] */ 924fcf3ce44SJohn Forte } menlo_panic_log_data_rsp_t; 925fcf3ce44SJohn Forte 926fcf3ce44SJohn Forte 927291a2b48SSukumar Swaminathan typedef struct menlo_lb_mode_rsp 928291a2b48SSukumar Swaminathan { 929fcf3ce44SJohn Forte uint32_t code; 930291a2b48SSukumar Swaminathan uint32_t mode; /* Menlo loopback mode */ 931fcf3ce44SJohn Forte } menlo_lb_mode_rsp_t; 932fcf3ce44SJohn Forte 933fcf3ce44SJohn Forte 934fcf3ce44SJohn Forte #define MENLO_MAX_FTABLE_ENTRIES 256 935fcf3ce44SJohn Forte 936291a2b48SSukumar Swaminathan typedef struct menlo_fte 937291a2b48SSukumar Swaminathan { 938fcf3ce44SJohn Forte #ifdef EMLXS_BIG_ENDIAN 939291a2b48SSukumar Swaminathan uint8_t type_mask; 940291a2b48SSukumar Swaminathan uint8_t type; 941291a2b48SSukumar Swaminathan uint16_t flags; 942fcf3ce44SJohn Forte 943291a2b48SSukumar Swaminathan uint16_t tag_mask; 944291a2b48SSukumar Swaminathan uint16_t tag; /* Ehternet VLAN tag */ 945291a2b48SSukumar Swaminathan #endif /* EMLXS_BIG_ENDIAN */ 946fcf3ce44SJohn Forte 947fcf3ce44SJohn Forte #ifdef EMLXS_LITTLE_ENDIAN 948291a2b48SSukumar Swaminathan uint16_t flags; 949291a2b48SSukumar Swaminathan uint8_t type; 950291a2b48SSukumar Swaminathan uint8_t type_mask; 951fcf3ce44SJohn Forte 952291a2b48SSukumar Swaminathan uint16_t tag; /* Ehternet VLAN tag */ 953291a2b48SSukumar Swaminathan uint16_t tag_mask; 954291a2b48SSukumar Swaminathan #endif /* EMLXS_LITTLE_ENDIAN */ 955fcf3ce44SJohn Forte 956fcf3ce44SJohn Forte #define MENLO_FTABLE_ENTRY_VALID 0x8000 /* flags field */ 957fcf3ce44SJohn Forte 958291a2b48SSukumar Swaminathan uint8_t mac_addr[8]; /* mac addr */ 959291a2b48SSukumar Swaminathan uint8_t mac_addr_mask[8]; /* mac addr mask */ 960291a2b48SSukumar Swaminathan uint8_t fc_wwpn[8]; /* wwpn */ 961fcf3ce44SJohn Forte 962291a2b48SSukumar Swaminathan uint32_t lif_bitmap; /* forwarding vector */ 963291a2b48SSukumar Swaminathan uint32_t rsvd; 964fcf3ce44SJohn Forte } menlo_fte_t; 965fcf3ce44SJohn Forte 966291a2b48SSukumar Swaminathan typedef struct menlo_ftable_rsp 967291a2b48SSukumar Swaminathan { 968fcf3ce44SJohn Forte uint32_t code; /* Response code */ 969fcf3ce44SJohn Forte 970291a2b48SSukumar Swaminathan menlo_fte_t entry[MENLO_MAX_FTABLE_ENTRIES]; 971fcf3ce44SJohn Forte } menlo_ftable_rsp_t; 972fcf3ce44SJohn Forte 973fcf3ce44SJohn Forte 974fcf3ce44SJohn Forte #define MENLO_SFP_PAGE_SIZE 256 975fcf3ce44SJohn Forte 976291a2b48SSukumar Swaminathan typedef struct menlo_sfp_rsp 977291a2b48SSukumar Swaminathan { 978fcf3ce44SJohn Forte uint32_t code; /* Response code */ 979fcf3ce44SJohn Forte uint8_t page_a0[MENLO_SFP_PAGE_SIZE]; 980fcf3ce44SJohn Forte uint8_t page_a2[MENLO_SFP_PAGE_SIZE]; 981fcf3ce44SJohn Forte } menlo_sfp_rsp_t; 982fcf3ce44SJohn Forte 983fcf3ce44SJohn Forte 984291a2b48SSukumar Swaminathan typedef struct menlo_fru_data_rsp 985291a2b48SSukumar Swaminathan { 986291a2b48SSukumar Swaminathan uint32_t code; /* Response code */ 987291a2b48SSukumar Swaminathan uint8_t mac0[8]; /* MAC address of port 0 */ 988291a2b48SSukumar Swaminathan uint8_t mac1[8]; /* MAC address of port 1 */ 989fcf3ce44SJohn Forte uint32_t flags; 990fcf3ce44SJohn Forte } menlo_fru_data_rsp_t; 991fcf3ce44SJohn Forte 992fcf3ce44SJohn Forte 993291a2b48SSukumar Swaminathan typedef struct menlo_diag_log_data_rsp 994291a2b48SSukumar Swaminathan { 995291a2b48SSukumar Swaminathan uint32_t code; /* Response code */ 996291a2b48SSukumar Swaminathan uint32_t data_length; /* Length of the diagnostic log */ 997291a2b48SSukumar Swaminathan /* buffer (bytes) */ 998291a2b48SSukumar Swaminathan uint32_t data; /* menlo_diag_log_t log of size */ 999291a2b48SSukumar Swaminathan /* data_length bytes */ 1000fcf3ce44SJohn Forte } menlo_diag_log_data_rsp_t; 1001fcf3ce44SJohn Forte 1002fcf3ce44SJohn Forte 1003291a2b48SSukumar Swaminathan typedef struct menlo_diag_log 1004291a2b48SSukumar Swaminathan { 1005291a2b48SSukumar Swaminathan uint32_t num_tests; /* Number of entries in data array */ 1006291a2b48SSukumar Swaminathan uint32_t status_length; /* Size (words) of the */ 1007291a2b48SSukumar Swaminathan /* menlo_diag_log_entry_t.data array */ 1008fcf3ce44SJohn Forte uint32_t requested_loop_cnt; /* Number of test iterations */ 1009fcf3ce44SJohn Forte /* requested */ 1010fcf3ce44SJohn Forte uint32_t completed_loop_cnt; /* Number of test iterations actually */ 1011fcf3ce44SJohn Forte /* completed */ 1012291a2b48SSukumar Swaminathan uint32_t test_summary; /* Overal test status */ 1013fcf3ce44SJohn Forte 1014fcf3ce44SJohn Forte #define DIAG_TEST_STATUS_SUCCESS 0xD0000001 1015fcf3ce44SJohn Forte #define DIAG_TEST_STATUS_FAIL 0xD0000002 1016fcf3ce44SJohn Forte #define DIAG_TEST_STATUS_ABORT 0xD0000003 1017fcf3ce44SJohn Forte 1018291a2b48SSukumar Swaminathan uint32_t data; /* menlo_diag_log_entry_t */ 1019291a2b48SSukumar Swaminathan /* entry[num_tests] */ 1020fcf3ce44SJohn Forte } menlo_diag_log_t; 1021fcf3ce44SJohn Forte 1022291a2b48SSukumar Swaminathan typedef struct menlo_diag_log_entry 1023291a2b48SSukumar Swaminathan { 1024291a2b48SSukumar Swaminathan uint32_t status; /* Test status See */ 1025291a2b48SSukumar Swaminathan /* DIAG_TEST_STATUS_XXXXX above */ 1026291a2b48SSukumar Swaminathan uint32_t data; /* uint32_t array[status_length] */ 1027fcf3ce44SJohn Forte } menlo_diag_log_entry_t; 1028fcf3ce44SJohn Forte 1029fcf3ce44SJohn Forte 1030291a2b48SSukumar Swaminathan /* Hornet 2 */ 1031fcf3ce44SJohn Forte 1032291a2b48SSukumar Swaminathan typedef struct menlo_get_fcoe_params_rsp 1033291a2b48SSukumar Swaminathan { 1034291a2b48SSukumar Swaminathan uint32_t code; /* Response code */ 1035fcf3ce44SJohn Forte 1036291a2b48SSukumar Swaminathan uint32_t fcoe_mode; /* FIP or Non-FIP */ 1037291a2b48SSukumar Swaminathan 1038291a2b48SSukumar Swaminathan /* FCoE Operation Mode */ 1039291a2b48SSukumar Swaminathan #define FCOE_MODE_NON_FIP 0 1040291a2b48SSukumar Swaminathan #define FCOE_MODE_FIP 1 1041291a2b48SSukumar Swaminathan 1042291a2b48SSukumar Swaminathan menlo_fcoe_params_t params; /* Specific FCoE parameters */ 1043291a2b48SSukumar Swaminathan 1044291a2b48SSukumar Swaminathan } menlo_get_fcoe_params_rsp_t; 1045291a2b48SSukumar Swaminathan 1046291a2b48SSukumar Swaminathan typedef struct fcf_info 1047291a2b48SSukumar Swaminathan { 1048291a2b48SSukumar Swaminathan uint32_t handle; /* Handle of the subject FCF */ 1049291a2b48SSukumar Swaminathan uint8_t mac[6]; /* FCF MAC */ 1050291a2b48SSukumar Swaminathan uint16_t vlan_id; /* vlan_id */ 1051291a2b48SSukumar Swaminathan uint8_t sw_name[8]; /* Switch name */ 1052291a2b48SSukumar Swaminathan uint8_t fabric_name[8]; /* Fabric name */ 1053291a2b48SSukumar Swaminathan uint32_t fc_map; /* FC map (not applicable for SPMA) */ 1054291a2b48SSukumar Swaminathan uint32_t lka_period; /* Periodic LKA */ 1055291a2b48SSukumar Swaminathan 1056291a2b48SSukumar Swaminathan uint16_t state; /* FCF state */ 1057291a2b48SSukumar Swaminathan 1058291a2b48SSukumar Swaminathan uint16_t ctrl_flags; /* FIP header flags */ 1059291a2b48SSukumar Swaminathan uint16_t sup_addr_mode; /* FCoE addressing mode capability */ 1060291a2b48SSukumar Swaminathan 1061291a2b48SSukumar Swaminathan /* FCoE Addressing Mode */ 1062291a2b48SSukumar Swaminathan #define SPMA_ADDR_MODE 1 1063291a2b48SSukumar Swaminathan #define FPMA_ADDR_MODE 2 1064291a2b48SSukumar Swaminathan 1065291a2b48SSukumar Swaminathan uint16_t priority; /* Priority of FCF */ 1066291a2b48SSukumar Swaminathan 1067291a2b48SSukumar Swaminathan } fcf_info_t; 1068291a2b48SSukumar Swaminathan 1069291a2b48SSukumar Swaminathan typedef struct menlo_get_fcf_list_rsp 1070291a2b48SSukumar Swaminathan { 1071291a2b48SSukumar Swaminathan uint32_t code; /* Response code */ 1072291a2b48SSukumar Swaminathan 1073291a2b48SSukumar Swaminathan uint32_t returned_fcfs; /* Number of returned FCFs */ 1074291a2b48SSukumar Swaminathan uint32_t total_fcfs; /* Total number of discovered FCFs */ 1075291a2b48SSukumar Swaminathan uint32_t active_fcfs; /* Number of active FCFs */ 1076291a2b48SSukumar Swaminathan uint32_t fcf_list; /* List of returned FCFs' information, fcf_info_t */ 1077fcf3ce44SJohn Forte 1078291a2b48SSukumar Swaminathan } menlo_get_fcf_list_rsp_t; 1079291a2b48SSukumar Swaminathan 1080291a2b48SSukumar Swaminathan typedef struct menlo_get_facl_rsp 1081291a2b48SSukumar Swaminathan { 1082291a2b48SSukumar Swaminathan uint32_t code; /* Response code */ 1083291a2b48SSukumar Swaminathan 1084291a2b48SSukumar Swaminathan uint32_t returned_facls; /* Number of returned ACLs */ 1085291a2b48SSukumar Swaminathan uint32_t total_facls; /* Total number of configured ACLs */ 1086291a2b48SSukumar Swaminathan uint32_t facl_list; /* List of returned ACL entry, facl_t */ 1087291a2b48SSukumar Swaminathan 1088291a2b48SSukumar Swaminathan } menlo_get_facl_rsp_t; 1089291a2b48SSukumar Swaminathan 1090291a2b48SSukumar Swaminathan typedef struct create_vl_rsp 1091291a2b48SSukumar Swaminathan { 1092291a2b48SSukumar Swaminathan uint32_t code; /* Response code */ 1093291a2b48SSukumar Swaminathan 1094291a2b48SSukumar Swaminathan uint32_t vl_handle; /* Handle of created VL */ 1095291a2b48SSukumar Swaminathan } create_vl_rsp_t; 1096291a2b48SSukumar Swaminathan 1097291a2b48SSukumar Swaminathan typedef struct menlo_get_pg_info_rsp 1098291a2b48SSukumar Swaminathan { 1099291a2b48SSukumar Swaminathan uint32_t code; /* Response code */ 1100291a2b48SSukumar Swaminathan 1101291a2b48SSukumar Swaminathan uint32_t max_supported_pg; /* Max PG supported by hardware */ 1102291a2b48SSukumar Swaminathan uint32_t dcbx_feature_syncd; /* indicate DCBX feature syncd with peer */ 1103291a2b48SSukumar Swaminathan menlo_pg_info_t curr_pg_info; /* Current PG settings */ 1104291a2b48SSukumar Swaminathan menlo_pg_info_t def_pg_info; /* Default PG settings */ 1105291a2b48SSukumar Swaminathan uint32_t max_bg_bw[MAX_GROUPS]; /* Max bandwidth allowed per group */ 1106291a2b48SSukumar Swaminathan 1107291a2b48SSukumar Swaminathan } menlo_get_pg_info_rsp_t; 1108291a2b48SSukumar Swaminathan 1109291a2b48SSukumar Swaminathan typedef struct menlo_get_host_eth_pfc_flag_rsp 1110291a2b48SSukumar Swaminathan { 1111291a2b48SSukumar Swaminathan uint32_t code; /* Response code */ 1112291a2b48SSukumar Swaminathan 1113291a2b48SSukumar Swaminathan uint32_t host_pfc_enable; /* 1 = PFC on Host i/f enabled */ 1114291a2b48SSukumar Swaminathan 1115291a2b48SSukumar Swaminathan /* Host PFC Flag Definitions */ 1116291a2b48SSukumar Swaminathan #define MENLO_HOST_PFC_DISABLE 0x0 1117291a2b48SSukumar Swaminathan #define MENLO_HOST_PFC_ENABLE 0x1 1118291a2b48SSukumar Swaminathan 1119291a2b48SSukumar Swaminathan } menlo_get_host_eth_pfc_flag_rsp_t; 1120291a2b48SSukumar Swaminathan 1121291a2b48SSukumar Swaminathan typedef struct menlo_get_dcbx_mode_rsp 1122291a2b48SSukumar Swaminathan { 1123291a2b48SSukumar Swaminathan uint32_t code; /* Response code */ 1124291a2b48SSukumar Swaminathan 1125291a2b48SSukumar Swaminathan uint32_t mode; /* Mode value. See below */ 1126291a2b48SSukumar Swaminathan 1127291a2b48SSukumar Swaminathan #define MENLO_DCBX_MODE_PRE_CEE 0x80000000 1128291a2b48SSukumar Swaminathan #define MENLO_DCBX_MODE_CEE_VER_01 0x00000001 1129291a2b48SSukumar Swaminathan #define MENLO_DCBX_MODE_CEE_VER_02 0x00000002 1130291a2b48SSukumar Swaminathan #define MENLO_DCBX_MODE_CEE_VER_03 0x00000003 1131291a2b48SSukumar Swaminathan #define MENLO_DCBX_MODE_CEE_VER_04 0x00000004 1132291a2b48SSukumar Swaminathan 1133291a2b48SSukumar Swaminathan } menlo_get_dcbx_mode_rsp_t; 1134291a2b48SSukumar Swaminathan 1135291a2b48SSukumar Swaminathan 1136291a2b48SSukumar Swaminathan 1137291a2b48SSukumar Swaminathan typedef union menlo_rsp 1138291a2b48SSukumar Swaminathan { 1139291a2b48SSukumar Swaminathan uint32_t word[32]; 1140291a2b48SSukumar Swaminathan uint32_t code; 1141291a2b48SSukumar Swaminathan 1142291a2b48SSukumar Swaminathan /* Response codes */ 1143291a2b48SSukumar Swaminathan #define MENLO_RSP_SUCCESS 0x00000000 1144291a2b48SSukumar Swaminathan #define MENLO_ERR_FAILED 0x00000001 1145291a2b48SSukumar Swaminathan #define MENLO_ERR_INVALID_CMD 0x00000002 1146291a2b48SSukumar Swaminathan #define MENLO_ERR_INVALID_CREDIT 0x00000003 1147291a2b48SSukumar Swaminathan #define MENLO_ERR_INVALID_SIZE 0x00000004 1148291a2b48SSukumar Swaminathan #define MENLO_ERR_INVALID_ADDRESS 0x00000005 1149291a2b48SSukumar Swaminathan #define MENLO_ERR_INVALID_CONTEXT 0x00000006 1150291a2b48SSukumar Swaminathan #define MENLO_ERR_INVALID_LENGTH 0x00000007 1151291a2b48SSukumar Swaminathan #define MENLO_ERR_INVALID_TYPE 0x00000008 1152291a2b48SSukumar Swaminathan #define MENLO_ERR_INVALID_DATA 0x00000009 1153291a2b48SSukumar Swaminathan #define MENLO_ERR_INVALID_VALUE1 0x0000000A 1154291a2b48SSukumar Swaminathan #define MENLO_ERR_INVALID_VALUE2 0x0000000B 1155291a2b48SSukumar Swaminathan #define MENLO_ERR_INVALID_MASK 0x0000000C 1156291a2b48SSukumar Swaminathan #define MENLO_ERR_CHECKSUM 0x0000000D 1157291a2b48SSukumar Swaminathan #define MENLO_ERR_UNKNOWN_FCID 0x0000000E 1158291a2b48SSukumar Swaminathan #define MENLO_ERR_UNKNOWN_WWN 0x0000000F 1159291a2b48SSukumar Swaminathan #define MENLO_ERR_BUSY 0x00000010 1160291a2b48SSukumar Swaminathan #define MENLO_ERR_INVALID_FLAG 0x00000011 1161291a2b48SSukumar Swaminathan #define MENLO_ERR_SFP_ABSENT 0x00000012 1162291a2b48SSukumar Swaminathan 1163291a2b48SSukumar Swaminathan menlo_init_rsp_t init; 1164291a2b48SSukumar Swaminathan menlo_get_config_rsp_t config; 1165291a2b48SSukumar Swaminathan menlo_fc_stats_rsp_t fc_stats; 1166291a2b48SSukumar Swaminathan menlo_network_stats_rsp_t net_stats; 1167291a2b48SSukumar Swaminathan menlo_lif_stats_rsp_t lif_stats; 1168291a2b48SSukumar Swaminathan menlo_log_config_rsp_t log_cfg; 1169291a2b48SSukumar Swaminathan menlo_log_data_rsp_t log; 1170291a2b48SSukumar Swaminathan menlo_panic_log_data_rsp_t panic_log; 1171291a2b48SSukumar Swaminathan menlo_lb_mode_rsp_t lb_mode; 1172291a2b48SSukumar Swaminathan menlo_asic_stats_rsp_t asic_stats; 1173291a2b48SSukumar Swaminathan menlo_ftable_rsp_t ftable; 1174291a2b48SSukumar Swaminathan menlo_sfp_rsp_t sfp; 1175291a2b48SSukumar Swaminathan menlo_fru_data_rsp_t fru; 1176291a2b48SSukumar Swaminathan menlo_diag_log_data_rsp_t diag_log; 1177fcf3ce44SJohn Forte } menlo_rsp_t; 1178fcf3ce44SJohn Forte 1179fcf3ce44SJohn Forte 1180fcf3ce44SJohn Forte /* 1181291a2b48SSukumar Swaminathan * FIRMWARE IMAGE 1182fcf3ce44SJohn Forte */ 1183fcf3ce44SJohn Forte 1184291a2b48SSukumar Swaminathan typedef struct menlo_image_hdr 1185291a2b48SSukumar Swaminathan { 1186fcf3ce44SJohn Forte uint32_t rsvd1; 1187fcf3ce44SJohn Forte uint32_t rsvd2; 1188fcf3ce44SJohn Forte uint32_t version; 1189291a2b48SSukumar Swaminathan uint32_t file_length; /* Length of entire file */ 1190291a2b48SSukumar Swaminathan uint32_t image_length; /* length of the image without */ 1191291a2b48SSukumar Swaminathan /* padding */ 1192fcf3ce44SJohn Forte uint32_t rsvd3; 1193fcf3ce44SJohn Forte uint32_t rsvd4; 1194fcf3ce44SJohn Forte uint32_t checksum_offset; /* Byte offset to image checksum */ 1195fcf3ce44SJohn Forte } menlo_image_hdr_t; 1196fcf3ce44SJohn Forte 1197fcf3ce44SJohn Forte 1198fcf3ce44SJohn Forte /* The version header structure needs to be a multiple of 4 bytes */ 1199291a2b48SSukumar Swaminathan typedef struct menlo_version_hdr 1200291a2b48SSukumar Swaminathan { 1201291a2b48SSukumar Swaminathan uint32_t padded; /* 1 = Image padded, 0 = Image not padded */ 1202fcf3ce44SJohn Forte 1203fcf3ce44SJohn Forte uint32_t type; 1204fcf3ce44SJohn Forte 1205fcf3ce44SJohn Forte /* Type */ 1206fcf3ce44SJohn Forte #define MENLO_IMAGE_TYPE_FIRMWARE 1 1207fcf3ce44SJohn Forte #define MENLO_IMAGE_TYPE_DIAGNOSTICS 2 1208fcf3ce44SJohn Forte 1209291a2b48SSukumar Swaminathan uint32_t version; /* fw or diag version */ 1210291a2b48SSukumar Swaminathan uint32_t checksum; /* 32bit XOR checksum -- needs to be at the end */ 1211fcf3ce44SJohn Forte } menlo_version_hdr_t; 1212fcf3ce44SJohn Forte 1213fcf3ce44SJohn Forte 1214fcf3ce44SJohn Forte #endif /* MENLO_SUPPORT */ 1215fcf3ce44SJohn Forte 1216fcf3ce44SJohn Forte #ifdef __cplusplus 1217fcf3ce44SJohn Forte } 1218fcf3ce44SJohn Forte #endif 1219fcf3ce44SJohn Forte 1220fcf3ce44SJohn Forte #endif /* _EMLXS_MENLO_H */ 1221