src/dpdk/drivers/net/cxgbe/base/t4_hw.c
void t4_intr_enable(struct adapter *adapter)
{
	u32 val = 0;
	u32 whoami = t4_read_reg(adapter, A_PL_WHOAMI);
	u32 pf = CHELSIO_CHIP_VERSION(adapter->params.chip) <= CHELSIO_T5 ?
		 G_SOURCEPF(whoami) : G_T6_SOURCEPF(whoami);

	if (CHELSIO_CHIP_VERSION(adapter->params.chip) <= CHELSIO_T5)
		val = F_ERR_DROPPED_DB | F_ERR_EGR_CTXT_PRIO | F_DBFIFO_HP_INT;
	t4_write_reg(adapter, A_SGE_INT_ENABLE3, F_ERR_CPL_EXCEED_IQE_SIZE |
		     F_ERR_INVALID_CIDX_INC | F_ERR_CPL_OPCODE_0 |
		     F_ERR_DATA_CPL_ON_HIGH_QID1 | F_INGRESS_SIZE_ERR |
		     F_ERR_DATA_CPL_ON_HIGH_QID0 | F_ERR_BAD_DB_PIDX3 |
		     F_ERR_BAD_DB_PIDX2 | F_ERR_BAD_DB_PIDX1 |
		     F_ERR_BAD_DB_PIDX0 | F_ERR_ING_CTXT_PRIO |
		     F_DBFIFO_LP_INT | F_EGRESS_SIZE_ERR | val);
	t4_write_reg(adapter, MYPF_REG(A_PL_PF_INT_ENABLE), PF_INTR_MASK);
	t4_set_reg_field(adapter, A_PL_INT_MAP0, 0, 1 << pf);
}
/**
 * t4_intr_enable - enable interrupts
 * @adapter: the adapter whose interrupts should be enabled
 *
 * Enable PF-specific interrupts for the calling function and the top-level
 * interrupt concentrator for global interrupts.  Interrupts are already
 * enabled at each module, here we just enable the roots of the interrupt
 * hierarchies.
 *
 * Note: this function should be called only when the driver manages
 * non PF-specific interrupts from the various HW modules.  Only one PCI
 * function at a time should be doing this.
 */
enable interrupts
@adapter: the adapter whose interrupts should be enabled

Enable PF-specific interrupts for the calling function and the top-level
interrupt concentrator for global interrupts.  Interrupts are already
enabled at each module, here we just enable the roots of the interrupt
hierarchies.

this function should be called only when the driver manages
non PF-specific interrupts from the various HW modules.  Only one PCI
function at a time should be doing this.
enable interrupts @adapter : the adapter whose interrupts should be enabled Enable PF - specific interrupts for the calling function and the top - level interrupt concentrator for global interrupts . Interrupts are already enabled at each module here we just enable the roots of the interrupt hierarchies . this function should be called only when the driver manages non PF - specific interrupts from the various HW modules . Only one PCI function at a time should be doing this .
void t4_intr_enable(struct adapter *adapter)
{
	u32 val = 0;
	u32 whoami = t4_read_reg(adapter, A_PL_WHOAMI);
	u32 pf = CHELSIO_CHIP_VERSION(adapter->params.chip) <= CHELSIO_T5 ?
		 G_SOURCEPF(whoami) : G_T6_SOURCEPF(whoami);
	if (CHELSIO_CHIP_VERSION(adapter->params.chip) <= CHELSIO_T5)
		val = F_ERR_DROPPED_DB | F_ERR_EGR_CTXT_PRIO | F_DBFIFO_HP_INT;
	t4_write_reg(adapter, A_SGE_INT_ENABLE3, F_ERR_CPL_EXCEED_IQE_SIZE |
		     F_ERR_INVALID_CIDX_INC | F_ERR_CPL_OPCODE_0 |
		     F_ERR_DATA_CPL_ON_HIGH_QID1 | F_INGRESS_SIZE_ERR |
		     F_ERR_DATA_CPL_ON_HIGH_QID0 | F_ERR_BAD_DB_PIDX3 |
		     F_ERR_BAD_DB_PIDX2 | F_ERR_BAD_DB_PIDX1 |
		     F_ERR_BAD_DB_PIDX0 | F_ERR_ING_CTXT_PRIO |
		     F_DBFIFO_LP_INT | F_EGRESS_SIZE_ERR | val);
	t4_write_reg(adapter, MYPF_REG(A_PL_PF_INT_ENABLE), PF_INTR_MASK);
	t4_set_reg_field(adapter, A_PL_INT_MAP0, 0, 1 << pf);
}
void t4_intr_enable ( struct adapter * adapter ) { u32 val = 0 ; u32 whoami = t4_read_reg ( adapter , A_PL_WHOAMI ) ; u32 pf = CHELSIO_CHIP_VERSION ( adapter -> params . chip ) <= CHELSIO_T5 ? G_SOURCEPF ( whoami ) : G_T6_SOURCEPF ( whoami ) ; if ( CHELSIO_CHIP_VERSION ( adapter -> params . chip ) <= CHELSIO_T5 ) val = F_ERR_DROPPED_DB | F_ERR_EGR_CTXT_PRIO | F_DBFIFO_HP_INT ; t4_write_reg ( adapter , A_SGE_INT_ENABLE3 , F_ERR_CPL_EXCEED_IQE_SIZE | F_ERR_INVALID_CIDX_INC | F_ERR_CPL_OPCODE_0 | F_ERR_DATA_CPL_ON_HIGH_QID1 | F_INGRESS_SIZE_ERR | F_ERR_DATA_CPL_ON_HIGH_QID0 | F_ERR_BAD_DB_PIDX3 | F_ERR_BAD_DB_PIDX2 | F_ERR_BAD_DB_PIDX1 | F_ERR_BAD_DB_PIDX0 | F_ERR_ING_CTXT_PRIO | F_DBFIFO_LP_INT | F_EGRESS_SIZE_ERR | val ) ; t4_write_reg ( adapter , MYPF_REG ( A_PL_PF_INT_ENABLE ) , PF_INTR_MASK ) ; t4_set_reg_field ( adapter , A_PL_INT_MAP0 , 0 , 1 << pf ) ; }
t4_intr_enable - enable interrupts
 @adapter: the adapter whose interrupts should be enabled
t4_intr_enable - enable interrupts @adapter : the adapter whose interrupts should be enabled