FreeBSD/sys/dev/e1000/if_igb.c
/*********************************************************************
 *
 *  MSI/Legacy Deferred
 *  Interrupt Service routine  
 *
 *********************************************************************/
MSI/Legacy Deferred
Interrupt Service routine
MSI / Legacy Deferred Interrupt Service routine
static int
igb_irq_fast(void *arg)
{
	struct adapter		*adapter = arg;
	struct igb_queue	*que = adapter->queues;
	u32			reg_icr;
	reg_icr = E1000_READ_REG(&adapter->hw, E1000_ICR);
	if (reg_icr == 0xffffffff)
		return FILTER_STRAY;
	if (reg_icr == 0x0)
		return FILTER_STRAY;
	if ((reg_icr & E1000_ICR_INT_ASSERTED) == 0)
		return FILTER_STRAY;
	igb_disable_intr(adapter);
	taskqueue_enqueue(que->tq, &que->que_task);
	if (reg_icr & (E1000_ICR_RXSEQ | E1000_ICR_LSC))
		taskqueue_enqueue(que->tq, &adapter->link_task);
	if (reg_icr & E1000_ICR_RXO)
		adapter->rx_overruns++;
	return FILTER_HANDLED;
}
static int igb_irq_fast ( void * arg ) { struct adapter * adapter = arg ; struct igb_queue * que = adapter -> queues ; u32 reg_icr ; reg_icr = E1000_READ_REG ( & adapter -> hw , E1000_ICR ) ; if ( reg_icr == 0xffffffff ) return FILTER_STRAY ; if ( reg_icr == 0x0 ) return FILTER_STRAY ; if ( ( reg_icr & E1000_ICR_INT_ASSERTED ) == 0 ) return FILTER_STRAY ; igb_disable_intr ( adapter ) ; taskqueue_enqueue ( que -> tq , & que -> que_task ) ; if ( reg_icr & ( E1000_ICR_RXSEQ | E1000_ICR_LSC ) ) taskqueue_enqueue ( que -> tq , & adapter -> link_task ) ; if ( reg_icr & E1000_ICR_RXO ) adapter -> rx_overruns ++ ; return FILTER_HANDLED ; }
MSI/Legacy Deferred
  Interrupt Service routine
MSI / Legacy Deferred 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 */