FreeBSD/sys/dev/ixl/ixl_pf_main.c
/*
 * Configure admin queue/misc interrupt cause registers in hardware.
 */
Configure admin queue/misc interrupt cause registers in hardware.
Configure admin queue / misc interrupt cause registers in hardware .
void
ixl_configure_intr0_msix(struct ixl_pf *pf)
{
	struct i40e_hw *hw = &pf->hw;
	u32 reg;
	wr32(hw, I40E_PFINT_ICR0_ENA, 0);  
	rd32(hw, I40E_PFINT_ICR0);         
	reg = I40E_PFINT_ICR0_ENA_ECC_ERR_MASK |
	    I40E_PFINT_ICR0_ENA_GRST_MASK |
	    I40E_PFINT_ICR0_ENA_HMC_ERR_MASK |
	    I40E_PFINT_ICR0_ENA_ADMINQ_MASK |
	    I40E_PFINT_ICR0_ENA_MAL_DETECT_MASK |
	    I40E_PFINT_ICR0_ENA_VFLR_MASK |
	    I40E_PFINT_ICR0_ENA_PCI_EXCEPTION_MASK;
	wr32(hw, I40E_PFINT_ICR0_ENA, reg);
	wr32(hw, I40E_PFINT_LNKLST0, 0x7FF);
	wr32(hw, I40E_PFINT_ITR0(IXL_RX_ITR), 0x3E);
	wr32(hw, I40E_PFINT_DYN_CTL0,
	    I40E_PFINT_DYN_CTL0_SW_ITR_INDX_MASK |
	    I40E_PFINT_DYN_CTL0_INTENA_MSK_MASK);
	wr32(hw, I40E_PFINT_STAT_CTL0, 0);
}
void ixl_configure_intr0_msix ( struct ixl_pf * pf ) { struct i40e_hw * hw = & pf -> hw ; u32 reg ; wr32 ( hw , I40E_PFINT_ICR0_ENA , 0 ) ; rd32 ( hw , I40E_PFINT_ICR0 ) ; reg = I40E_PFINT_ICR0_ENA_ECC_ERR_MASK | I40E_PFINT_ICR0_ENA_GRST_MASK | I40E_PFINT_ICR0_ENA_HMC_ERR_MASK | I40E_PFINT_ICR0_ENA_ADMINQ_MASK | I40E_PFINT_ICR0_ENA_MAL_DETECT_MASK | I40E_PFINT_ICR0_ENA_VFLR_MASK | I40E_PFINT_ICR0_ENA_PCI_EXCEPTION_MASK ; wr32 ( hw , I40E_PFINT_ICR0_ENA , reg ) ; wr32 ( hw , I40E_PFINT_LNKLST0 , 0x7FF ) ; wr32 ( hw , I40E_PFINT_ITR0 ( IXL_RX_ITR ) , 0x3E ) ; wr32 ( hw , I40E_PFINT_DYN_CTL0 , I40E_PFINT_DYN_CTL0_SW_ITR_INDX_MASK | I40E_PFINT_DYN_CTL0_INTENA_MSK_MASK ) ; wr32 ( hw , I40E_PFINT_STAT_CTL0 , 0 ) ; }
Configure admin queue/misc interrupt cause registers in hardware.
Configure admin queue / misc interrupt cause registers in hardware .
/* First set up the adminq - vector 0 */ /* disable all */ /* read to clear */ /*
	 * 0x7FF is the end of the queue list.
	 * This means we won't use MSI-X vector 0 for a queue interrupt
	 * in MSIX mode.
	 */ /* Value is in 2 usec units, so 0x3E is 62*2 = 124 usecs. */