xref: /titanic_50/usr/src/uts/common/sys/nxge/nxge_fm.h (revision e07d9cb85217949d497b02d7211de8a197d2f2eb)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 /*
22  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
23  * Use is subject to license terms.
24  */
25 
26 #ifndef	_SYS_NXGE_NXGE_FM_H
27 #define	_SYS_NXGE_NXGE_FM_H
28 
29 #pragma ident	"%Z%%M%	%I%	%E% SMI"
30 
31 #ifdef	__cplusplus
32 extern "C" {
33 #endif
34 
35 #include <sys/ddi.h>
36 
37 #define	ERNAME_DETAILED_ERR_TYPE	"detailed error type"
38 #define	ERNAME_ERR_PORTN		"port number"
39 #define	ERNAME_ERR_DCHAN		"dma channel number"
40 #define	ERNAME_TCAM_ERR_LOG		"tcam error log"
41 #define	ERNAME_VLANTAB_ERR_LOG		"vlan table error log"
42 #define	ERNAME_HASHTAB_ERR_LOG		"hash table error log"
43 #define	ERNAME_HASHT_LOOKUP_ERR_LOG0	"hash table lookup error log0"
44 #define	ERNAME_HASHT_LOOKUP_ERR_LOG1	"hash table lookup error log1"
45 #define	ERNAME_RDMC_PAR_ERR_LOG		"rdmc parity error log"
46 #define	ERNAME_DFIFO_RD_PTR		"dfifo read pointer"
47 #define	ERNAME_IPP_STATE_MACH		"ipp state machine"
48 #define	ERNAME_DFIFO_ENTRY		"dfifo entry"
49 #define	ERNAME_DFIFO_SYNDROME		"dfifo syndrome"
50 #define	ERNAME_PFIFO_ENTRY		"pfifo entry"
51 #define	ERNAME_ZCP_STATE_MACH		"zcp state machine"
52 #define	ERNAME_CFIFO_PORT_NUM		"cfifo port number"
53 #define	ERNAME_RDC_ERR_TYPE		"completion error type"
54 #define	ERNAME_TDMC_ERR_LOG0		"tdmc error log0"
55 #define	ERNAME_TDMC_ERR_LOG1		"tdmc error log1"
56 #define	ERNAME_TXC_ROECC_ADDR		"txc reorder FIFO ECC error address"
57 #define	ERNAME_TXC_ROECC_DATA0		"txc reorder FIFO data0"
58 #define	ERNAME_TXC_ROECC_DATA1		"txc reorder FIFO data1"
59 #define	ERNAME_TXC_ROECC_DATA2		"txc reorder FIFO data2"
60 #define	ERNAME_TXC_ROECC_DATA3		"txc reorder FIFO data3"
61 #define	ERNAME_TXC_ROECC_DATA4		"txc reorder FIFO data4"
62 #define	ERNAME_TXC_RO_STATE0		"txc reorder FIFO error state0" \
63 					"(duplicate TID)"
64 #define	ERNAME_TXC_RO_STATE1		"txc reorder FIFO error state1" \
65 					"(uninitialized TID)"
66 #define	ERNAME_TXC_RO_STATE2		"txc reorder FIFO error state2" \
67 					"(timed out TIDs)"
68 #define	ERNAME_TXC_RO_STATE3		"txc reorder FIFO error state3"
69 #define	ERNAME_TXC_RO_STATE_CTL		"txc reorder FIFO error control"
70 #define	ERNAME_TXC_RO_TIDS		"txc reorder tids"
71 #define	ERNAME_TXC_SFECC_ADDR		"txc store forward FIFO ECC error "\
72 					"address"
73 #define	ERNAME_TXC_SFECC_DATA0		"txc store forward FIFO data0"
74 #define	ERNAME_TXC_SFECC_DATA1		"txc store forward FIFO data1"
75 #define	ERNAME_TXC_SFECC_DATA2		"txc store forward FIFO data2"
76 #define	ERNAME_TXC_SFECC_DATA3		"txc store forward FIFO data3"
77 #define	ERNAME_TXC_SFECC_DATA4		"txc store forward FIFO data4"
78 
79 #define	EREPORT_FM_ID_SHIFT		16
80 #define	EREPORT_FM_ID_MASK		0xFF
81 #define	EREPORT_INDEX_MASK		0xFF
82 #define	NXGE_FM_EREPORT_UNKNOWN		0
83 
84 #define	FM_SW_ID			0xFF
85 #define	FM_PCS_ID			MAC_BLK_ID
86 #define	FM_TXMAC_ID			TXMAC_BLK_ID
87 #define	FM_RXMAC_ID			RXMAC_BLK_ID
88 #define	FM_MIF_ID			MIF_BLK_ID
89 #define	FM_IPP_ID			IPP_BLK_ID
90 #define	FM_TXC_ID			TXC_BLK_ID
91 #define	FM_TXDMA_ID			TXDMA_BLK_ID
92 #define	FM_RXDMA_ID			RXDMA_BLK_ID
93 #define	FM_ZCP_ID			ZCP_BLK_ID
94 #define	FM_ESPC_ID			ESPC_BLK_ID
95 #define	FM_FFLP_ID			FFLP_BLK_ID
96 #define	FM_PCIE_ID			PCIE_BLK_ID
97 #define	FM_ETHER_SERDES_ID		ETHER_SERDES_BLK_ID
98 #define	FM_PCIE_SERDES_ID		PCIE_SERDES_BLK_ID
99 #define	FM_VIR_ID			VIR_BLK_ID
100 
101 typedef	uint32_t nxge_fm_ereport_id_t;
102 
103 typedef	struct _nxge_fm_ereport_attr {
104 	uint32_t		index;
105 	char			*str;
106 	char			*eclass;
107 	ddi_fault_impact_t	impact;
108 } nxge_fm_ereport_attr_t;
109 
110 /* General MAC ereports */
111 typedef	enum {
112 	NXGE_FM_EREPORT_XPCS_LINK_DOWN = (FM_PCS_ID << EREPORT_FM_ID_SHIFT),
113 	NXGE_FM_EREPORT_XPCS_TX_LINK_FAULT,
114 	NXGE_FM_EREPORT_XPCS_RX_LINK_FAULT,
115 	NXGE_FM_EREPORT_PCS_LINK_DOWN,
116 	NXGE_FM_EREPORT_PCS_REMOTE_FAULT
117 } nxge_fm_ereport_pcs_t;
118 
119 /* MIF ereports */
120 typedef	enum {
121 	NXGE_FM_EREPORT_MIF_ACCESS_FAIL = (FM_MIF_ID << EREPORT_FM_ID_SHIFT)
122 } nxge_fm_ereport_mif_t;
123 
124 /* FFLP ereports */
125 typedef	enum {
126 	NXGE_FM_EREPORT_FFLP_TCAM_ERR = (FM_FFLP_ID << EREPORT_FM_ID_SHIFT),
127 	NXGE_FM_EREPORT_FFLP_VLAN_PAR_ERR,
128 	NXGE_FM_EREPORT_FFLP_HASHT_DATA_ERR,
129 	NXGE_FM_EREPORT_FFLP_HASHT_LOOKUP_ERR,
130 	NXGE_FM_EREPORT_FFLP_ACCESS_FAIL
131 } nxge_fm_ereport_fflp_t;
132 
133 /* IPP ereports */
134 typedef	enum {
135 	NXGE_FM_EREPORT_IPP_EOP_MISS = (FM_IPP_ID << EREPORT_FM_ID_SHIFT),
136 	NXGE_FM_EREPORT_IPP_SOP_MISS,
137 	NXGE_FM_EREPORT_IPP_DFIFO_UE,
138 	NXGE_FM_EREPORT_IPP_DFIFO_CE,
139 	NXGE_FM_EREPORT_IPP_PFIFO_PERR,
140 	NXGE_FM_EREPORT_IPP_ECC_ERR_MAX,
141 	NXGE_FM_EREPORT_IPP_PFIFO_OVER,
142 	NXGE_FM_EREPORT_IPP_PFIFO_UND,
143 	NXGE_FM_EREPORT_IPP_BAD_CS_MX,
144 	NXGE_FM_EREPORT_IPP_PKT_DIS_MX,
145 	NXGE_FM_EREPORT_IPP_RESET_FAIL
146 } nxge_fm_ereport_ipp_t;
147 
148 /* RDMC ereports */
149 typedef	enum {
150 	NXGE_FM_EREPORT_RDMC_DCF_ERR = (FM_RXDMA_ID << EREPORT_FM_ID_SHIFT),
151 	NXGE_FM_EREPORT_RDMC_RCR_ACK_ERR,
152 	NXGE_FM_EREPORT_RDMC_DC_FIFO_ERR,
153 	NXGE_FM_EREPORT_RDMC_RCR_SHA_PAR,
154 	NXGE_FM_EREPORT_RDMC_RBR_PRE_PAR,
155 	NXGE_FM_EREPORT_RDMC_RBR_TMOUT,
156 	NXGE_FM_EREPORT_RDMC_RSP_CNT_ERR,
157 	NXGE_FM_EREPORT_RDMC_BYTE_EN_BUS,
158 	NXGE_FM_EREPORT_RDMC_RSP_DAT_ERR,
159 	NXGE_FM_EREPORT_RDMC_ID_MISMATCH,
160 	NXGE_FM_EREPORT_RDMC_ZCP_EOP_ERR,
161 	NXGE_FM_EREPORT_RDMC_IPP_EOP_ERR,
162 	NXGE_FM_EREPORT_RDMC_COMPLETION_ERR,
163 	NXGE_FM_EREPORT_RDMC_CONFIG_ERR,
164 	NXGE_FM_EREPORT_RDMC_RCRINCON,
165 	NXGE_FM_EREPORT_RDMC_RCRFULL,
166 	NXGE_FM_EREPORT_RDMC_RBRFULL,
167 	NXGE_FM_EREPORT_RDMC_RBRLOGPAGE,
168 	NXGE_FM_EREPORT_RDMC_CFIGLOGPAGE
169 } nxge_fm_ereport_rdmc_t;
170 
171 /* ZCP ereports */
172 typedef	enum {
173 	NXGE_FM_EREPORT_ZCP_RRFIFO_UNDERRUN =
174 					(FM_ZCP_ID << EREPORT_FM_ID_SHIFT),
175 	NXGE_FM_EREPORT_ZCP_RSPFIFO_UNCORR_ERR,
176 	NXGE_FM_EREPORT_ZCP_STAT_TBL_PERR,
177 	NXGE_FM_EREPORT_ZCP_DYN_TBL_PERR,
178 	NXGE_FM_EREPORT_ZCP_BUF_TBL_PERR,
179 	NXGE_FM_EREPORT_ZCP_CFIFO_ECC,
180 	NXGE_FM_EREPORT_ZCP_RRFIFO_OVERRUN,
181 	NXGE_FM_EREPORT_ZCP_BUFFER_OVERFLOW,
182 	NXGE_FM_EREPORT_ZCP_TT_PROGRAM_ERR,
183 	NXGE_FM_EREPORT_ZCP_RSP_TT_INDEX_ERR,
184 	NXGE_FM_EREPORT_ZCP_SLV_TT_INDEX_ERR,
185 	NXGE_FM_EREPORT_ZCP_TT_INDEX_ERR,
186 	NXGE_FM_EREPORT_ZCP_ACCESS_FAIL
187 } nxge_fm_ereport_zcp_t;
188 
189 typedef enum {
190 	NXGE_FM_EREPORT_RXMAC_UNDERFLOW = (FM_RXMAC_ID << EREPORT_FM_ID_SHIFT),
191 	NXGE_FM_EREPORT_RXMAC_CRC_ERRCNT_EXP,
192 	NXGE_FM_EREPORT_RXMAC_LENGTH_ERRCNT_EXP,
193 	NXGE_FM_EREPORT_RXMAC_VIOL_ERRCNT_EXP,
194 	NXGE_FM_EREPORT_RXMAC_RXFRAG_CNT_EXP,
195 	NXGE_FM_EREPORT_RXMAC_ALIGN_ECNT_EXP,
196 	NXGE_FM_EREPORT_RXMAC_LINKFAULT_CNT_EXP,
197 	NXGE_FM_EREPORT_RXMAC_RESET_FAIL
198 } nxge_fm_ereport_rxmac_t;
199 
200 typedef	enum {
201 	NXGE_FM_EREPORT_TDMC_PREF_BUF_PAR_ERR =
202 				(FM_TXDMA_ID << EREPORT_FM_ID_SHIFT),
203 	NXGE_FM_EREPORT_TDMC_MBOX_ERR,
204 	NXGE_FM_EREPORT_TDMC_NACK_PREF,
205 	NXGE_FM_EREPORT_TDMC_NACK_PKT_RD,
206 	NXGE_FM_EREPORT_TDMC_PKT_SIZE_ERR,
207 	NXGE_FM_EREPORT_TDMC_TX_RING_OFLOW,
208 	NXGE_FM_EREPORT_TDMC_CONF_PART_ERR,
209 	NXGE_FM_EREPORT_TDMC_PKT_PRT_ERR,
210 	NXGE_FM_EREPORT_TDMC_RESET_FAIL
211 } nxge_fm_ereport_attr_tdmc_t;
212 
213 typedef	enum {
214 	NXGE_FM_EREPORT_TXC_RO_CORRECT_ERR =
215 				(FM_TXC_ID << EREPORT_FM_ID_SHIFT),
216 	NXGE_FM_EREPORT_TXC_RO_UNCORRECT_ERR,
217 	NXGE_FM_EREPORT_TXC_SF_CORRECT_ERR,
218 	NXGE_FM_EREPORT_TXC_SF_UNCORRECT_ERR,
219 	NXGE_FM_EREPORT_TXC_ASSY_DEAD,
220 	NXGE_FM_EREPORT_TXC_REORDER_ERR
221 } nxge_fm_ereport_attr_txc_t;
222 
223 typedef	enum {
224 	NXGE_FM_EREPORT_TXMAC_UNDERFLOW =
225 				(FM_TXMAC_ID << EREPORT_FM_ID_SHIFT),
226 	NXGE_FM_EREPORT_TXMAC_OVERFLOW,
227 	NXGE_FM_EREPORT_TXMAC_TXFIFO_XFR_ERR,
228 	NXGE_FM_EREPORT_TXMAC_MAX_PKT_ERR,
229 	NXGE_FM_EREPORT_TXMAC_RESET_FAIL
230 } nxge_fm_ereport_attr_txmac_t;
231 
232 typedef	enum {
233 	NXGE_FM_EREPORT_ESPC_ACCESS_FAIL = (FM_ESPC_ID << EREPORT_FM_ID_SHIFT)
234 } nxge_fm_ereport_espc_t;
235 
236 typedef	enum {
237 	NXGE_FM_EREPORT_SW_INVALID_PORT_NUM = (FM_SW_ID << EREPORT_FM_ID_SHIFT),
238 	NXGE_FM_EREPORT_SW_INVALID_CHAN_NUM,
239 	NXGE_FM_EREPORT_SW_INVALID_PARAM
240 } nxge_fm_ereport_sw_t;
241 
242 #define	NXGE_FM_EREPORT_UNKNOWN			0
243 #define	NXGE_FM_EREPORT_UNKNOWN_NAME		""
244 
245 #ifdef	__cplusplus
246 }
247 #endif
248 
249 #endif	/* _SYS_NXGE_NXGE_FM_H */
250