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 /* 2244961713Sgirish * Copyright 2006 Sun Microsystems, Inc. All rights reserved. 2344961713Sgirish * Use is subject to license terms. 2444961713Sgirish */ 2544961713Sgirish 2644961713Sgirish #ifndef _SYS_NXGE_NXGE_ZCP_H 2744961713Sgirish #define _SYS_NXGE_NXGE_ZCP_H 2844961713Sgirish 2944961713Sgirish #ifdef __cplusplus 3044961713Sgirish extern "C" { 3144961713Sgirish #endif 3244961713Sgirish 3344961713Sgirish #include <nxge_zcp_hw.h> 3444961713Sgirish #include <npi_zcp.h> 3544961713Sgirish 3644961713Sgirish typedef struct _zcp_errlog { 3744961713Sgirish zcp_state_machine_t state_mach; 3844961713Sgirish } zcp_errlog_t, *p_zcp_errlog_t; 3944961713Sgirish 4044961713Sgirish typedef struct _nxge_zcp_stats_t { 4144961713Sgirish uint32_t errors; 4244961713Sgirish uint32_t inits; 4344961713Sgirish uint32_t rrfifo_underrun; 4444961713Sgirish uint32_t rrfifo_overrun; 4544961713Sgirish uint32_t rspfifo_uncorr_err; 4644961713Sgirish uint32_t buffer_overflow; 4744961713Sgirish uint32_t stat_tbl_perr; 4844961713Sgirish uint32_t dyn_tbl_perr; 4944961713Sgirish uint32_t buf_tbl_perr; 5044961713Sgirish uint32_t tt_program_err; 5144961713Sgirish uint32_t rsp_tt_index_err; 5244961713Sgirish uint32_t slv_tt_index_err; 5344961713Sgirish uint32_t zcp_tt_index_err; 5444961713Sgirish uint32_t zcp_access_fail; 5544961713Sgirish uint32_t cfifo_ecc; 5644961713Sgirish zcp_errlog_t errlog; 5744961713Sgirish } nxge_zcp_stats_t, *p_nxge_zcp_stats_t; 5844961713Sgirish 5944961713Sgirish typedef struct _nxge_zcp { 6044961713Sgirish uint32_t config; 6144961713Sgirish uint32_t iconfig; 6244961713Sgirish nxge_zcp_stats_t *stat; 6344961713Sgirish } nxge_zcp_t; 6444961713Sgirish 6544961713Sgirish nxge_status_t nxge_zcp_init(p_nxge_t nxgep); 6644961713Sgirish void nxge_zcp_inject_err(p_nxge_t nxgep, uint32_t); 6744961713Sgirish nxge_status_t nxge_zcp_fatal_err_recover(p_nxge_t nxgep); 6844961713Sgirish 6944961713Sgirish #ifdef __cplusplus 7044961713Sgirish } 7144961713Sgirish #endif 7244961713Sgirish 7344961713Sgirish #endif /* _SYS_NXGE_NXGE_ZCP_H */ 74