nxge_fm.c revision 837c1ac4e72b7d86278cca88b1075af557f7d161
/*
* 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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
static nxge_fm_ereport_attr_t
static int
{NXGE_FM_EREPORT_XPCS_LINK_DOWN, "10g_link_down",
{NXGE_FM_EREPORT_XPCS_TX_LINK_FAULT, "10g_tx_link_fault",
{NXGE_FM_EREPORT_XPCS_RX_LINK_FAULT, "10g_rx_link_fault",
{NXGE_FM_EREPORT_PCS_LINK_DOWN, "1g_link_down",
{NXGE_FM_EREPORT_PCS_REMOTE_FAULT, "1g_remote_fault",
};
{NXGE_FM_EREPORT_MIF_ACCESS_FAIL, "transceiver_access_fail"}
};
{NXGE_FM_EREPORT_FFLP_TCAM_ERR, "classifier_tcam_err",
{NXGE_FM_EREPORT_FFLP_VLAN_PAR_ERR, "classifier_vlan_par_err",
{NXGE_FM_EREPORT_FFLP_HASHT_DATA_ERR, "classifier_hasht_data_err",
{NXGE_FM_EREPORT_FFLP_HASHT_LOOKUP_ERR, "classifier_hasht_lookup_err",
{NXGE_FM_EREPORT_FFLP_ACCESS_FAIL, "classifier_access_fail",
};
{NXGE_FM_EREPORT_IPP_EOP_MISS, "rx_eop_miss",
{NXGE_FM_EREPORT_IPP_SOP_MISS, "rx_sop_miss",
{NXGE_FM_EREPORT_IPP_DFIFO_UE, "rx_dfifo_ucorr_err",
{NXGE_FM_EREPORT_IPP_DFIFO_CE, "rx_dfifo_corr_err",
{NXGE_FM_EREPORT_IPP_PFIFO_PERR, "rx_dfifo_parity_err",
{NXGE_FM_EREPORT_IPP_ECC_ERR_MAX, "rx_ecc_err_max",
{NXGE_FM_EREPORT_IPP_PFIFO_OVER, "rx_pfifo_overflow",
{NXGE_FM_EREPORT_IPP_PFIFO_UND, "rx_pfifo_underrun",
{NXGE_FM_EREPORT_IPP_BAD_CS_MX, "rx_bad_cksum_max",
{NXGE_FM_EREPORT_IPP_PKT_DIS_MX, "rx_pkt_discard_max",
{NXGE_FM_EREPORT_IPP_RESET_FAIL, "rx_reset_fail",
};
{NXGE_FM_EREPORT_RDMC_DCF_ERR, "rxdma_dcf_err",
{NXGE_FM_EREPORT_RDMC_RCR_ACK_ERR, "rxdma_rcr_ack_err",
{NXGE_FM_EREPORT_RDMC_DC_FIFO_ERR, "rxdma_dc_fifo_err",
{NXGE_FM_EREPORT_RDMC_RCR_SHA_PAR, "rxdma_rcr_sha_par_err",
{NXGE_FM_EREPORT_RDMC_RBR_PRE_PAR, "rxdma_rbr_pre_par_err",
{NXGE_FM_EREPORT_RDMC_RBR_TMOUT, "rxdma_rbr_tmout",
{NXGE_FM_EREPORT_RDMC_RSP_CNT_ERR, "rxdma_rsp_cnt_err",
{NXGE_FM_EREPORT_RDMC_BYTE_EN_BUS, "rxdma_byte_en_bus",
{NXGE_FM_EREPORT_RDMC_RSP_DAT_ERR, "rxdma_rsp_dat_err",
{NXGE_FM_EREPORT_RDMC_ID_MISMATCH, "rxdma_id_mismatch",
{NXGE_FM_EREPORT_RDMC_ZCP_EOP_ERR, "rxdma_zcp_eop_err",
{NXGE_FM_EREPORT_RDMC_IPP_EOP_ERR, "rxdma_ipp_eop_err",
{NXGE_FM_EREPORT_RDMC_RCR_ERR, "rxdma_completion_err",
{NXGE_FM_EREPORT_RDMC_CONFIG_ERR, "rxdma_config_err",
{NXGE_FM_EREPORT_RDMC_RCRINCON, "rxdma_rcrincon",
{NXGE_FM_EREPORT_RDMC_RCRFULL, "rxdma_rcrfull",
{NXGE_FM_EREPORT_RDMC_RBRFULL, "rxdma_rbrfull",
{NXGE_FM_EREPORT_RDMC_RBRLOGPAGE, "rxdma_rbrlogpage",
{NXGE_FM_EREPORT_RDMC_CFIGLOGPAGE, "rxdma_cfiglogpage",
};
{NXGE_FM_EREPORT_ZCP_RRFIFO_UNDERRUN, "rxzcopy_rrfifo_underrun",
"rxzcopy_rspfifo_uncorr_err",
{NXGE_FM_EREPORT_ZCP_STAT_TBL_PERR, "rxzcopy_stat_tbl_perr",
{NXGE_FM_EREPORT_ZCP_DYN_TBL_PERR, "rxzcopy_dyn_tbl_perr",
{NXGE_FM_EREPORT_ZCP_BUF_TBL_PERR, "rxzcopy_buf_tbl_perr",
{NXGE_FM_EREPORT_ZCP_CFIFO_ECC, "rxzcopy_cfifo_ecc",
{NXGE_FM_EREPORT_ZCP_RRFIFO_OVERRUN, "rxzcopy_rrfifo_overrun",
{NXGE_FM_EREPORT_ZCP_BUFFER_OVERFLOW, "rxzcopy_buffer_overflow",
{NXGE_FM_EREPORT_ZCP_TT_PROGRAM_ERR, "rxzcopy_tt_program_err",
{NXGE_FM_EREPORT_ZCP_RSP_TT_INDEX_ERR, "rxzcopy_rsp_tt_index_err",
{NXGE_FM_EREPORT_ZCP_SLV_TT_INDEX_ERR, "rxzcopy_slv_tt_index_err",
{NXGE_FM_EREPORT_ZCP_TT_INDEX_ERR, "rxzcopy_tt_index_err",
{NXGE_FM_EREPORT_ZCP_ACCESS_FAIL, "rxzcopy_access_fail",
};
{NXGE_FM_EREPORT_RXMAC_UNDERFLOW, "rxmac_underflow",
{NXGE_FM_EREPORT_RXMAC_CRC_ERRCNT_EXP, "rxmac_crc_errcnt_exp",
"rxmac_length_errcnt_exp",
{NXGE_FM_EREPORT_RXMAC_VIOL_ERRCNT_EXP, "rxmac_viol_errcnt_exp",
{NXGE_FM_EREPORT_RXMAC_RXFRAG_CNT_EXP, "rxmac_rxfrag_cnt_exp",
{NXGE_FM_EREPORT_RXMAC_ALIGN_ECNT_EXP, "rxmac_align_ecnt_exp",
"rxmac_linkfault_cnt_exp",
{NXGE_FM_EREPORT_RXMAC_RESET_FAIL, "rxmac_reset_fail",
};
{NXGE_FM_EREPORT_TDMC_PREF_BUF_PAR_ERR, "txdma_pref_buf_par_err",
{NXGE_FM_EREPORT_TDMC_MBOX_ERR, "txdma_mbox_err",
{NXGE_FM_EREPORT_TDMC_NACK_PREF, "txdma_nack_pref",
{NXGE_FM_EREPORT_TDMC_NACK_PKT_RD, "txdma_nack_pkt_rd",
{NXGE_FM_EREPORT_TDMC_PKT_SIZE_ERR, "txdma_pkt_size_err",
{NXGE_FM_EREPORT_TDMC_TX_RING_OFLOW, "txdma_tx_ring_oflow",
{NXGE_FM_EREPORT_TDMC_CONF_PART_ERR, "txdma_conf_part_err",
{NXGE_FM_EREPORT_TDMC_PKT_PRT_ERR, "txdma_pkt_prt_err",
{NXGE_FM_EREPORT_TDMC_RESET_FAIL, "txdma_reset_fail",
};
{NXGE_FM_EREPORT_TXC_RO_CORRECT_ERR, "tx_ro_correct_err",
{NXGE_FM_EREPORT_TXC_RO_UNCORRECT_ERR, "tx_ro_uncorrect_err",
{NXGE_FM_EREPORT_TXC_SF_CORRECT_ERR, "tx_sf_correct_err",
{NXGE_FM_EREPORT_TXC_SF_UNCORRECT_ERR, "tx_sf_uncorrect_err",
{NXGE_FM_EREPORT_TXC_ASSY_DEAD, "tx_assembly_uncorrect_err",
{NXGE_FM_EREPORT_TXC_REORDER_ERR, "tx_reorder_err",
};
{NXGE_FM_EREPORT_TXMAC_UNDERFLOW, "txmac_underflow",
{NXGE_FM_EREPORT_TXMAC_OVERFLOW, "txmac_overflow",
{NXGE_FM_EREPORT_TXMAC_TXFIFO_XFR_ERR, "txmac_txfifo_xfr_err",
{NXGE_FM_EREPORT_TXMAC_MAX_PKT_ERR, "txmac_max_pkt_err",
{NXGE_FM_EREPORT_TXMAC_RESET_FAIL, "txmac_reset_fail",
};
{NXGE_FM_EREPORT_ESPC_ACCESS_FAIL, "eprom_access_fail",
};
{NXGE_FM_EREPORT_XAUI_ERR, "xaui_bad_or_missing",
};
{NXGE_FM_EREPORT_XFP_ERR, "xfp_bad_or_missing",
};
{NXGE_FM_EREPORT_SW_INVALID_PORT_NUM, "invalid_port_num",
{NXGE_FM_EREPORT_SW_INVALID_CHAN_NUM, "invalid_chan_num",
{NXGE_FM_EREPORT_SW_INVALID_PARAM, "invalid_param",
};
void
{
/*
* fm-capable in nxge.conf can be used to set fm_capabilities.
* If fm-capable is not defined, then the last argument passed to
* ddi_prop_get_int will be returned as the capabilities.
*/
if (isLDOMguest(nxgep)) {
return;
}
/*
* Register capabilities with IO Fault Services. The capabilities
* set above may not be supported by the parent nexus, in that case
* some capability bits may be cleared.
*/
if (nxgep->fm_capabilities)
/*
* Initialize pci ereport capabilities if ereport capable
*/
}
/* Register error callback if error callback capable */
nxge_fm_error_cb, (void*) nxgep);
}
/*
* DDI_FLGERR_ACC indicates:
* o Driver will check its access handle(s) for faults on
* a regular basis by calling ddi_fm_acc_err_get
* o Driver is able to cope with incorrect results of I/O
* operations resulted from an I/O fault
*/
} else {
}
/*
* DDI_DMA_FLAGERR indicates:
* o Driver will check its DMA handle(s) for faults on a
* regular basis using ddi_fm_dma_err_get
* o Driver is able to cope with incorrect results of DMA
* operations resulted from an I/O fault
*/
else
}
void
{
/* Only unregister FMA capabilities if we registered some */
if (nxgep->fm_capabilities) {
/*
* Release any resources allocated by pci_ereport_setup()
*/
/*
* Un-register error callback if error callback capable
*/
/* Unregister from IO Fault Services */
}
}
/*ARGSUSED*/
/*
* Simply call pci_ereport_post which generates ereports for errors
* that occur in the PCI local bus configuration status registers.
*/
static int
const void *impl_data)
{
return (err->fme_status);
}
static nxge_fm_ereport_attr_t *
{
switch (blk_id) {
case FM_SW_ID:
break;
case FM_PCS_ID:
break;
case FM_TXMAC_ID:
break;
case FM_RXMAC_ID:
break;
case FM_MIF_ID:
break;
case FM_FFLP_ID:
break;
case FM_ZCP_ID:
break;
case FM_RXDMA_ID:
break;
case FM_TXDMA_ID:
break;
case FM_IPP_ID:
break;
case FM_TXC_ID:
break;
case FM_ESPC_ID:
break;
case FM_XAUI_ID:
break;
case FM_XFP_ID:
break;
default:
}
return (attr);
}
static void
{
char eclass[FM_MAX_CLASS];
char *err_str;
NULL);
break;
NULL);
break;
NULL);
break;
NULL);
break;
NULL);
break;
NULL);
break;
NULL);
break;
NULL);
break;
NULL);
break;
{
int rdc_grp;
}
}
}
break;
NULL);
break;
NULL);
break;
{
else
NULL);
}
break;
{
NULL);
}
break;
{
NULL);
break;
}
NULL);
break;
NULL);
break;
NULL);
break;
NULL);
break;
NULL);
break;
NULL);
break;
NULL);
break;
case NXGE_FM_EREPORT_XAUI_ERR:
case NXGE_FM_EREPORT_XFP_ERR:
NULL);
break;
}
}
void
{
if (fm_ereport_attr != NULL &&
}
}
int
{
#ifndef NXGE_FM_S10
#endif
return (err.fme_status);
}
int
{
return (err.fme_status);
}