/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <nxge_impl.h>
#include <nxge_zcp.h>
#include <nxge_ipp.h>
{
int i;
} else if (NXGE_IS_VALID_NEPTUNE_TYPE(nxgep)) {
if (portn < 2)
else
} else {
goto fail;
}
/* Clean up CFIFO */
for (i = 0; i < cfifo_depth; i++) {
goto fail;
goto fail;
}
goto fail;
/*
* Making sure that error source is cleared if this is an injected
* error.
*/
switch (portn) {
case 0:
break;
case 1:
break;
case 2:
break;
case 3:
break;
}
return (NXGE_ERROR | rs);
return (NXGE_ERROR | rs);
goto fail;
return (NXGE_OK);
fail:
"nxge_zcp_init: Fail to initialize ZCP Port #%d\n", portn));
return (NXGE_ERROR | rs);
}
{
return (NXGE_ERROR | rs);
if (istatus & ICFG_ZCP_RRFIFO_UNDERRUN) {
"nxge_zcp_err_evnts: rrfifo_underrun"));
}
if (istatus & ICFG_ZCP_RRFIFO_OVERRUN) {
statsp->rrfifo_overrun++;
"nxge_zcp_err_evnts: buf_rrfifo_overrun"));
}
if (istatus & ICFG_ZCP_RSPFIFO_UNCORR_ERR) {
"nxge_zcp_err_evnts: rspfifo_uncorr_err"));
}
if (istatus & ICFG_ZCP_BUFFER_OVERFLOW) {
"nxge_zcp_err_evnts: buffer_overflow"));
}
if (istatus & ICFG_ZCP_STAT_TBL_PERR) {
statsp->stat_tbl_perr++;
"nxge_zcp_err_evnts: stat_tbl_perr"));
}
if (istatus & ICFG_ZCP_DYN_TBL_PERR) {
statsp->dyn_tbl_perr++;
"nxge_zcp_err_evnts: dyn_tbl_perr"));
}
if (istatus & ICFG_ZCP_BUF_TBL_PERR) {
statsp->buf_tbl_perr++;
"nxge_zcp_err_evnts: buf_tbl_perr"));
}
if (istatus & ICFG_ZCP_TT_PROGRAM_ERR) {
statsp->tt_program_err++;
"nxge_zcp_err_evnts: tt_program_err"));
}
if (istatus & ICFG_ZCP_RSP_TT_INDEX_ERR) {
"nxge_zcp_err_evnts: rsp_tt_index_err"));
}
if (istatus & ICFG_ZCP_SLV_TT_INDEX_ERR) {
"nxge_zcp_err_evnts: slv_tt_index_err"));
}
if (istatus & ICFG_ZCP_TT_INDEX_ERR) {
"nxge_zcp_err_evnts: tt_index_err"));
}
&ue_ecc_valid)) != NXGE_OK)
return (status);
if (ue_ecc_valid) {
"nxge_zcp_err_evnts: port%d buf_cfifo_ecc",
portn));
}
}
/*
* Making sure that error source is cleared if this is an injected
* error.
*/
switch (portn) {
case 0:
break;
case 1:
break;
case 2:
break;
case 3:
break;
}
(void) npi_zcp_clear_istatus(handle);
if (rxport_fatal) {
" nxge_zcp_handle_sys_errors:"
" fatal Error on Port #%d\n", portn));
}
}
return (status);
}
void
{
switch (err_id) {
switch (portn) {
case 0:
"!Write 0x%llx to port%d ZCP_CFIFO_ECC_PORT\n",
break;
case 1:
"!Write 0x%llx to port%d ZCP_CFIFO_ECC_PORT\n",
break;
case 2:
"!Write 0x%llx to port%d ZCP_CFIFO_ECC_PORT\n",
break;
case 3:
"!Write 0x%llx to port%d ZCP_CFIFO_ECC_PORT\n",
break;
}
break;
if (err_id == NXGE_FM_EREPORT_ZCP_CFIFO_ECC) {
switch (portn) {
case 0:
break;
case 1:
break;
case 2:
break;
case 3:
break;
}
}
default:
#if defined(__i386)
#else
#endif
break;
}
}
{
int i;
"Recovering from RxPort error..."));
/* Disable RxMAC */
goto fail;
/* Make sure source is clear if this is an injected error */
switch (portn) {
case 0:
break;
case 1:
break;
case 2:
break;
case 3:
break;
}
/* Clear up CFIFO */
} else if (NXGE_IS_VALID_NEPTUNE_TYPE(nxgep)) {
if (portn < 2)
else
} else {
goto fail;
}
for (i = 0; i < cfifo_depth; i++) {
goto fail;
goto fail;
}
/* When recovering from ZCP, RxDMA channel resets are not necessary */
/* Reset ZCP CFIFO */
goto fail;
/* Reset IPP */
goto fail;
goto fail;
goto fail;
goto fail;
"Recovery Sucessful, RxPort Restored"));
return (NXGE_OK);
fail:
}