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 /* 22*678453a8Sspeer * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 236f45ec7bSml29623 * Use is subject to license terms. 246f45ec7bSml29623 */ 256f45ec7bSml29623 266f45ec7bSml29623 #ifndef _SYS_NXGE_NXGE_IPP_H 276f45ec7bSml29623 #define _SYS_NXGE_NXGE_IPP_H 286f45ec7bSml29623 296f45ec7bSml29623 #ifdef __cplusplus 306f45ec7bSml29623 extern "C" { 316f45ec7bSml29623 #endif 326f45ec7bSml29623 336f45ec7bSml29623 #include <nxge_ipp_hw.h> 346f45ec7bSml29623 #include <npi_ipp.h> 356f45ec7bSml29623 366f45ec7bSml29623 #define IPP_MAX_PKT_SIZE 0x1FFFF 376f45ec7bSml29623 #define IPP_MAX_ERR_SHOW 10 386f45ec7bSml29623 396f45ec7bSml29623 typedef struct _ipp_errlog { 406f45ec7bSml29623 boolean_t multiple_err; 416f45ec7bSml29623 uint16_t dfifo_rd_ptr; 426f45ec7bSml29623 uint32_t state_mach; 436f45ec7bSml29623 uint16_t ecc_syndrome; 446f45ec7bSml29623 } ipp_errlog_t, *p_ipp_errlog_t; 456f45ec7bSml29623 466f45ec7bSml29623 typedef struct _nxge_ipp_stats { 476f45ec7bSml29623 uint32_t errors; 486f45ec7bSml29623 uint32_t inits; 496f45ec7bSml29623 uint32_t sop_miss; 506f45ec7bSml29623 uint32_t eop_miss; 516f45ec7bSml29623 uint32_t dfifo_ue; 526f45ec7bSml29623 uint32_t ecc_err_cnt; 536f45ec7bSml29623 uint32_t pfifo_perr; 546f45ec7bSml29623 uint32_t pfifo_over; 556f45ec7bSml29623 uint32_t pfifo_und; 566f45ec7bSml29623 uint32_t bad_cs_cnt; 576f45ec7bSml29623 uint32_t pkt_dis_cnt; 586f45ec7bSml29623 ipp_errlog_t errlog; 596f45ec7bSml29623 } nxge_ipp_stats_t, *p_nxge_ipp_stats_t; 606f45ec7bSml29623 616f45ec7bSml29623 typedef struct _nxge_ipp { 626f45ec7bSml29623 uint32_t config; 636f45ec7bSml29623 uint32_t iconfig; 646f45ec7bSml29623 ipp_status_t status; 656f45ec7bSml29623 uint32_t max_pkt_size; 666f45ec7bSml29623 nxge_ipp_stats_t *stat; 676f45ec7bSml29623 } nxge_ipp_t; 686f45ec7bSml29623 696f45ec7bSml29623 /* IPP prototypes */ 706f45ec7bSml29623 nxge_status_t nxge_ipp_reset(p_nxge_t); 716f45ec7bSml29623 nxge_status_t nxge_ipp_init(p_nxge_t); 726f45ec7bSml29623 nxge_status_t nxge_ipp_disable(p_nxge_t); 73*678453a8Sspeer nxge_status_t nxge_ipp_drain(p_nxge_t); 746f45ec7bSml29623 nxge_status_t nxge_ipp_handle_sys_errors(p_nxge_t); 756f45ec7bSml29623 nxge_status_t nxge_ipp_fatal_err_recover(p_nxge_t); 766f45ec7bSml29623 nxge_status_t nxge_ipp_eccue_valid_check(p_nxge_t, boolean_t *); 776f45ec7bSml29623 void nxge_ipp_inject_err(p_nxge_t, uint32_t); 786f45ec7bSml29623 796f45ec7bSml29623 #ifdef __cplusplus 806f45ec7bSml29623 } 816f45ec7bSml29623 #endif 826f45ec7bSml29623 836f45ec7bSml29623 #endif /* _SYS_NXGE_NXGE_IPP_H */ 84