/*
* 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.
*/
#include <hxge_impl.h>
static hxge_fm_ereport_attr_t
static int
{HXGE_FM_EREPORT_VMAC_LINK_DOWN, "10g_link_down",
};
/*
* The following are part of LDF 0, non-fatal
*/
{HXGE_FM_EREPORT_PFC_TCAM_PAR_ERR, "classifier_tcam_par_err",
{HXGE_FM_EREPORT_PFC_VLAN_PAR_ERR, "classifier_vlan_par_err",
{HXGE_FM_EREPORT_PFC_PKT_DROP, "classifier_pkt_drop_err",
};
/*
* The following are part of LDF1, fatal
*/
{HXGE_FM_EREPORT_RDMC_RBR_CPL_TO, "rxdma_rbr_cpl_to",
{HXGE_FM_EREPORT_RDMC_PEU_RESP_ERR, "rxdma_peu_resp_err",
{HXGE_FM_EREPORT_RDMC_RCR_SHA_PAR, "rxdma_rcr_sha_par_err",
{HXGE_FM_EREPORT_RDMC_RBR_PRE_PAR, "rxdma_rbr_pre_par_err",
{HXGE_FM_EREPORT_RDMC_RBR_PRE_EMPTY, "rxdma_rbr_pre_empty_err",
{HXGE_FM_EREPORT_RDMC_RCR_SHA_FULL, "rxdma_rcr_sha_full",
{HXGE_FM_EREPORT_RDMC_RCRFULL, "rxdma_rcr_full",
{HXGE_FM_EREPORT_RDMC_RBR_EMPTY, "rxdma_rbr_empty",
{HXGE_FM_EREPORT_RDMC_RBRFULL, "rxdma_rbr_full",
{HXGE_FM_EREPORT_RDMC_RCR_ERR, "rxdma_completion_err",
/*
* Fatal error. Part of Device Error 1
*/
{HXGE_FM_EREPORT_RDMC_CTRL_FIFO_DED, "rxdma_ctrl_fifo_ded",
{HXGE_FM_EREPORT_RDMC_DATA_FIFO_DED, "rxdma_data_fifo_ded",
/*
* Non-Fatal error. Part of Device Error 0
*/
{HXGE_FM_EREPORT_RDMC_CTRL_FIFO_SEC, "rxdma_ctrl_fifo_sec",
{HXGE_FM_EREPORT_RDMC_DATA_FIFO_SEC, "rxdma_data_fifo_sec",
};
{HXGE_FM_EREPORT_TDMC_PEU_RESP_ERR, "txdma_peu_resp_err",
{HXGE_FM_EREPORT_TDMC_PKT_SIZE_HDR_ERR, "txdma_pkt_size_hdr_err",
{HXGE_FM_EREPORT_TDMC_RUNT_PKT_DROP_ERR, "txdma_runt_pkt_drop_err",
{HXGE_FM_EREPORT_TDMC_PKT_SIZE_ERR, "txdma_pkt_size_err",
{HXGE_FM_EREPORT_TDMC_TX_RNG_OFLOW, "txdma_tx_rng_oflow",
{HXGE_FM_EREPORT_TDMC_PREF_PAR_ERR, "txdma_pref_par_err",
{HXGE_FM_EREPORT_TDMC_TDR_PREF_CPL_TO, "txdma_tdr_pref_cpl_to",
{HXGE_FM_EREPORT_TDMC_PKT_CPL_TO, "txdma_pkt_cpl_to",
{HXGE_FM_EREPORT_TDMC_INVALID_SOP, "txdma_invalid_sop",
{HXGE_FM_EREPORT_TDMC_UNEXPECTED_SOP, "txdma_unexpected_sop",
{HXGE_FM_EREPORT_TDMC_REORD_TBL_PAR, "txdma_reord_tbl_par_err",
{HXGE_FM_EREPORT_TDMC_REORD_BUF_DED, "txdma_reord_buf_ded_err",
};
{HXGE_FM_EREPORT_PEU_ERR, "peu_peu_err",
{HXGE_FM_EREPORT_PEU_VNM_PIO_ERR, "peu_vnm_pio_err",
};
{HXGE_FM_EREPORT_SW_INVALID_CHAN_NUM, "invalid_chan_num",
{HXGE_FM_EREPORT_SW_INVALID_PARAM, "invalid_param",
};
void
{
/* fm-capable in hxge.conf can be used to set fm_capabilities. */
DDI_PROP_DONTPASS, "fm-capable",
/*
* 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 (hxgep->fm_capabilities)
/*
* Initialize pci ereport capabilities if ereport capable
*/
}
/* Register error callback if error callback capable */
hxge_fm_error_cb, (void *) hxgep);
}
/*
* 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 (hxgep->fm_capabilities) {
/*
* Release any resources allocated by pci_ereport_setup()
*/
/*
* Un-register error callback if error callback capable
*/
/* Unregister from IO Fault Services */
}
}
/*
* Simply call pci_ereport_post which generates ereports for errors
* that occur in the PCI local bus configuration status registers.
*/
/*ARGSUSED*/
static int
const void *impl_data)
{
return (err->fme_status);
}
static hxge_fm_ereport_attr_t *
{
/* Extract the block id and the index within the block */
/* Return the appropriate structure of type hxge_fm_ereport_attr_t */
switch (blk_id) {
case FM_SW_ID:
break;
case FM_VMAC_ID:
break;
case FM_PFC_ID:
break;
case FM_RXDMA_ID:
break;
case FM_TXDMA_ID:
break;
case FM_PEU_ID:
break;
default:
}
return (attr);
}
static void
{
char *err_str;
NULL);
break;
NULL);
break;
NULL);
break;
NULL);
break;
NULL);
break;
case HXGE_FM_EREPORT_RDMC_RCR_SHA_PAR: {
else
NULL);
}
break;
case HXGE_FM_EREPORT_RDMC_RCR_ERR: {
NULL);
}
break;
NULL);
break;
NULL);
break;
break;
NULL);
break;
case HXGE_FM_EREPORT_PEU_ERR:
NULL);
break;
NULL);
break;
}
}
void
{
if (fm_ereport_attr != NULL &&
}
}
int
{
return (err.fme_status);
}
int
{
return (err.fme_status);
}