xref: /onnv-gate/usr/src/uts/common/sys/nxge/nxge_fm.h (revision 5165:40a9055a6b98)
13859Sml29623 /*
23859Sml29623  * CDDL HEADER START
33859Sml29623  *
43859Sml29623  * The contents of this file are subject to the terms of the
53859Sml29623  * Common Development and Distribution License (the "License").
63859Sml29623  * You may not use this file except in compliance with the License.
73859Sml29623  *
83859Sml29623  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
93859Sml29623  * or http://www.opensolaris.org/os/licensing.
103859Sml29623  * See the License for the specific language governing permissions
113859Sml29623  * and limitations under the License.
123859Sml29623  *
133859Sml29623  * When distributing Covered Code, include this CDDL HEADER in each
143859Sml29623  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
153859Sml29623  * If applicable, add the following below this CDDL HEADER, with the
163859Sml29623  * fields enclosed by brackets "[]" replaced with your own identifying
173859Sml29623  * information: Portions Copyright [yyyy] [name of copyright owner]
183859Sml29623  *
193859Sml29623  * CDDL HEADER END
203859Sml29623  */
213859Sml29623 /*
225060Syc148097  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
233859Sml29623  * Use is subject to license terms.
243859Sml29623  */
253859Sml29623 
263859Sml29623 #ifndef	_SYS_NXGE_NXGE_FM_H
273859Sml29623 #define	_SYS_NXGE_NXGE_FM_H
283859Sml29623 
293859Sml29623 #pragma ident	"%Z%%M%	%I%	%E% SMI"
303859Sml29623 
313859Sml29623 #ifdef	__cplusplus
323859Sml29623 extern "C" {
333859Sml29623 #endif
343859Sml29623 
353859Sml29623 #include <sys/ddi.h>
363859Sml29623 
373859Sml29623 #define	ERNAME_DETAILED_ERR_TYPE	"detailed error type"
383859Sml29623 #define	ERNAME_ERR_PORTN		"port number"
393859Sml29623 #define	ERNAME_ERR_DCHAN		"dma channel number"
403859Sml29623 #define	ERNAME_TCAM_ERR_LOG		"tcam error log"
413859Sml29623 #define	ERNAME_VLANTAB_ERR_LOG		"vlan table error log"
423859Sml29623 #define	ERNAME_HASHTAB_ERR_LOG		"hash table error log"
433859Sml29623 #define	ERNAME_HASHT_LOOKUP_ERR_LOG0	"hash table lookup error log0"
443859Sml29623 #define	ERNAME_HASHT_LOOKUP_ERR_LOG1	"hash table lookup error log1"
453859Sml29623 #define	ERNAME_RDMC_PAR_ERR_LOG		"rdmc parity error log"
463859Sml29623 #define	ERNAME_DFIFO_RD_PTR		"dfifo read pointer"
473859Sml29623 #define	ERNAME_IPP_STATE_MACH		"ipp state machine"
483859Sml29623 #define	ERNAME_DFIFO_ENTRY		"dfifo entry"
493859Sml29623 #define	ERNAME_DFIFO_SYNDROME		"dfifo syndrome"
503859Sml29623 #define	ERNAME_PFIFO_ENTRY		"pfifo entry"
513859Sml29623 #define	ERNAME_ZCP_STATE_MACH		"zcp state machine"
523859Sml29623 #define	ERNAME_CFIFO_PORT_NUM		"cfifo port number"
533859Sml29623 #define	ERNAME_RDC_ERR_TYPE		"completion error type"
543859Sml29623 #define	ERNAME_TDMC_ERR_LOG0		"tdmc error log0"
553859Sml29623 #define	ERNAME_TDMC_ERR_LOG1		"tdmc error log1"
563859Sml29623 #define	ERNAME_TXC_ROECC_ADDR		"txc reorder FIFO ECC error address"
573859Sml29623 #define	ERNAME_TXC_ROECC_DATA0		"txc reorder FIFO data0"
583859Sml29623 #define	ERNAME_TXC_ROECC_DATA1		"txc reorder FIFO data1"
593859Sml29623 #define	ERNAME_TXC_ROECC_DATA2		"txc reorder FIFO data2"
603859Sml29623 #define	ERNAME_TXC_ROECC_DATA3		"txc reorder FIFO data3"
613859Sml29623 #define	ERNAME_TXC_ROECC_DATA4		"txc reorder FIFO data4"
623859Sml29623 #define	ERNAME_TXC_RO_STATE0		"txc reorder FIFO error state0" \
633859Sml29623 					"(duplicate TID)"
643859Sml29623 #define	ERNAME_TXC_RO_STATE1		"txc reorder FIFO error state1" \
653859Sml29623 					"(uninitialized TID)"
663859Sml29623 #define	ERNAME_TXC_RO_STATE2		"txc reorder FIFO error state2" \
673859Sml29623 					"(timed out TIDs)"
683859Sml29623 #define	ERNAME_TXC_RO_STATE3		"txc reorder FIFO error state3"
693859Sml29623 #define	ERNAME_TXC_RO_STATE_CTL		"txc reorder FIFO error control"
703859Sml29623 #define	ERNAME_TXC_RO_TIDS		"txc reorder tids"
713859Sml29623 #define	ERNAME_TXC_SFECC_ADDR		"txc store forward FIFO ECC error "\
723859Sml29623 					"address"
733859Sml29623 #define	ERNAME_TXC_SFECC_DATA0		"txc store forward FIFO data0"
743859Sml29623 #define	ERNAME_TXC_SFECC_DATA1		"txc store forward FIFO data1"
753859Sml29623 #define	ERNAME_TXC_SFECC_DATA2		"txc store forward FIFO data2"
763859Sml29623 #define	ERNAME_TXC_SFECC_DATA3		"txc store forward FIFO data3"
773859Sml29623 #define	ERNAME_TXC_SFECC_DATA4		"txc store forward FIFO data4"
783859Sml29623 
793859Sml29623 #define	EREPORT_FM_ID_SHIFT		16
803859Sml29623 #define	EREPORT_FM_ID_MASK		0xFF
813859Sml29623 #define	EREPORT_INDEX_MASK		0xFF
823859Sml29623 #define	NXGE_FM_EREPORT_UNKNOWN		0
833859Sml29623 
845060Syc148097 /* xaui and xfp ereport definitions */
855060Syc148097 #define	NXGE_FM_DEVICE_XAUI_ERR		"nxge.xaui-err"
865060Syc148097 #define	NXGE_FM_DEVICE_XFP_ERR		"nxge.xfp-err"
875060Syc148097 
883859Sml29623 #define	FM_SW_ID			0xFF
893859Sml29623 #define	FM_PCS_ID			MAC_BLK_ID
903859Sml29623 #define	FM_TXMAC_ID			TXMAC_BLK_ID
913859Sml29623 #define	FM_RXMAC_ID			RXMAC_BLK_ID
923859Sml29623 #define	FM_MIF_ID			MIF_BLK_ID
933859Sml29623 #define	FM_IPP_ID			IPP_BLK_ID
943859Sml29623 #define	FM_TXC_ID			TXC_BLK_ID
953859Sml29623 #define	FM_TXDMA_ID			TXDMA_BLK_ID
963859Sml29623 #define	FM_RXDMA_ID			RXDMA_BLK_ID
973859Sml29623 #define	FM_ZCP_ID			ZCP_BLK_ID
983859Sml29623 #define	FM_ESPC_ID			ESPC_BLK_ID
993859Sml29623 #define	FM_FFLP_ID			FFLP_BLK_ID
1003859Sml29623 #define	FM_PCIE_ID			PCIE_BLK_ID
1013859Sml29623 #define	FM_ETHER_SERDES_ID		ETHER_SERDES_BLK_ID
1023859Sml29623 #define	FM_PCIE_SERDES_ID		PCIE_SERDES_BLK_ID
1033859Sml29623 #define	FM_VIR_ID			VIR_BLK_ID
1045060Syc148097 #define	FM_XAUI_ID			XAUI_BLK_ID
1055060Syc148097 #define	FM_XFP_ID			XFP_BLK_ID
1063859Sml29623 
1073859Sml29623 typedef	uint32_t nxge_fm_ereport_id_t;
1083859Sml29623 
1093859Sml29623 typedef	struct _nxge_fm_ereport_attr {
1103859Sml29623 	uint32_t		index;
1113859Sml29623 	char			*str;
1123859Sml29623 	char			*eclass;
1133859Sml29623 	ddi_fault_impact_t	impact;
1143859Sml29623 } nxge_fm_ereport_attr_t;
1153859Sml29623 
1163859Sml29623 /* General MAC ereports */
1173859Sml29623 typedef	enum {
1183859Sml29623 	NXGE_FM_EREPORT_XPCS_LINK_DOWN = (FM_PCS_ID << EREPORT_FM_ID_SHIFT),
1193859Sml29623 	NXGE_FM_EREPORT_XPCS_TX_LINK_FAULT,
1203859Sml29623 	NXGE_FM_EREPORT_XPCS_RX_LINK_FAULT,
1213859Sml29623 	NXGE_FM_EREPORT_PCS_LINK_DOWN,
1223859Sml29623 	NXGE_FM_EREPORT_PCS_REMOTE_FAULT
1233859Sml29623 } nxge_fm_ereport_pcs_t;
1243859Sml29623 
1253859Sml29623 /* MIF ereports */
1263859Sml29623 typedef	enum {
1273859Sml29623 	NXGE_FM_EREPORT_MIF_ACCESS_FAIL = (FM_MIF_ID << EREPORT_FM_ID_SHIFT)
1283859Sml29623 } nxge_fm_ereport_mif_t;
1293859Sml29623 
1303859Sml29623 /* FFLP ereports */
1313859Sml29623 typedef	enum {
1323859Sml29623 	NXGE_FM_EREPORT_FFLP_TCAM_ERR = (FM_FFLP_ID << EREPORT_FM_ID_SHIFT),
1333859Sml29623 	NXGE_FM_EREPORT_FFLP_VLAN_PAR_ERR,
1343859Sml29623 	NXGE_FM_EREPORT_FFLP_HASHT_DATA_ERR,
1353859Sml29623 	NXGE_FM_EREPORT_FFLP_HASHT_LOOKUP_ERR,
1363859Sml29623 	NXGE_FM_EREPORT_FFLP_ACCESS_FAIL
1373859Sml29623 } nxge_fm_ereport_fflp_t;
1383859Sml29623 
1393859Sml29623 /* IPP ereports */
1403859Sml29623 typedef	enum {
1413859Sml29623 	NXGE_FM_EREPORT_IPP_EOP_MISS = (FM_IPP_ID << EREPORT_FM_ID_SHIFT),
1423859Sml29623 	NXGE_FM_EREPORT_IPP_SOP_MISS,
1433859Sml29623 	NXGE_FM_EREPORT_IPP_DFIFO_UE,
1443859Sml29623 	NXGE_FM_EREPORT_IPP_DFIFO_CE,
1453859Sml29623 	NXGE_FM_EREPORT_IPP_PFIFO_PERR,
1463859Sml29623 	NXGE_FM_EREPORT_IPP_ECC_ERR_MAX,
1473859Sml29623 	NXGE_FM_EREPORT_IPP_PFIFO_OVER,
1483859Sml29623 	NXGE_FM_EREPORT_IPP_PFIFO_UND,
1493859Sml29623 	NXGE_FM_EREPORT_IPP_BAD_CS_MX,
1503859Sml29623 	NXGE_FM_EREPORT_IPP_PKT_DIS_MX,
1513859Sml29623 	NXGE_FM_EREPORT_IPP_RESET_FAIL
1523859Sml29623 } nxge_fm_ereport_ipp_t;
1533859Sml29623 
1543859Sml29623 /* RDMC ereports */
1553859Sml29623 typedef	enum {
1563859Sml29623 	NXGE_FM_EREPORT_RDMC_DCF_ERR = (FM_RXDMA_ID << EREPORT_FM_ID_SHIFT),
1573859Sml29623 	NXGE_FM_EREPORT_RDMC_RCR_ACK_ERR,
1583859Sml29623 	NXGE_FM_EREPORT_RDMC_DC_FIFO_ERR,
1593859Sml29623 	NXGE_FM_EREPORT_RDMC_RCR_SHA_PAR,
1603859Sml29623 	NXGE_FM_EREPORT_RDMC_RBR_PRE_PAR,
1613859Sml29623 	NXGE_FM_EREPORT_RDMC_RBR_TMOUT,
1623859Sml29623 	NXGE_FM_EREPORT_RDMC_RSP_CNT_ERR,
1633859Sml29623 	NXGE_FM_EREPORT_RDMC_BYTE_EN_BUS,
1643859Sml29623 	NXGE_FM_EREPORT_RDMC_RSP_DAT_ERR,
1653859Sml29623 	NXGE_FM_EREPORT_RDMC_ID_MISMATCH,
1663859Sml29623 	NXGE_FM_EREPORT_RDMC_ZCP_EOP_ERR,
1673859Sml29623 	NXGE_FM_EREPORT_RDMC_IPP_EOP_ERR,
168*5165Syc148097 	NXGE_FM_EREPORT_RDMC_RCR_ERR,
1693859Sml29623 	NXGE_FM_EREPORT_RDMC_CONFIG_ERR,
1703859Sml29623 	NXGE_FM_EREPORT_RDMC_RCRINCON,
1713859Sml29623 	NXGE_FM_EREPORT_RDMC_RCRFULL,
1723859Sml29623 	NXGE_FM_EREPORT_RDMC_RBRFULL,
1733859Sml29623 	NXGE_FM_EREPORT_RDMC_RBRLOGPAGE,
1743859Sml29623 	NXGE_FM_EREPORT_RDMC_CFIGLOGPAGE
1753859Sml29623 } nxge_fm_ereport_rdmc_t;
1763859Sml29623 
1773859Sml29623 /* ZCP ereports */
1783859Sml29623 typedef	enum {
1793859Sml29623 	NXGE_FM_EREPORT_ZCP_RRFIFO_UNDERRUN =
1803859Sml29623 					(FM_ZCP_ID << EREPORT_FM_ID_SHIFT),
1813859Sml29623 	NXGE_FM_EREPORT_ZCP_RSPFIFO_UNCORR_ERR,
1823859Sml29623 	NXGE_FM_EREPORT_ZCP_STAT_TBL_PERR,
1833859Sml29623 	NXGE_FM_EREPORT_ZCP_DYN_TBL_PERR,
1843859Sml29623 	NXGE_FM_EREPORT_ZCP_BUF_TBL_PERR,
1853859Sml29623 	NXGE_FM_EREPORT_ZCP_CFIFO_ECC,
1863859Sml29623 	NXGE_FM_EREPORT_ZCP_RRFIFO_OVERRUN,
1873859Sml29623 	NXGE_FM_EREPORT_ZCP_BUFFER_OVERFLOW,
1883859Sml29623 	NXGE_FM_EREPORT_ZCP_TT_PROGRAM_ERR,
1893859Sml29623 	NXGE_FM_EREPORT_ZCP_RSP_TT_INDEX_ERR,
1903859Sml29623 	NXGE_FM_EREPORT_ZCP_SLV_TT_INDEX_ERR,
1913859Sml29623 	NXGE_FM_EREPORT_ZCP_TT_INDEX_ERR,
1923859Sml29623 	NXGE_FM_EREPORT_ZCP_ACCESS_FAIL
1933859Sml29623 } nxge_fm_ereport_zcp_t;
1943859Sml29623 
1953859Sml29623 typedef enum {
1963859Sml29623 	NXGE_FM_EREPORT_RXMAC_UNDERFLOW = (FM_RXMAC_ID << EREPORT_FM_ID_SHIFT),
1973859Sml29623 	NXGE_FM_EREPORT_RXMAC_CRC_ERRCNT_EXP,
1983859Sml29623 	NXGE_FM_EREPORT_RXMAC_LENGTH_ERRCNT_EXP,
1993859Sml29623 	NXGE_FM_EREPORT_RXMAC_VIOL_ERRCNT_EXP,
2003859Sml29623 	NXGE_FM_EREPORT_RXMAC_RXFRAG_CNT_EXP,
2013859Sml29623 	NXGE_FM_EREPORT_RXMAC_ALIGN_ECNT_EXP,
2023859Sml29623 	NXGE_FM_EREPORT_RXMAC_LINKFAULT_CNT_EXP,
2033859Sml29623 	NXGE_FM_EREPORT_RXMAC_RESET_FAIL
2043859Sml29623 } nxge_fm_ereport_rxmac_t;
2053859Sml29623 
2063859Sml29623 typedef	enum {
2073859Sml29623 	NXGE_FM_EREPORT_TDMC_PREF_BUF_PAR_ERR =
2083859Sml29623 				(FM_TXDMA_ID << EREPORT_FM_ID_SHIFT),
2093859Sml29623 	NXGE_FM_EREPORT_TDMC_MBOX_ERR,
2103859Sml29623 	NXGE_FM_EREPORT_TDMC_NACK_PREF,
2113859Sml29623 	NXGE_FM_EREPORT_TDMC_NACK_PKT_RD,
2123859Sml29623 	NXGE_FM_EREPORT_TDMC_PKT_SIZE_ERR,
2133859Sml29623 	NXGE_FM_EREPORT_TDMC_TX_RING_OFLOW,
2143859Sml29623 	NXGE_FM_EREPORT_TDMC_CONF_PART_ERR,
2153859Sml29623 	NXGE_FM_EREPORT_TDMC_PKT_PRT_ERR,
2163859Sml29623 	NXGE_FM_EREPORT_TDMC_RESET_FAIL
2173859Sml29623 } nxge_fm_ereport_attr_tdmc_t;
2183859Sml29623 
2193859Sml29623 typedef	enum {
2203859Sml29623 	NXGE_FM_EREPORT_TXC_RO_CORRECT_ERR =
2213859Sml29623 				(FM_TXC_ID << EREPORT_FM_ID_SHIFT),
2223859Sml29623 	NXGE_FM_EREPORT_TXC_RO_UNCORRECT_ERR,
2233859Sml29623 	NXGE_FM_EREPORT_TXC_SF_CORRECT_ERR,
2243859Sml29623 	NXGE_FM_EREPORT_TXC_SF_UNCORRECT_ERR,
2253859Sml29623 	NXGE_FM_EREPORT_TXC_ASSY_DEAD,
2263859Sml29623 	NXGE_FM_EREPORT_TXC_REORDER_ERR
2273859Sml29623 } nxge_fm_ereport_attr_txc_t;
2283859Sml29623 
2293859Sml29623 typedef	enum {
2303859Sml29623 	NXGE_FM_EREPORT_TXMAC_UNDERFLOW =
2313859Sml29623 				(FM_TXMAC_ID << EREPORT_FM_ID_SHIFT),
2323859Sml29623 	NXGE_FM_EREPORT_TXMAC_OVERFLOW,
2333859Sml29623 	NXGE_FM_EREPORT_TXMAC_TXFIFO_XFR_ERR,
2343859Sml29623 	NXGE_FM_EREPORT_TXMAC_MAX_PKT_ERR,
2353859Sml29623 	NXGE_FM_EREPORT_TXMAC_RESET_FAIL
2363859Sml29623 } nxge_fm_ereport_attr_txmac_t;
2373859Sml29623 
2383859Sml29623 typedef	enum {
2393859Sml29623 	NXGE_FM_EREPORT_ESPC_ACCESS_FAIL = (FM_ESPC_ID << EREPORT_FM_ID_SHIFT)
2403859Sml29623 } nxge_fm_ereport_espc_t;
2413859Sml29623 
2423859Sml29623 typedef	enum {
2433859Sml29623 	NXGE_FM_EREPORT_SW_INVALID_PORT_NUM = (FM_SW_ID << EREPORT_FM_ID_SHIFT),
2443859Sml29623 	NXGE_FM_EREPORT_SW_INVALID_CHAN_NUM,
2453859Sml29623 	NXGE_FM_EREPORT_SW_INVALID_PARAM
2463859Sml29623 } nxge_fm_ereport_sw_t;
2473859Sml29623 
2485060Syc148097 /* XAUI is broken or missing */
2495060Syc148097 typedef	enum {
2505060Syc148097 	NXGE_FM_EREPORT_XAUI_ERR = (FM_XAUI_ID << EREPORT_FM_ID_SHIFT)
2515060Syc148097 } nxge_fm_ereport_xaui_t;
2525060Syc148097 
2535060Syc148097 /* XFP optical module is broken or missing */
2545060Syc148097 typedef	enum {
2555060Syc148097 	NXGE_FM_EREPORT_XFP_ERR = (FM_XFP_ID << EREPORT_FM_ID_SHIFT)
2565060Syc148097 } nxge_fm_ereport_xfp_t;
2575060Syc148097 
2583859Sml29623 #define	NXGE_FM_EREPORT_UNKNOWN			0
2593859Sml29623 #define	NXGE_FM_EREPORT_UNKNOWN_NAME		""
2603859Sml29623 
2613859Sml29623 #ifdef	__cplusplus
2623859Sml29623 }
2633859Sml29623 #endif
2643859Sml29623 
2653859Sml29623 #endif	/* _SYS_NXGE_NXGE_FM_H */
266