FreeBSD/sys/dev/cxgbe/common/t4_hw.c
/*
 * t4_report_fw_error - report firmware error
 * @adap: the adapter
 *
 * The adapter firmware can indicate error conditions to the host.
 * If the firmware has indicated an error, print out the reason for
 * the firmware error.
 */
report firmware error
@adap: the adapter

The adapter firmware can indicate error conditions to the host.
If the firmware has indicated an error, print out the reason for
the firmware error.
report firmware error @adap : the adapter The adapter firmware can indicate error conditions to the host . If the firmware has indicated an error print out the reason for the firmware error .
static void t4_report_fw_error(struct adapter *adap)
{
	static const char *const reason[] = {
		"Crash",			
		"During Device Preparation",	
		"During Device Configuration",	
		"During Device Initialization",	
		"Unexpected Event",		
		"Insufficient Airflow",		
		"Device Shutdown",		
		"Reserved",			
	};
	u32 pcie_fw;
	pcie_fw = t4_read_reg(adap, A_PCIE_FW);
	if (pcie_fw & F_PCIE_FW_ERR)
		CH_ERR(adap, "Firmware reports adapter error: %s\n",
			reason[G_PCIE_FW_EVAL(pcie_fw)]);
}
static void t4_report_fw_error ( struct adapter * adap ) { static const char * const reason [ ] = { " " , " " , " " , " " , " " , " " , " " , " " , } ; u32 pcie_fw ; pcie_fw = t4_read_reg ( adap , A_PCIE_FW ) ; if ( pcie_fw & F_PCIE_FW_ERR ) CH_ERR ( adap , " \n " , reason [ G_PCIE_FW_EVAL ( pcie_fw ) ] ) ; }
t4_report_fw_error - report firmware error
 @adap: the adapter
t4_report_fw_error - report firmware error @adap : the adapter
/* PCIE_FW_EVAL_CRASH */ /* PCIE_FW_EVAL_PREP */ /* PCIE_FW_EVAL_CONF */ /* PCIE_FW_EVAL_INIT */ /* PCIE_FW_EVAL_UNEXPECTEDEVENT */ /* PCIE_FW_EVAL_OVERHEAT */ /* PCIE_FW_EVAL_DEVICESHUTDOWN */ /* reserved */