FreeBSD/sys/dev/cxgb/cxgb_sge.c
/*
 * Interrupt handler for legacy INTx interrupts for T3B-based cards.
 * Handles data events from SGE response queues as well as error and other
 * async events as they all use the same interrupt pin.  We use one SGE
 * response queue per port in this mode and protect all response queues with
 * queue 0's lock.
 */
Interrupt handler for legacy INTx interrupts for T3B-based cards.
Handles data events from SGE response queues as well as error and other
async events as they all use the same interrupt pin.  We use one SGE
response queue per port in this mode and protect all response queues with
queue 0's lock.
Interrupt handler for legacy INTx interrupts for T3B - based cards . Handles data events from SGE response queues as well as error and other async events as they all use the same interrupt pin . We use one SGE response queue per port in this mode and protect all response queues with queue 0 ' s lock .
void
t3b_intr(void *data)
{
	uint32_t i, map;
	adapter_t *adap = data;
	struct sge_rspq *q0 = &adap->sge.qs[0].rspq;
	t3_write_reg(adap, A_PL_CLI, 0);
	map = t3_read_reg(adap, A_SG_DATA_INTR);
	if (!map) 
		return;
	if (__predict_false(map & F_ERRINTR)) {
		t3_write_reg(adap, A_PL_INT_ENABLE0, 0);
		(void) t3_read_reg(adap, A_PL_INT_ENABLE0);
		taskqueue_enqueue(adap->tq, &adap->slow_intr_task);
	}
	mtx_lock(&q0->lock);
	for_each_port(adap, i)
	    if (map & (1 << i))
			process_responses_gts(adap, &adap->sge.qs[i].rspq);
	mtx_unlock(&q0->lock);
}
void t3b_intr ( void * data ) { uint32_t i , map ; adapter_t * adap = data ; struct sge_rspq * q0 = & adap -> sge . qs [ 0 ] . rspq ; t3_write_reg ( adap , A_PL_CLI , 0 ) ; map = t3_read_reg ( adap , A_SG_DATA_INTR ) ; if ( ! map ) return ; if ( __predict_false ( map & F_ERRINTR ) ) { t3_write_reg ( adap , A_PL_INT_ENABLE0 , 0 ) ; ( void ) t3_read_reg ( adap , A_PL_INT_ENABLE0 ) ; taskqueue_enqueue ( adap -> tq , & adap -> slow_intr_task ) ; } mtx_lock ( & q0 -> lock ) ; for_each_port ( adap , i ) if ( map & ( 1 << i ) ) process_responses_gts ( adap , & adap -> sge . qs [ i ] . rspq ) ; mtx_unlock ( & q0 -> lock ) ; }
Interrupt handler for legacy INTx interrupts for T3B-based cards.
Interrupt handler for legacy INTx interrupts for T3B - based cards .