FreeBSD/sys/dev/cxgb/common/cxgb_t3_hw.c
/**
 *	t3_intr_clear - clear all interrupts
 *	@adapter: the adapter whose interrupts should be cleared
 *
 *	Clears all interrupts.
 */
clear all interrupts
@adapter: the adapter whose interrupts should be cleared

Clears all interrupts.
clear all interrupts @adapter : the adapter whose interrupts should be cleared Clears all interrupts .
void t3_intr_clear(adapter_t *adapter)
{
	static const unsigned int cause_reg_addr[] = {
		A_SG_INT_CAUSE,
		A_SG_RSPQ_FL_STATUS,
		A_PCIX_INT_CAUSE,
		A_MC7_INT_CAUSE,
		A_MC7_INT_CAUSE - MC7_PMRX_BASE_ADDR + MC7_PMTX_BASE_ADDR,
		A_MC7_INT_CAUSE - MC7_PMRX_BASE_ADDR + MC7_CM_BASE_ADDR,
		A_CIM_HOST_INT_CAUSE,
		A_TP_INT_CAUSE,
		A_MC5_DB_INT_CAUSE,
		A_ULPRX_INT_CAUSE,
		A_ULPTX_INT_CAUSE,
		A_CPL_INTR_CAUSE,
		A_PM1_TX_INT_CAUSE,
		A_PM1_RX_INT_CAUSE,
		A_MPS_INT_CAUSE,
		A_T3DBG_INT_CAUSE,
	};
	unsigned int i;
	for_each_port(adapter, i)
		t3_port_intr_clear(adapter, i);
	for (i = 0; i < ARRAY_SIZE(cause_reg_addr); ++i)
		t3_write_reg(adapter, cause_reg_addr[i], 0xffffffff);
	if (is_pcie(adapter))
		t3_write_reg(adapter, A_PCIE_PEX_ERR, 0xffffffff);
	t3_write_reg(adapter, A_PL_INT_CAUSE0, 0xffffffff);
	(void) t3_read_reg(adapter, A_PL_INT_CAUSE0);          
}
void t3_intr_clear ( adapter_t * adapter ) { static const unsigned int cause_reg_addr [ ] = { A_SG_INT_CAUSE , A_SG_RSPQ_FL_STATUS , A_PCIX_INT_CAUSE , A_MC7_INT_CAUSE , A_MC7_INT_CAUSE - MC7_PMRX_BASE_ADDR + MC7_PMTX_BASE_ADDR , A_MC7_INT_CAUSE - MC7_PMRX_BASE_ADDR + MC7_CM_BASE_ADDR , A_CIM_HOST_INT_CAUSE , A_TP_INT_CAUSE , A_MC5_DB_INT_CAUSE , A_ULPRX_INT_CAUSE , A_ULPTX_INT_CAUSE , A_CPL_INTR_CAUSE , A_PM1_TX_INT_CAUSE , A_PM1_RX_INT_CAUSE , A_MPS_INT_CAUSE , A_T3DBG_INT_CAUSE , } ; unsigned int i ; for_each_port ( adapter , i ) t3_port_intr_clear ( adapter , i ) ; for ( i = 0 ; i < ARRAY_SIZE ( cause_reg_addr ) ; ++ i ) t3_write_reg ( adapter , cause_reg_addr [ i ] , 0xffffffff ) ; if ( is_pcie ( adapter ) ) t3_write_reg ( adapter , A_PCIE_PEX_ERR , 0xffffffff ) ; t3_write_reg ( adapter , A_PL_INT_CAUSE0 , 0xffffffff ) ; ( void ) t3_read_reg ( adapter , A_PL_INT_CAUSE0 ) ; }
t3_intr_clear - clear all interrupts
      @adapter: the adapter whose interrupts should be cleared
t3_intr_clear - clear all interrupts @adapter : the adapter whose interrupts should be cleared
/* Clear PHY and MAC interrupts for each port. */ /* flush */