nxge_ipp.h revision 678453a8ed49104d8adad58f3ba591bdc39883e8
1N/A/*
1N/A * CDDL HEADER START
1N/A *
1N/A * The contents of this file are subject to the terms of the
1N/A * Common Development and Distribution License (the "License").
1N/A * You may not use this file except in compliance with the License.
1N/A *
1N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
1N/A * or http://www.opensolaris.org/os/licensing.
1N/A * See the License for the specific language governing permissions
1N/A * and limitations under the License.
1N/A *
1N/A * When distributing Covered Code, include this CDDL HEADER in each
1N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1N/A * If applicable, add the following below this CDDL HEADER, with the
1N/A * fields enclosed by brackets "[]" replaced with your own identifying
1N/A * information: Portions Copyright [yyyy] [name of copyright owner]
1N/A *
1N/A * CDDL HEADER END
1N/A */
1N/A/*
1N/A * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
1N/A * Use is subject to license terms.
1N/A */
1N/A
1N/A#ifndef _SYS_NXGE_NXGE_IPP_H
1N/A#define _SYS_NXGE_NXGE_IPP_H
1N/A
1N/A#pragma ident "%Z%%M% %I% %E% SMI"
1N/A
1N/A#ifdef __cplusplus
1N/Aextern "C" {
1N/A#endif
1N/A
1N/A#include <nxge_ipp_hw.h>
1N/A#include <npi_ipp.h>
1N/A
1N/A#define IPP_MAX_PKT_SIZE 0x1FFFF
1N/A#define IPP_MAX_ERR_SHOW 10
1N/A
1N/Atypedef struct _ipp_errlog {
1N/A boolean_t multiple_err;
1N/A uint16_t dfifo_rd_ptr;
1N/A uint32_t state_mach;
1N/A uint16_t ecc_syndrome;
1N/A} ipp_errlog_t, *p_ipp_errlog_t;
1N/A
1N/Atypedef struct _nxge_ipp_stats {
1N/A uint32_t errors;
1N/A uint32_t inits;
1N/A uint32_t sop_miss;
1N/A uint32_t eop_miss;
1N/A uint32_t dfifo_ue;
1N/A uint32_t ecc_err_cnt;
1N/A uint32_t pfifo_perr;
1N/A uint32_t pfifo_over;
1N/A uint32_t pfifo_und;
1N/A uint32_t bad_cs_cnt;
1N/A uint32_t pkt_dis_cnt;
1N/A ipp_errlog_t errlog;
1N/A} nxge_ipp_stats_t, *p_nxge_ipp_stats_t;
1N/A
1N/Atypedef struct _nxge_ipp {
1N/A uint32_t config;
1N/A uint32_t iconfig;
1N/A ipp_status_t status;
1N/A uint32_t max_pkt_size;
1N/A nxge_ipp_stats_t *stat;
1N/A} nxge_ipp_t;
1N/A
1N/A/* IPP prototypes */
1N/Anxge_status_t nxge_ipp_reset(p_nxge_t);
1N/Anxge_status_t nxge_ipp_init(p_nxge_t);
1N/Anxge_status_t nxge_ipp_disable(p_nxge_t);
1N/Anxge_status_t nxge_ipp_drain(p_nxge_t);
1N/Anxge_status_t nxge_ipp_handle_sys_errors(p_nxge_t);
1N/Anxge_status_t nxge_ipp_fatal_err_recover(p_nxge_t);
1N/Anxge_status_t nxge_ipp_eccue_valid_check(p_nxge_t, boolean_t *);
1N/Avoid nxge_ipp_inject_err(p_nxge_t, uint32_t);
1N/A
1N/A#ifdef __cplusplus
1N/A}
1N/A#endif
1N/A
1N/A#endif /* _SYS_NXGE_NXGE_IPP_H */
1N/A