FreeBSD/sys/dev/e1000/if_lem.c
/*********************************************************************
 *
 *  Fast Legacy/MSI Combined Interrupt Service routine  
 *
 *********************************************************************/
Fast Legacy/MSI Combined Interrupt Service routine
Fast Legacy / MSI Combined Interrupt Service routine
static int
lem_irq_fast(void *arg)
{
	struct adapter	*adapter = arg;
	if_t ifp;
	u32		reg_icr;
	ifp = adapter->ifp;
	reg_icr = E1000_READ_REG(&adapter->hw, E1000_ICR);
	if (reg_icr == 0xffffffff)
		return FILTER_STRAY;
	if (reg_icr == 0x0)
		return FILTER_STRAY;
	lem_disable_intr(adapter);
	taskqueue_enqueue(adapter->tq, &adapter->rxtx_task);
	if (reg_icr & (E1000_ICR_RXSEQ | E1000_ICR_LSC)) {
		adapter->hw.mac.get_link_status = 1;
		taskqueue_enqueue(taskqueue_fast, &adapter->link_task);
	}
	if (reg_icr & E1000_ICR_RXO)
		adapter->rx_overruns++;
	return FILTER_HANDLED;
}
static int lem_irq_fast ( void * arg ) { struct adapter * adapter = arg ; if_t ifp ; u32 reg_icr ; ifp = adapter -> ifp ; reg_icr = E1000_READ_REG ( & adapter -> hw , E1000_ICR ) ; if ( reg_icr == 0xffffffff ) return FILTER_STRAY ; if ( reg_icr == 0x0 ) return FILTER_STRAY ; lem_disable_intr ( adapter ) ; taskqueue_enqueue ( adapter -> tq , & adapter -> rxtx_task ) ; if ( reg_icr & ( E1000_ICR_RXSEQ | E1000_ICR_LSC ) ) { adapter -> hw . mac . get_link_status = 1 ; taskqueue_enqueue ( taskqueue_fast , & adapter -> link_task ) ; } if ( reg_icr & E1000_ICR_RXO ) adapter -> rx_overruns ++ ; return FILTER_HANDLED ; }
Fast Legacy/MSI Combined Interrupt Service routine
Fast Legacy / MSI Combined Interrupt Service routine
/* Hot eject?  */ /* Definitely not our interrupt.  */ /*
	 * Mask interrupts until the taskqueue is finished running.  This is
	 * cheap, just assume that it is needed.  This also works around the
	 * MSI message reordering errata on certain systems.
	 */ /* Link status change */