FreeBSD/sys/dev/e1000/if_em.c
/*********************************************************************
 *
 *  MSIX Link Fast Interrupt Service routine
 *
 **********************************************************************/
MSIX Link Fast Interrupt Service routine
MSIX Link Fast Interrupt Service routine
static void
em_msix_link(void *arg)
{
	struct adapter	*adapter = arg;
	u32		reg_icr;
	++adapter->link_irq;
	reg_icr = E1000_READ_REG(&adapter->hw, E1000_ICR);
	if (reg_icr & E1000_ICR_RXO)
		adapter->rx_overruns++;
	if (reg_icr & (E1000_ICR_RXSEQ | E1000_ICR_LSC)) {
		adapter->hw.mac.get_link_status = 1;
		em_handle_link(adapter, 0);
	} else
		E1000_WRITE_REG(&adapter->hw, E1000_IMS,
		    EM_MSIX_LINK | E1000_IMS_LSC);
	if (reg_icr) {
		E1000_WRITE_REG(&adapter->hw,
			E1000_ICS, adapter->ims);
	}
	return;
}
static void em_msix_link ( void * arg ) { struct adapter * adapter = arg ; u32 reg_icr ; ++ adapter -> link_irq ; reg_icr = E1000_READ_REG ( & adapter -> hw , E1000_ICR ) ; if ( reg_icr & E1000_ICR_RXO ) adapter -> rx_overruns ++ ; if ( reg_icr & ( E1000_ICR_RXSEQ | E1000_ICR_LSC ) ) { adapter -> hw . mac . get_link_status = 1 ; em_handle_link ( adapter , 0 ) ; } else E1000_WRITE_REG ( & adapter -> hw , E1000_IMS , EM_MSIX_LINK | E1000_IMS_LSC ) ; if ( reg_icr ) { E1000_WRITE_REG ( & adapter -> hw , E1000_ICS , adapter -> ims ) ; } return ; }
MSIX Link Fast Interrupt Service routine
MSIX Link Fast Interrupt Service routine
/*
 	** Because we must read the ICR for this interrupt
 	** it may clear other causes using autoclear, for
 	** this reason we simply create a soft interrupt
 	** for all these vectors.
 	*/