xref: /titanic_51/usr/src/uts/common/sys/nxge/nxge_fm.h (revision 53f3d8ec65abebf833dcdcd7ae5c91d9677ab6d2)
16f45ec7bSml29623 /*
26f45ec7bSml29623  * CDDL HEADER START
36f45ec7bSml29623  *
46f45ec7bSml29623  * The contents of this file are subject to the terms of the
56f45ec7bSml29623  * Common Development and Distribution License (the "License").
66f45ec7bSml29623  * You may not use this file except in compliance with the License.
76f45ec7bSml29623  *
86f45ec7bSml29623  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
96f45ec7bSml29623  * or http://www.opensolaris.org/os/licensing.
106f45ec7bSml29623  * See the License for the specific language governing permissions
116f45ec7bSml29623  * and limitations under the License.
126f45ec7bSml29623  *
136f45ec7bSml29623  * When distributing Covered Code, include this CDDL HEADER in each
146f45ec7bSml29623  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
156f45ec7bSml29623  * If applicable, add the following below this CDDL HEADER, with the
166f45ec7bSml29623  * fields enclosed by brackets "[]" replaced with your own identifying
176f45ec7bSml29623  * information: Portions Copyright [yyyy] [name of copyright owner]
186f45ec7bSml29623  *
196f45ec7bSml29623  * CDDL HEADER END
206f45ec7bSml29623  */
216f45ec7bSml29623 /*
22ee5416c9Syc148097  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
236f45ec7bSml29623  * Use is subject to license terms.
246f45ec7bSml29623  */
256f45ec7bSml29623 
266f45ec7bSml29623 #ifndef	_SYS_NXGE_NXGE_FM_H
276f45ec7bSml29623 #define	_SYS_NXGE_NXGE_FM_H
286f45ec7bSml29623 
296f45ec7bSml29623 #pragma ident	"%Z%%M%	%I%	%E% SMI"
306f45ec7bSml29623 
316f45ec7bSml29623 #ifdef	__cplusplus
326f45ec7bSml29623 extern "C" {
336f45ec7bSml29623 #endif
346f45ec7bSml29623 
356f45ec7bSml29623 #include <sys/ddi.h>
366f45ec7bSml29623 
376f45ec7bSml29623 #define	ERNAME_DETAILED_ERR_TYPE	"detailed error type"
386f45ec7bSml29623 #define	ERNAME_ERR_PORTN		"port number"
396f45ec7bSml29623 #define	ERNAME_ERR_DCHAN		"dma channel number"
406f45ec7bSml29623 #define	ERNAME_TCAM_ERR_LOG		"tcam error log"
416f45ec7bSml29623 #define	ERNAME_VLANTAB_ERR_LOG		"vlan table error log"
426f45ec7bSml29623 #define	ERNAME_HASHTAB_ERR_LOG		"hash table error log"
436f45ec7bSml29623 #define	ERNAME_HASHT_LOOKUP_ERR_LOG0	"hash table lookup error log0"
446f45ec7bSml29623 #define	ERNAME_HASHT_LOOKUP_ERR_LOG1	"hash table lookup error log1"
456f45ec7bSml29623 #define	ERNAME_RDMC_PAR_ERR_LOG		"rdmc parity error log"
466f45ec7bSml29623 #define	ERNAME_DFIFO_RD_PTR		"dfifo read pointer"
476f45ec7bSml29623 #define	ERNAME_IPP_STATE_MACH		"ipp state machine"
486f45ec7bSml29623 #define	ERNAME_DFIFO_ENTRY		"dfifo entry"
496f45ec7bSml29623 #define	ERNAME_DFIFO_SYNDROME		"dfifo syndrome"
506f45ec7bSml29623 #define	ERNAME_PFIFO_ENTRY		"pfifo entry"
516f45ec7bSml29623 #define	ERNAME_ZCP_STATE_MACH		"zcp state machine"
526f45ec7bSml29623 #define	ERNAME_CFIFO_PORT_NUM		"cfifo port number"
536f45ec7bSml29623 #define	ERNAME_RDC_ERR_TYPE		"completion error type"
546f45ec7bSml29623 #define	ERNAME_TDMC_ERR_LOG0		"tdmc error log0"
556f45ec7bSml29623 #define	ERNAME_TDMC_ERR_LOG1		"tdmc error log1"
566f45ec7bSml29623 #define	ERNAME_TXC_ROECC_ADDR		"txc reorder FIFO ECC error address"
576f45ec7bSml29623 #define	ERNAME_TXC_ROECC_DATA0		"txc reorder FIFO data0"
586f45ec7bSml29623 #define	ERNAME_TXC_ROECC_DATA1		"txc reorder FIFO data1"
596f45ec7bSml29623 #define	ERNAME_TXC_ROECC_DATA2		"txc reorder FIFO data2"
606f45ec7bSml29623 #define	ERNAME_TXC_ROECC_DATA3		"txc reorder FIFO data3"
616f45ec7bSml29623 #define	ERNAME_TXC_ROECC_DATA4		"txc reorder FIFO data4"
626f45ec7bSml29623 #define	ERNAME_TXC_RO_STATE0		"txc reorder FIFO error state0" \
636f45ec7bSml29623 					"(duplicate TID)"
646f45ec7bSml29623 #define	ERNAME_TXC_RO_STATE1		"txc reorder FIFO error state1" \
656f45ec7bSml29623 					"(uninitialized TID)"
666f45ec7bSml29623 #define	ERNAME_TXC_RO_STATE2		"txc reorder FIFO error state2" \
676f45ec7bSml29623 					"(timed out TIDs)"
686f45ec7bSml29623 #define	ERNAME_TXC_RO_STATE3		"txc reorder FIFO error state3"
696f45ec7bSml29623 #define	ERNAME_TXC_RO_STATE_CTL		"txc reorder FIFO error control"
706f45ec7bSml29623 #define	ERNAME_TXC_RO_TIDS		"txc reorder tids"
716f45ec7bSml29623 #define	ERNAME_TXC_SFECC_ADDR		"txc store forward FIFO ECC error "\
726f45ec7bSml29623 					"address"
736f45ec7bSml29623 #define	ERNAME_TXC_SFECC_DATA0		"txc store forward FIFO data0"
746f45ec7bSml29623 #define	ERNAME_TXC_SFECC_DATA1		"txc store forward FIFO data1"
756f45ec7bSml29623 #define	ERNAME_TXC_SFECC_DATA2		"txc store forward FIFO data2"
766f45ec7bSml29623 #define	ERNAME_TXC_SFECC_DATA3		"txc store forward FIFO data3"
776f45ec7bSml29623 #define	ERNAME_TXC_SFECC_DATA4		"txc store forward FIFO data4"
786f45ec7bSml29623 
796f45ec7bSml29623 #define	EREPORT_FM_ID_SHIFT		16
806f45ec7bSml29623 #define	EREPORT_FM_ID_MASK		0xFF
816f45ec7bSml29623 #define	EREPORT_INDEX_MASK		0xFF
826f45ec7bSml29623 #define	NXGE_FM_EREPORT_UNKNOWN		0
836f45ec7bSml29623 
84ee5416c9Syc148097 /* xaui and xfp ereport definitions */
85ee5416c9Syc148097 #define	NXGE_FM_DEVICE_XAUI_ERR		"nxge.xaui-err"
86ee5416c9Syc148097 #define	NXGE_FM_DEVICE_XFP_ERR		"nxge.xfp-err"
87ee5416c9Syc148097 
886f45ec7bSml29623 #define	FM_SW_ID			0xFF
896f45ec7bSml29623 #define	FM_PCS_ID			MAC_BLK_ID
906f45ec7bSml29623 #define	FM_TXMAC_ID			TXMAC_BLK_ID
916f45ec7bSml29623 #define	FM_RXMAC_ID			RXMAC_BLK_ID
926f45ec7bSml29623 #define	FM_MIF_ID			MIF_BLK_ID
936f45ec7bSml29623 #define	FM_IPP_ID			IPP_BLK_ID
946f45ec7bSml29623 #define	FM_TXC_ID			TXC_BLK_ID
956f45ec7bSml29623 #define	FM_TXDMA_ID			TXDMA_BLK_ID
966f45ec7bSml29623 #define	FM_RXDMA_ID			RXDMA_BLK_ID
976f45ec7bSml29623 #define	FM_ZCP_ID			ZCP_BLK_ID
986f45ec7bSml29623 #define	FM_ESPC_ID			ESPC_BLK_ID
996f45ec7bSml29623 #define	FM_FFLP_ID			FFLP_BLK_ID
1006f45ec7bSml29623 #define	FM_PCIE_ID			PCIE_BLK_ID
1016f45ec7bSml29623 #define	FM_ETHER_SERDES_ID		ETHER_SERDES_BLK_ID
1026f45ec7bSml29623 #define	FM_PCIE_SERDES_ID		PCIE_SERDES_BLK_ID
1036f45ec7bSml29623 #define	FM_VIR_ID			VIR_BLK_ID
104ee5416c9Syc148097 #define	FM_XAUI_ID			XAUI_BLK_ID
105ee5416c9Syc148097 #define	FM_XFP_ID			XFP_BLK_ID
1066f45ec7bSml29623 
1076f45ec7bSml29623 typedef	uint32_t nxge_fm_ereport_id_t;
1086f45ec7bSml29623 
1096f45ec7bSml29623 typedef	struct _nxge_fm_ereport_attr {
1106f45ec7bSml29623 	uint32_t		index;
1116f45ec7bSml29623 	char			*str;
1126f45ec7bSml29623 	char			*eclass;
1136f45ec7bSml29623 	ddi_fault_impact_t	impact;
1146f45ec7bSml29623 } nxge_fm_ereport_attr_t;
1156f45ec7bSml29623 
1166f45ec7bSml29623 /* General MAC ereports */
1176f45ec7bSml29623 typedef	enum {
1186f45ec7bSml29623 	NXGE_FM_EREPORT_XPCS_LINK_DOWN = (FM_PCS_ID << EREPORT_FM_ID_SHIFT),
1196f45ec7bSml29623 	NXGE_FM_EREPORT_XPCS_TX_LINK_FAULT,
1206f45ec7bSml29623 	NXGE_FM_EREPORT_XPCS_RX_LINK_FAULT,
1216f45ec7bSml29623 	NXGE_FM_EREPORT_PCS_LINK_DOWN,
1226f45ec7bSml29623 	NXGE_FM_EREPORT_PCS_REMOTE_FAULT
1236f45ec7bSml29623 } nxge_fm_ereport_pcs_t;
1246f45ec7bSml29623 
1256f45ec7bSml29623 /* MIF ereports */
1266f45ec7bSml29623 typedef	enum {
1276f45ec7bSml29623 	NXGE_FM_EREPORT_MIF_ACCESS_FAIL = (FM_MIF_ID << EREPORT_FM_ID_SHIFT)
1286f45ec7bSml29623 } nxge_fm_ereport_mif_t;
1296f45ec7bSml29623 
1306f45ec7bSml29623 /* FFLP ereports */
1316f45ec7bSml29623 typedef	enum {
1326f45ec7bSml29623 	NXGE_FM_EREPORT_FFLP_TCAM_ERR = (FM_FFLP_ID << EREPORT_FM_ID_SHIFT),
1336f45ec7bSml29623 	NXGE_FM_EREPORT_FFLP_VLAN_PAR_ERR,
1346f45ec7bSml29623 	NXGE_FM_EREPORT_FFLP_HASHT_DATA_ERR,
1356f45ec7bSml29623 	NXGE_FM_EREPORT_FFLP_HASHT_LOOKUP_ERR,
1366f45ec7bSml29623 	NXGE_FM_EREPORT_FFLP_ACCESS_FAIL
1376f45ec7bSml29623 } nxge_fm_ereport_fflp_t;
1386f45ec7bSml29623 
1396f45ec7bSml29623 /* IPP ereports */
1406f45ec7bSml29623 typedef	enum {
1416f45ec7bSml29623 	NXGE_FM_EREPORT_IPP_EOP_MISS = (FM_IPP_ID << EREPORT_FM_ID_SHIFT),
1426f45ec7bSml29623 	NXGE_FM_EREPORT_IPP_SOP_MISS,
1436f45ec7bSml29623 	NXGE_FM_EREPORT_IPP_DFIFO_UE,
1446f45ec7bSml29623 	NXGE_FM_EREPORT_IPP_DFIFO_CE,
1456f45ec7bSml29623 	NXGE_FM_EREPORT_IPP_PFIFO_PERR,
1466f45ec7bSml29623 	NXGE_FM_EREPORT_IPP_ECC_ERR_MAX,
1476f45ec7bSml29623 	NXGE_FM_EREPORT_IPP_PFIFO_OVER,
1486f45ec7bSml29623 	NXGE_FM_EREPORT_IPP_PFIFO_UND,
1496f45ec7bSml29623 	NXGE_FM_EREPORT_IPP_BAD_CS_MX,
1506f45ec7bSml29623 	NXGE_FM_EREPORT_IPP_PKT_DIS_MX,
1516f45ec7bSml29623 	NXGE_FM_EREPORT_IPP_RESET_FAIL
1526f45ec7bSml29623 } nxge_fm_ereport_ipp_t;
1536f45ec7bSml29623 
1546f45ec7bSml29623 /* RDMC ereports */
1556f45ec7bSml29623 typedef	enum {
1566f45ec7bSml29623 	NXGE_FM_EREPORT_RDMC_DCF_ERR = (FM_RXDMA_ID << EREPORT_FM_ID_SHIFT),
1576f45ec7bSml29623 	NXGE_FM_EREPORT_RDMC_RCR_ACK_ERR,
1586f45ec7bSml29623 	NXGE_FM_EREPORT_RDMC_DC_FIFO_ERR,
1596f45ec7bSml29623 	NXGE_FM_EREPORT_RDMC_RCR_SHA_PAR,
1606f45ec7bSml29623 	NXGE_FM_EREPORT_RDMC_RBR_PRE_PAR,
1616f45ec7bSml29623 	NXGE_FM_EREPORT_RDMC_RBR_TMOUT,
1626f45ec7bSml29623 	NXGE_FM_EREPORT_RDMC_RSP_CNT_ERR,
1636f45ec7bSml29623 	NXGE_FM_EREPORT_RDMC_BYTE_EN_BUS,
1646f45ec7bSml29623 	NXGE_FM_EREPORT_RDMC_RSP_DAT_ERR,
1656f45ec7bSml29623 	NXGE_FM_EREPORT_RDMC_ID_MISMATCH,
1666f45ec7bSml29623 	NXGE_FM_EREPORT_RDMC_ZCP_EOP_ERR,
1676f45ec7bSml29623 	NXGE_FM_EREPORT_RDMC_IPP_EOP_ERR,
168*53f3d8ecSyc148097 	NXGE_FM_EREPORT_RDMC_RCR_ERR,
1696f45ec7bSml29623 	NXGE_FM_EREPORT_RDMC_CONFIG_ERR,
1706f45ec7bSml29623 	NXGE_FM_EREPORT_RDMC_RCRINCON,
1716f45ec7bSml29623 	NXGE_FM_EREPORT_RDMC_RCRFULL,
1726f45ec7bSml29623 	NXGE_FM_EREPORT_RDMC_RBRFULL,
1736f45ec7bSml29623 	NXGE_FM_EREPORT_RDMC_RBRLOGPAGE,
1746f45ec7bSml29623 	NXGE_FM_EREPORT_RDMC_CFIGLOGPAGE
1756f45ec7bSml29623 } nxge_fm_ereport_rdmc_t;
1766f45ec7bSml29623 
1776f45ec7bSml29623 /* ZCP ereports */
1786f45ec7bSml29623 typedef	enum {
1796f45ec7bSml29623 	NXGE_FM_EREPORT_ZCP_RRFIFO_UNDERRUN =
1806f45ec7bSml29623 					(FM_ZCP_ID << EREPORT_FM_ID_SHIFT),
1816f45ec7bSml29623 	NXGE_FM_EREPORT_ZCP_RSPFIFO_UNCORR_ERR,
1826f45ec7bSml29623 	NXGE_FM_EREPORT_ZCP_STAT_TBL_PERR,
1836f45ec7bSml29623 	NXGE_FM_EREPORT_ZCP_DYN_TBL_PERR,
1846f45ec7bSml29623 	NXGE_FM_EREPORT_ZCP_BUF_TBL_PERR,
1856f45ec7bSml29623 	NXGE_FM_EREPORT_ZCP_CFIFO_ECC,
1866f45ec7bSml29623 	NXGE_FM_EREPORT_ZCP_RRFIFO_OVERRUN,
1876f45ec7bSml29623 	NXGE_FM_EREPORT_ZCP_BUFFER_OVERFLOW,
1886f45ec7bSml29623 	NXGE_FM_EREPORT_ZCP_TT_PROGRAM_ERR,
1896f45ec7bSml29623 	NXGE_FM_EREPORT_ZCP_RSP_TT_INDEX_ERR,
1906f45ec7bSml29623 	NXGE_FM_EREPORT_ZCP_SLV_TT_INDEX_ERR,
1916f45ec7bSml29623 	NXGE_FM_EREPORT_ZCP_TT_INDEX_ERR,
1926f45ec7bSml29623 	NXGE_FM_EREPORT_ZCP_ACCESS_FAIL
1936f45ec7bSml29623 } nxge_fm_ereport_zcp_t;
1946f45ec7bSml29623 
1956f45ec7bSml29623 typedef enum {
1966f45ec7bSml29623 	NXGE_FM_EREPORT_RXMAC_UNDERFLOW = (FM_RXMAC_ID << EREPORT_FM_ID_SHIFT),
1976f45ec7bSml29623 	NXGE_FM_EREPORT_RXMAC_CRC_ERRCNT_EXP,
1986f45ec7bSml29623 	NXGE_FM_EREPORT_RXMAC_LENGTH_ERRCNT_EXP,
1996f45ec7bSml29623 	NXGE_FM_EREPORT_RXMAC_VIOL_ERRCNT_EXP,
2006f45ec7bSml29623 	NXGE_FM_EREPORT_RXMAC_RXFRAG_CNT_EXP,
2016f45ec7bSml29623 	NXGE_FM_EREPORT_RXMAC_ALIGN_ECNT_EXP,
2026f45ec7bSml29623 	NXGE_FM_EREPORT_RXMAC_LINKFAULT_CNT_EXP,
2036f45ec7bSml29623 	NXGE_FM_EREPORT_RXMAC_RESET_FAIL
2046f45ec7bSml29623 } nxge_fm_ereport_rxmac_t;
2056f45ec7bSml29623 
2066f45ec7bSml29623 typedef	enum {
2076f45ec7bSml29623 	NXGE_FM_EREPORT_TDMC_PREF_BUF_PAR_ERR =
2086f45ec7bSml29623 				(FM_TXDMA_ID << EREPORT_FM_ID_SHIFT),
2096f45ec7bSml29623 	NXGE_FM_EREPORT_TDMC_MBOX_ERR,
2106f45ec7bSml29623 	NXGE_FM_EREPORT_TDMC_NACK_PREF,
2116f45ec7bSml29623 	NXGE_FM_EREPORT_TDMC_NACK_PKT_RD,
2126f45ec7bSml29623 	NXGE_FM_EREPORT_TDMC_PKT_SIZE_ERR,
2136f45ec7bSml29623 	NXGE_FM_EREPORT_TDMC_TX_RING_OFLOW,
2146f45ec7bSml29623 	NXGE_FM_EREPORT_TDMC_CONF_PART_ERR,
2156f45ec7bSml29623 	NXGE_FM_EREPORT_TDMC_PKT_PRT_ERR,
2166f45ec7bSml29623 	NXGE_FM_EREPORT_TDMC_RESET_FAIL
2176f45ec7bSml29623 } nxge_fm_ereport_attr_tdmc_t;
2186f45ec7bSml29623 
2196f45ec7bSml29623 typedef	enum {
2206f45ec7bSml29623 	NXGE_FM_EREPORT_TXC_RO_CORRECT_ERR =
2216f45ec7bSml29623 				(FM_TXC_ID << EREPORT_FM_ID_SHIFT),
2226f45ec7bSml29623 	NXGE_FM_EREPORT_TXC_RO_UNCORRECT_ERR,
2236f45ec7bSml29623 	NXGE_FM_EREPORT_TXC_SF_CORRECT_ERR,
2246f45ec7bSml29623 	NXGE_FM_EREPORT_TXC_SF_UNCORRECT_ERR,
2256f45ec7bSml29623 	NXGE_FM_EREPORT_TXC_ASSY_DEAD,
2266f45ec7bSml29623 	NXGE_FM_EREPORT_TXC_REORDER_ERR
2276f45ec7bSml29623 } nxge_fm_ereport_attr_txc_t;
2286f45ec7bSml29623 
2296f45ec7bSml29623 typedef	enum {
2306f45ec7bSml29623 	NXGE_FM_EREPORT_TXMAC_UNDERFLOW =
2316f45ec7bSml29623 				(FM_TXMAC_ID << EREPORT_FM_ID_SHIFT),
2326f45ec7bSml29623 	NXGE_FM_EREPORT_TXMAC_OVERFLOW,
2336f45ec7bSml29623 	NXGE_FM_EREPORT_TXMAC_TXFIFO_XFR_ERR,
2346f45ec7bSml29623 	NXGE_FM_EREPORT_TXMAC_MAX_PKT_ERR,
2356f45ec7bSml29623 	NXGE_FM_EREPORT_TXMAC_RESET_FAIL
2366f45ec7bSml29623 } nxge_fm_ereport_attr_txmac_t;
2376f45ec7bSml29623 
2386f45ec7bSml29623 typedef	enum {
2396f45ec7bSml29623 	NXGE_FM_EREPORT_ESPC_ACCESS_FAIL = (FM_ESPC_ID << EREPORT_FM_ID_SHIFT)
2406f45ec7bSml29623 } nxge_fm_ereport_espc_t;
2416f45ec7bSml29623 
2426f45ec7bSml29623 typedef	enum {
2436f45ec7bSml29623 	NXGE_FM_EREPORT_SW_INVALID_PORT_NUM = (FM_SW_ID << EREPORT_FM_ID_SHIFT),
2446f45ec7bSml29623 	NXGE_FM_EREPORT_SW_INVALID_CHAN_NUM,
2456f45ec7bSml29623 	NXGE_FM_EREPORT_SW_INVALID_PARAM
2466f45ec7bSml29623 } nxge_fm_ereport_sw_t;
2476f45ec7bSml29623 
248ee5416c9Syc148097 /* XAUI is broken or missing */
249ee5416c9Syc148097 typedef	enum {
250ee5416c9Syc148097 	NXGE_FM_EREPORT_XAUI_ERR = (FM_XAUI_ID << EREPORT_FM_ID_SHIFT)
251ee5416c9Syc148097 } nxge_fm_ereport_xaui_t;
252ee5416c9Syc148097 
253ee5416c9Syc148097 /* XFP optical module is broken or missing */
254ee5416c9Syc148097 typedef	enum {
255ee5416c9Syc148097 	NXGE_FM_EREPORT_XFP_ERR = (FM_XFP_ID << EREPORT_FM_ID_SHIFT)
256ee5416c9Syc148097 } nxge_fm_ereport_xfp_t;
257ee5416c9Syc148097 
2586f45ec7bSml29623 #define	NXGE_FM_EREPORT_UNKNOWN			0
2596f45ec7bSml29623 #define	NXGE_FM_EREPORT_UNKNOWN_NAME		""
2606f45ec7bSml29623 
2616f45ec7bSml29623 #ifdef	__cplusplus
2626f45ec7bSml29623 }
2636f45ec7bSml29623 #endif
2646f45ec7bSml29623 
2656f45ec7bSml29623 #endif	/* _SYS_NXGE_NXGE_FM_H */
266