1*6f45ec7bSml29623 /* 2*6f45ec7bSml29623 * CDDL HEADER START 3*6f45ec7bSml29623 * 4*6f45ec7bSml29623 * The contents of this file are subject to the terms of the 5*6f45ec7bSml29623 * Common Development and Distribution License (the "License"). 6*6f45ec7bSml29623 * You may not use this file except in compliance with the License. 7*6f45ec7bSml29623 * 8*6f45ec7bSml29623 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9*6f45ec7bSml29623 * or http://www.opensolaris.org/os/licensing. 10*6f45ec7bSml29623 * See the License for the specific language governing permissions 11*6f45ec7bSml29623 * and limitations under the License. 12*6f45ec7bSml29623 * 13*6f45ec7bSml29623 * When distributing Covered Code, include this CDDL HEADER in each 14*6f45ec7bSml29623 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15*6f45ec7bSml29623 * If applicable, add the following below this CDDL HEADER, with the 16*6f45ec7bSml29623 * fields enclosed by brackets "[]" replaced with your own identifying 17*6f45ec7bSml29623 * information: Portions Copyright [yyyy] [name of copyright owner] 18*6f45ec7bSml29623 * 19*6f45ec7bSml29623 * CDDL HEADER END 20*6f45ec7bSml29623 */ 21*6f45ec7bSml29623 /* 22*6f45ec7bSml29623 * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 23*6f45ec7bSml29623 * Use is subject to license terms. 24*6f45ec7bSml29623 */ 25*6f45ec7bSml29623 26*6f45ec7bSml29623 #ifndef _SYS_NXGE_NXGE_ZCP_H 27*6f45ec7bSml29623 #define _SYS_NXGE_NXGE_ZCP_H 28*6f45ec7bSml29623 29*6f45ec7bSml29623 #ifdef __cplusplus 30*6f45ec7bSml29623 extern "C" { 31*6f45ec7bSml29623 #endif 32*6f45ec7bSml29623 33*6f45ec7bSml29623 #include <nxge_zcp_hw.h> 34*6f45ec7bSml29623 #include <npi_zcp.h> 35*6f45ec7bSml29623 36*6f45ec7bSml29623 typedef struct _zcp_errlog { 37*6f45ec7bSml29623 zcp_state_machine_t state_mach; 38*6f45ec7bSml29623 } zcp_errlog_t, *p_zcp_errlog_t; 39*6f45ec7bSml29623 40*6f45ec7bSml29623 typedef struct _nxge_zcp_stats_t { 41*6f45ec7bSml29623 uint32_t errors; 42*6f45ec7bSml29623 uint32_t inits; 43*6f45ec7bSml29623 uint32_t rrfifo_underrun; 44*6f45ec7bSml29623 uint32_t rrfifo_overrun; 45*6f45ec7bSml29623 uint32_t rspfifo_uncorr_err; 46*6f45ec7bSml29623 uint32_t buffer_overflow; 47*6f45ec7bSml29623 uint32_t stat_tbl_perr; 48*6f45ec7bSml29623 uint32_t dyn_tbl_perr; 49*6f45ec7bSml29623 uint32_t buf_tbl_perr; 50*6f45ec7bSml29623 uint32_t tt_program_err; 51*6f45ec7bSml29623 uint32_t rsp_tt_index_err; 52*6f45ec7bSml29623 uint32_t slv_tt_index_err; 53*6f45ec7bSml29623 uint32_t zcp_tt_index_err; 54*6f45ec7bSml29623 uint32_t zcp_access_fail; 55*6f45ec7bSml29623 uint32_t cfifo_ecc; 56*6f45ec7bSml29623 zcp_errlog_t errlog; 57*6f45ec7bSml29623 } nxge_zcp_stats_t, *p_nxge_zcp_stats_t; 58*6f45ec7bSml29623 59*6f45ec7bSml29623 typedef struct _nxge_zcp { 60*6f45ec7bSml29623 uint32_t config; 61*6f45ec7bSml29623 uint32_t iconfig; 62*6f45ec7bSml29623 nxge_zcp_stats_t *stat; 63*6f45ec7bSml29623 } nxge_zcp_t; 64*6f45ec7bSml29623 65*6f45ec7bSml29623 nxge_status_t nxge_zcp_init(p_nxge_t nxgep); 66*6f45ec7bSml29623 void nxge_zcp_inject_err(p_nxge_t nxgep, uint32_t); 67*6f45ec7bSml29623 nxge_status_t nxge_zcp_fatal_err_recover(p_nxge_t nxgep); 68*6f45ec7bSml29623 69*6f45ec7bSml29623 #ifdef __cplusplus 70*6f45ec7bSml29623 } 71*6f45ec7bSml29623 #endif 72*6f45ec7bSml29623 73*6f45ec7bSml29623 #endif /* _SYS_NXGE_NXGE_ZCP_H */ 74