FreeBSD/sys/dev/cxgbe/common/t4_hw.c
/**
 *	t4_intr_clear - clear all interrupts
 *	@adapter: the adapter whose interrupts should be cleared
 *
 *	Clears all interrupts.  The caller must be a PCI function managing
 *	global interrupts.
 */
clear all interrupts
@adapter: the adapter whose interrupts should be cleared

Clears all interrupts.  The caller must be a PCI function managing
global interrupts.
clear all interrupts @adapter : the adapter whose interrupts should be cleared Clears all interrupts . The caller must be a PCI function managing global interrupts .
void t4_intr_clear(struct adapter *adapter)
{
	static const unsigned int cause_reg[] = {
		A_SGE_INT_CAUSE1, A_SGE_INT_CAUSE2, A_SGE_INT_CAUSE3,
		A_PCIE_NONFAT_ERR, A_PCIE_INT_CAUSE,
		A_MA_INT_WRAP_STATUS, A_MA_PARITY_ERROR_STATUS1, A_MA_INT_CAUSE,
		A_EDC_INT_CAUSE, EDC_REG(A_EDC_INT_CAUSE, 1),
		A_CIM_HOST_INT_CAUSE, A_CIM_HOST_UPACC_INT_CAUSE,
		MYPF_REG(A_CIM_PF_HOST_INT_CAUSE),
		A_TP_INT_CAUSE,
		A_ULP_RX_INT_CAUSE, A_ULP_TX_INT_CAUSE,
		A_PM_RX_INT_CAUSE, A_PM_TX_INT_CAUSE,
		A_MPS_RX_PERR_INT_CAUSE,
		A_CPL_INTR_CAUSE,
		MYPF_REG(A_PL_PF_INT_CAUSE),
		A_PL_PL_INT_CAUSE,
		A_LE_DB_INT_CAUSE,
	};
	unsigned int i;
	for (i = 0; i < ARRAY_SIZE(cause_reg); ++i)
		t4_write_reg(adapter, cause_reg[i], 0xffffffff);
	t4_write_reg(adapter, is_t4(adapter) ? A_MC_INT_CAUSE :
				A_MC_P_INT_CAUSE, 0xffffffff);
	if (is_t4(adapter)) {
		t4_write_reg(adapter, A_PCIE_CORE_UTL_SYSTEM_BUS_AGENT_STATUS,
				0xffffffff);
		t4_write_reg(adapter, A_PCIE_CORE_UTL_PCI_EXPRESS_PORT_STATUS,
				0xffffffff);
	} else
		t4_write_reg(adapter, A_MA_PARITY_ERROR_STATUS2, 0xffffffff);
	t4_write_reg(adapter, A_PL_INT_CAUSE, GLBL_INTR_MASK);
	(void) t4_read_reg(adapter, A_PL_INT_CAUSE);          
}
void t4_intr_clear ( struct adapter * adapter ) { static const unsigned int cause_reg [ ] = { A_SGE_INT_CAUSE1 , A_SGE_INT_CAUSE2 , A_SGE_INT_CAUSE3 , A_PCIE_NONFAT_ERR , A_PCIE_INT_CAUSE , A_MA_INT_WRAP_STATUS , A_MA_PARITY_ERROR_STATUS1 , A_MA_INT_CAUSE , A_EDC_INT_CAUSE , EDC_REG ( A_EDC_INT_CAUSE , 1 ) , A_CIM_HOST_INT_CAUSE , A_CIM_HOST_UPACC_INT_CAUSE , MYPF_REG ( A_CIM_PF_HOST_INT_CAUSE ) , A_TP_INT_CAUSE , A_ULP_RX_INT_CAUSE , A_ULP_TX_INT_CAUSE , A_PM_RX_INT_CAUSE , A_PM_TX_INT_CAUSE , A_MPS_RX_PERR_INT_CAUSE , A_CPL_INTR_CAUSE , MYPF_REG ( A_PL_PF_INT_CAUSE ) , A_PL_PL_INT_CAUSE , A_LE_DB_INT_CAUSE , } ; unsigned int i ; for ( i = 0 ; i < ARRAY_SIZE ( cause_reg ) ; ++ i ) t4_write_reg ( adapter , cause_reg [ i ] , 0xffffffff ) ; t4_write_reg ( adapter , is_t4 ( adapter ) ? A_MC_INT_CAUSE : A_MC_P_INT_CAUSE , 0xffffffff ) ; if ( is_t4 ( adapter ) ) { t4_write_reg ( adapter , A_PCIE_CORE_UTL_SYSTEM_BUS_AGENT_STATUS , 0xffffffff ) ; t4_write_reg ( adapter , A_PCIE_CORE_UTL_PCI_EXPRESS_PORT_STATUS , 0xffffffff ) ; } else t4_write_reg ( adapter , A_MA_PARITY_ERROR_STATUS2 , 0xffffffff ) ; t4_write_reg ( adapter , A_PL_INT_CAUSE , GLBL_INTR_MASK ) ; ( void ) t4_read_reg ( adapter , A_PL_INT_CAUSE ) ; }
t4_intr_clear - clear all interrupts
      @adapter: the adapter whose interrupts should be cleared
t4_intr_clear - clear all interrupts @adapter : the adapter whose interrupts should be cleared
/* flush */