144961713Sgirish /* 244961713Sgirish * CDDL HEADER START 344961713Sgirish * 444961713Sgirish * The contents of this file are subject to the terms of the 544961713Sgirish * Common Development and Distribution License (the "License"). 644961713Sgirish * You may not use this file except in compliance with the License. 744961713Sgirish * 844961713Sgirish * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 944961713Sgirish * or http://www.opensolaris.org/os/licensing. 1044961713Sgirish * See the License for the specific language governing permissions 1144961713Sgirish * and limitations under the License. 1244961713Sgirish * 1344961713Sgirish * When distributing Covered Code, include this CDDL HEADER in each 1444961713Sgirish * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 1544961713Sgirish * If applicable, add the following below this CDDL HEADER, with the 1644961713Sgirish * fields enclosed by brackets "[]" replaced with your own identifying 1744961713Sgirish * information: Portions Copyright [yyyy] [name of copyright owner] 1844961713Sgirish * 1944961713Sgirish * CDDL HEADER END 2044961713Sgirish */ 2144961713Sgirish /* 22ee5416c9Syc * Copyright 2007 Sun Microsystems, Inc. All rights reserved. 2344961713Sgirish * Use is subject to license terms. 2444961713Sgirish */ 2544961713Sgirish 2644961713Sgirish #ifndef _SYS_NXGE_NXGE_FM_H 2744961713Sgirish #define _SYS_NXGE_NXGE_FM_H 2844961713Sgirish 2944961713Sgirish #ifdef __cplusplus 3044961713Sgirish extern "C" { 3144961713Sgirish #endif 3244961713Sgirish 3344961713Sgirish #include <sys/ddi.h> 3444961713Sgirish 3514ea4bb7Ssd #define ERNAME_DETAILED_ERR_TYPE "detailed error type" 3644961713Sgirish #define ERNAME_ERR_PORTN "port number" 3744961713Sgirish #define ERNAME_ERR_DCHAN "dma channel number" 3844961713Sgirish #define ERNAME_TCAM_ERR_LOG "tcam error log" 3944961713Sgirish #define ERNAME_VLANTAB_ERR_LOG "vlan table error log" 4044961713Sgirish #define ERNAME_HASHTAB_ERR_LOG "hash table error log" 4144961713Sgirish #define ERNAME_HASHT_LOOKUP_ERR_LOG0 "hash table lookup error log0" 4244961713Sgirish #define ERNAME_HASHT_LOOKUP_ERR_LOG1 "hash table lookup error log1" 4344961713Sgirish #define ERNAME_RDMC_PAR_ERR_LOG "rdmc parity error log" 4444961713Sgirish #define ERNAME_DFIFO_RD_PTR "dfifo read pointer" 4544961713Sgirish #define ERNAME_IPP_STATE_MACH "ipp state machine" 4644961713Sgirish #define ERNAME_DFIFO_ENTRY "dfifo entry" 4744961713Sgirish #define ERNAME_DFIFO_SYNDROME "dfifo syndrome" 4844961713Sgirish #define ERNAME_PFIFO_ENTRY "pfifo entry" 4944961713Sgirish #define ERNAME_ZCP_STATE_MACH "zcp state machine" 5044961713Sgirish #define ERNAME_CFIFO_PORT_NUM "cfifo port number" 5144961713Sgirish #define ERNAME_RDC_ERR_TYPE "completion error type" 5244961713Sgirish #define ERNAME_TDMC_ERR_LOG0 "tdmc error log0" 5344961713Sgirish #define ERNAME_TDMC_ERR_LOG1 "tdmc error log1" 5444961713Sgirish #define ERNAME_TXC_ROECC_ADDR "txc reorder FIFO ECC error address" 5544961713Sgirish #define ERNAME_TXC_ROECC_DATA0 "txc reorder FIFO data0" 5644961713Sgirish #define ERNAME_TXC_ROECC_DATA1 "txc reorder FIFO data1" 5744961713Sgirish #define ERNAME_TXC_ROECC_DATA2 "txc reorder FIFO data2" 5844961713Sgirish #define ERNAME_TXC_ROECC_DATA3 "txc reorder FIFO data3" 5944961713Sgirish #define ERNAME_TXC_ROECC_DATA4 "txc reorder FIFO data4" 6044961713Sgirish #define ERNAME_TXC_RO_STATE0 "txc reorder FIFO error state0" \ 6144961713Sgirish "(duplicate TID)" 6244961713Sgirish #define ERNAME_TXC_RO_STATE1 "txc reorder FIFO error state1" \ 6344961713Sgirish "(uninitialized TID)" 6444961713Sgirish #define ERNAME_TXC_RO_STATE2 "txc reorder FIFO error state2" \ 6544961713Sgirish "(timed out TIDs)" 6644961713Sgirish #define ERNAME_TXC_RO_STATE3 "txc reorder FIFO error state3" 6744961713Sgirish #define ERNAME_TXC_RO_STATE_CTL "txc reorder FIFO error control" 6844961713Sgirish #define ERNAME_TXC_RO_TIDS "txc reorder tids" 6944961713Sgirish #define ERNAME_TXC_SFECC_ADDR "txc store forward FIFO ECC error "\ 7044961713Sgirish "address" 7144961713Sgirish #define ERNAME_TXC_SFECC_DATA0 "txc store forward FIFO data0" 7244961713Sgirish #define ERNAME_TXC_SFECC_DATA1 "txc store forward FIFO data1" 7344961713Sgirish #define ERNAME_TXC_SFECC_DATA2 "txc store forward FIFO data2" 7444961713Sgirish #define ERNAME_TXC_SFECC_DATA3 "txc store forward FIFO data3" 7544961713Sgirish #define ERNAME_TXC_SFECC_DATA4 "txc store forward FIFO data4" 7644961713Sgirish 7744961713Sgirish #define EREPORT_FM_ID_SHIFT 16 7844961713Sgirish #define EREPORT_FM_ID_MASK 0xFF 7944961713Sgirish #define EREPORT_INDEX_MASK 0xFF 8044961713Sgirish #define NXGE_FM_EREPORT_UNKNOWN 0 8144961713Sgirish 82ee5416c9Syc /* xaui and xfp ereport definitions */ 83ee5416c9Syc #define NXGE_FM_DEVICE_XAUI_ERR "nxge.xaui-err" 84ee5416c9Syc #define NXGE_FM_DEVICE_XFP_ERR "nxge.xfp-err" 85ee5416c9Syc 8644961713Sgirish #define FM_SW_ID 0xFF 8744961713Sgirish #define FM_PCS_ID MAC_BLK_ID 8844961713Sgirish #define FM_TXMAC_ID TXMAC_BLK_ID 8944961713Sgirish #define FM_RXMAC_ID RXMAC_BLK_ID 9044961713Sgirish #define FM_MIF_ID MIF_BLK_ID 9144961713Sgirish #define FM_IPP_ID IPP_BLK_ID 9244961713Sgirish #define FM_TXC_ID TXC_BLK_ID 9344961713Sgirish #define FM_TXDMA_ID TXDMA_BLK_ID 9444961713Sgirish #define FM_RXDMA_ID RXDMA_BLK_ID 9544961713Sgirish #define FM_ZCP_ID ZCP_BLK_ID 9644961713Sgirish #define FM_ESPC_ID ESPC_BLK_ID 9744961713Sgirish #define FM_FFLP_ID FFLP_BLK_ID 9844961713Sgirish #define FM_PCIE_ID PCIE_BLK_ID 9944961713Sgirish #define FM_ETHER_SERDES_ID ETHER_SERDES_BLK_ID 10044961713Sgirish #define FM_PCIE_SERDES_ID PCIE_SERDES_BLK_ID 10144961713Sgirish #define FM_VIR_ID VIR_BLK_ID 102ee5416c9Syc #define FM_XAUI_ID XAUI_BLK_ID 103ee5416c9Syc #define FM_XFP_ID XFP_BLK_ID 10444961713Sgirish 10544961713Sgirish typedef uint32_t nxge_fm_ereport_id_t; 10644961713Sgirish 10744961713Sgirish typedef struct _nxge_fm_ereport_attr { 10844961713Sgirish uint32_t index; 10914ea4bb7Ssd char *str; 11044961713Sgirish char *eclass; 11144961713Sgirish ddi_fault_impact_t impact; 11244961713Sgirish } nxge_fm_ereport_attr_t; 11344961713Sgirish 11444961713Sgirish /* General MAC ereports */ 11544961713Sgirish typedef enum { 11644961713Sgirish NXGE_FM_EREPORT_XPCS_LINK_DOWN = (FM_PCS_ID << EREPORT_FM_ID_SHIFT), 11744961713Sgirish NXGE_FM_EREPORT_XPCS_TX_LINK_FAULT, 11844961713Sgirish NXGE_FM_EREPORT_XPCS_RX_LINK_FAULT, 11944961713Sgirish NXGE_FM_EREPORT_PCS_LINK_DOWN, 12044961713Sgirish NXGE_FM_EREPORT_PCS_REMOTE_FAULT 12144961713Sgirish } nxge_fm_ereport_pcs_t; 12244961713Sgirish 12344961713Sgirish /* MIF ereports */ 12444961713Sgirish typedef enum { 12544961713Sgirish NXGE_FM_EREPORT_MIF_ACCESS_FAIL = (FM_MIF_ID << EREPORT_FM_ID_SHIFT) 12644961713Sgirish } nxge_fm_ereport_mif_t; 12744961713Sgirish 12844961713Sgirish /* FFLP ereports */ 12944961713Sgirish typedef enum { 13044961713Sgirish NXGE_FM_EREPORT_FFLP_TCAM_ERR = (FM_FFLP_ID << EREPORT_FM_ID_SHIFT), 13144961713Sgirish NXGE_FM_EREPORT_FFLP_VLAN_PAR_ERR, 13244961713Sgirish NXGE_FM_EREPORT_FFLP_HASHT_DATA_ERR, 13344961713Sgirish NXGE_FM_EREPORT_FFLP_HASHT_LOOKUP_ERR, 13444961713Sgirish NXGE_FM_EREPORT_FFLP_ACCESS_FAIL 13544961713Sgirish } nxge_fm_ereport_fflp_t; 13644961713Sgirish 13744961713Sgirish /* IPP ereports */ 13844961713Sgirish typedef enum { 13944961713Sgirish NXGE_FM_EREPORT_IPP_EOP_MISS = (FM_IPP_ID << EREPORT_FM_ID_SHIFT), 14044961713Sgirish NXGE_FM_EREPORT_IPP_SOP_MISS, 14144961713Sgirish NXGE_FM_EREPORT_IPP_DFIFO_UE, 14244961713Sgirish NXGE_FM_EREPORT_IPP_DFIFO_CE, 14344961713Sgirish NXGE_FM_EREPORT_IPP_PFIFO_PERR, 14444961713Sgirish NXGE_FM_EREPORT_IPP_ECC_ERR_MAX, 14544961713Sgirish NXGE_FM_EREPORT_IPP_PFIFO_OVER, 14644961713Sgirish NXGE_FM_EREPORT_IPP_PFIFO_UND, 14744961713Sgirish NXGE_FM_EREPORT_IPP_BAD_CS_MX, 14844961713Sgirish NXGE_FM_EREPORT_IPP_PKT_DIS_MX, 14944961713Sgirish NXGE_FM_EREPORT_IPP_RESET_FAIL 15044961713Sgirish } nxge_fm_ereport_ipp_t; 15144961713Sgirish 15244961713Sgirish /* RDMC ereports */ 15344961713Sgirish typedef enum { 15444961713Sgirish NXGE_FM_EREPORT_RDMC_DCF_ERR = (FM_RXDMA_ID << EREPORT_FM_ID_SHIFT), 15544961713Sgirish NXGE_FM_EREPORT_RDMC_RCR_ACK_ERR, 15644961713Sgirish NXGE_FM_EREPORT_RDMC_DC_FIFO_ERR, 15744961713Sgirish NXGE_FM_EREPORT_RDMC_RCR_SHA_PAR, 15844961713Sgirish NXGE_FM_EREPORT_RDMC_RBR_PRE_PAR, 15944961713Sgirish NXGE_FM_EREPORT_RDMC_RBR_TMOUT, 16044961713Sgirish NXGE_FM_EREPORT_RDMC_RSP_CNT_ERR, 16144961713Sgirish NXGE_FM_EREPORT_RDMC_BYTE_EN_BUS, 16244961713Sgirish NXGE_FM_EREPORT_RDMC_RSP_DAT_ERR, 16344961713Sgirish NXGE_FM_EREPORT_RDMC_ID_MISMATCH, 16444961713Sgirish NXGE_FM_EREPORT_RDMC_ZCP_EOP_ERR, 16544961713Sgirish NXGE_FM_EREPORT_RDMC_IPP_EOP_ERR, 166*53f3d8ecSyc NXGE_FM_EREPORT_RDMC_RCR_ERR, 16744961713Sgirish NXGE_FM_EREPORT_RDMC_CONFIG_ERR, 16844961713Sgirish NXGE_FM_EREPORT_RDMC_RCRINCON, 16944961713Sgirish NXGE_FM_EREPORT_RDMC_RCRFULL, 17044961713Sgirish NXGE_FM_EREPORT_RDMC_RBRFULL, 17144961713Sgirish NXGE_FM_EREPORT_RDMC_RBRLOGPAGE, 17244961713Sgirish NXGE_FM_EREPORT_RDMC_CFIGLOGPAGE 17344961713Sgirish } nxge_fm_ereport_rdmc_t; 17444961713Sgirish 17544961713Sgirish /* ZCP ereports */ 17644961713Sgirish typedef enum { 17744961713Sgirish NXGE_FM_EREPORT_ZCP_RRFIFO_UNDERRUN = 17844961713Sgirish (FM_ZCP_ID << EREPORT_FM_ID_SHIFT), 17944961713Sgirish NXGE_FM_EREPORT_ZCP_RSPFIFO_UNCORR_ERR, 18044961713Sgirish NXGE_FM_EREPORT_ZCP_STAT_TBL_PERR, 18144961713Sgirish NXGE_FM_EREPORT_ZCP_DYN_TBL_PERR, 18244961713Sgirish NXGE_FM_EREPORT_ZCP_BUF_TBL_PERR, 18344961713Sgirish NXGE_FM_EREPORT_ZCP_CFIFO_ECC, 18444961713Sgirish NXGE_FM_EREPORT_ZCP_RRFIFO_OVERRUN, 18544961713Sgirish NXGE_FM_EREPORT_ZCP_BUFFER_OVERFLOW, 18644961713Sgirish NXGE_FM_EREPORT_ZCP_TT_PROGRAM_ERR, 18744961713Sgirish NXGE_FM_EREPORT_ZCP_RSP_TT_INDEX_ERR, 18844961713Sgirish NXGE_FM_EREPORT_ZCP_SLV_TT_INDEX_ERR, 18944961713Sgirish NXGE_FM_EREPORT_ZCP_TT_INDEX_ERR, 19044961713Sgirish NXGE_FM_EREPORT_ZCP_ACCESS_FAIL 19144961713Sgirish } nxge_fm_ereport_zcp_t; 19244961713Sgirish 19344961713Sgirish typedef enum { 19444961713Sgirish NXGE_FM_EREPORT_RXMAC_UNDERFLOW = (FM_RXMAC_ID << EREPORT_FM_ID_SHIFT), 19544961713Sgirish NXGE_FM_EREPORT_RXMAC_CRC_ERRCNT_EXP, 19644961713Sgirish NXGE_FM_EREPORT_RXMAC_LENGTH_ERRCNT_EXP, 19744961713Sgirish NXGE_FM_EREPORT_RXMAC_VIOL_ERRCNT_EXP, 19844961713Sgirish NXGE_FM_EREPORT_RXMAC_RXFRAG_CNT_EXP, 19944961713Sgirish NXGE_FM_EREPORT_RXMAC_ALIGN_ECNT_EXP, 20044961713Sgirish NXGE_FM_EREPORT_RXMAC_LINKFAULT_CNT_EXP, 20144961713Sgirish NXGE_FM_EREPORT_RXMAC_RESET_FAIL 20244961713Sgirish } nxge_fm_ereport_rxmac_t; 20344961713Sgirish 20444961713Sgirish typedef enum { 20544961713Sgirish NXGE_FM_EREPORT_TDMC_PREF_BUF_PAR_ERR = 20644961713Sgirish (FM_TXDMA_ID << EREPORT_FM_ID_SHIFT), 20744961713Sgirish NXGE_FM_EREPORT_TDMC_MBOX_ERR, 20844961713Sgirish NXGE_FM_EREPORT_TDMC_NACK_PREF, 20944961713Sgirish NXGE_FM_EREPORT_TDMC_NACK_PKT_RD, 21044961713Sgirish NXGE_FM_EREPORT_TDMC_PKT_SIZE_ERR, 21144961713Sgirish NXGE_FM_EREPORT_TDMC_TX_RING_OFLOW, 21244961713Sgirish NXGE_FM_EREPORT_TDMC_CONF_PART_ERR, 21344961713Sgirish NXGE_FM_EREPORT_TDMC_PKT_PRT_ERR, 21444961713Sgirish NXGE_FM_EREPORT_TDMC_RESET_FAIL 21544961713Sgirish } nxge_fm_ereport_attr_tdmc_t; 21644961713Sgirish 21744961713Sgirish typedef enum { 21844961713Sgirish NXGE_FM_EREPORT_TXC_RO_CORRECT_ERR = 21944961713Sgirish (FM_TXC_ID << EREPORT_FM_ID_SHIFT), 22044961713Sgirish NXGE_FM_EREPORT_TXC_RO_UNCORRECT_ERR, 22144961713Sgirish NXGE_FM_EREPORT_TXC_SF_CORRECT_ERR, 22244961713Sgirish NXGE_FM_EREPORT_TXC_SF_UNCORRECT_ERR, 22344961713Sgirish NXGE_FM_EREPORT_TXC_ASSY_DEAD, 22444961713Sgirish NXGE_FM_EREPORT_TXC_REORDER_ERR 22544961713Sgirish } nxge_fm_ereport_attr_txc_t; 22644961713Sgirish 22744961713Sgirish typedef enum { 22844961713Sgirish NXGE_FM_EREPORT_TXMAC_UNDERFLOW = 22944961713Sgirish (FM_TXMAC_ID << EREPORT_FM_ID_SHIFT), 23044961713Sgirish NXGE_FM_EREPORT_TXMAC_OVERFLOW, 23144961713Sgirish NXGE_FM_EREPORT_TXMAC_TXFIFO_XFR_ERR, 23244961713Sgirish NXGE_FM_EREPORT_TXMAC_MAX_PKT_ERR, 23344961713Sgirish NXGE_FM_EREPORT_TXMAC_RESET_FAIL 23444961713Sgirish } nxge_fm_ereport_attr_txmac_t; 23544961713Sgirish 23644961713Sgirish typedef enum { 23744961713Sgirish NXGE_FM_EREPORT_ESPC_ACCESS_FAIL = (FM_ESPC_ID << EREPORT_FM_ID_SHIFT) 23844961713Sgirish } nxge_fm_ereport_espc_t; 23944961713Sgirish 24044961713Sgirish typedef enum { 24144961713Sgirish NXGE_FM_EREPORT_SW_INVALID_PORT_NUM = (FM_SW_ID << EREPORT_FM_ID_SHIFT), 24244961713Sgirish NXGE_FM_EREPORT_SW_INVALID_CHAN_NUM, 24344961713Sgirish NXGE_FM_EREPORT_SW_INVALID_PARAM 24444961713Sgirish } nxge_fm_ereport_sw_t; 24544961713Sgirish 246ee5416c9Syc /* XAUI is broken or missing */ 247ee5416c9Syc typedef enum { 248ee5416c9Syc NXGE_FM_EREPORT_XAUI_ERR = (FM_XAUI_ID << EREPORT_FM_ID_SHIFT) 249ee5416c9Syc } nxge_fm_ereport_xaui_t; 250ee5416c9Syc 251ee5416c9Syc /* XFP optical module is broken or missing */ 252ee5416c9Syc typedef enum { 253ee5416c9Syc NXGE_FM_EREPORT_XFP_ERR = (FM_XFP_ID << EREPORT_FM_ID_SHIFT) 254ee5416c9Syc } nxge_fm_ereport_xfp_t; 255ee5416c9Syc 25644961713Sgirish #define NXGE_FM_EREPORT_UNKNOWN 0 25744961713Sgirish #define NXGE_FM_EREPORT_UNKNOWN_NAME "" 25844961713Sgirish 25944961713Sgirish #ifdef __cplusplus 26044961713Sgirish } 26144961713Sgirish #endif 26244961713Sgirish 26344961713Sgirish #endif /* _SYS_NXGE_NXGE_FM_H */ 264