FreeBSD/sys/dev/bxe/bxe.c
/*
 * Legacy interrupt entry point.
 *
 * Verifies that the controller generated the interrupt and
 * then calls a separate routine to handle the various
 * interrupt causes: link, RX, and TX.
 */
Legacy interrupt entry point.
Verifies that the controller generated the interrupt and
then calls a separate routine to handle the various
interrupt causes: link, RX, and TX.
Legacy interrupt entry point . Verifies that the controller generated the interrupt and then calls a separate routine to handle the various interrupt causes : link RX and TX .
static void
bxe_intr_legacy(void *xsc)
{
    struct bxe_softc *sc = (struct bxe_softc *)xsc;
    struct bxe_fastpath *fp;
    uint16_t status, mask;
    int i;
    BLOGD(sc, DBG_INTR, "---> BXE INTx <---\n");
    status = bxe_ack_int(sc);
    if (__predict_false(status == 0)) {
        BLOGD(sc, DBG_INTR, "Not our interrupt!\n");
        return;
    }
    BLOGD(sc, DBG_INTR, "Interrupt status 0x%04x\n", status);
    FOR_EACH_ETH_QUEUE(sc, i) {
        fp = &sc->fp[i];
        mask = (0x2 << (fp->index + CNIC_SUPPORT(sc)));
        if (status & mask) {
            bxe_ack_sb(sc, fp->igu_sb_id, USTORM_ID, 0, IGU_INT_DISABLE, 0);
            bxe_task_fp(fp);
            status &= ~mask;
        }
    }
    if (__predict_false(status & 0x1)) {
        bxe_ack_sb(sc, sc->igu_dsb_id, USTORM_ID, 0, IGU_INT_DISABLE, 0);
        taskqueue_enqueue(sc->sp_tq, &sc->sp_tq_task);
        status &= ~0x1;
    }
    if (__predict_false(status)) {
        BLOGW(sc, "Unexpected fastpath status (0x%08x)!\n", status);
    }
}
static void bxe_intr_legacy ( void * xsc ) { struct bxe_softc * sc = ( struct bxe_softc * ) xsc ; struct bxe_fastpath * fp ; uint16_t status , mask ; int i ; BLOGD ( sc , DBG_INTR , " \n " ) ; status = bxe_ack_int ( sc ) ; if ( __predict_false ( status == 0 ) ) { BLOGD ( sc , DBG_INTR , " \n " ) ; return ; } BLOGD ( sc , DBG_INTR , " \n " , status ) ; FOR_EACH_ETH_QUEUE ( sc , i ) { fp = & sc -> fp [ i ] ; mask = ( 0x2 << ( fp -> index + CNIC_SUPPORT ( sc ) ) ) ; if ( status & mask ) { bxe_ack_sb ( sc , fp -> igu_sb_id , USTORM_ID , 0 , IGU_INT_DISABLE , 0 ) ; bxe_task_fp ( fp ) ; status &= ~ mask ; } } if ( __predict_false ( status & 0x1 ) ) { bxe_ack_sb ( sc , sc -> igu_dsb_id , USTORM_ID , 0 , IGU_INT_DISABLE , 0 ) ; taskqueue_enqueue ( sc -> sp_tq , & sc -> sp_tq_task ) ; status &= ~ 0x1 ; } if ( __predict_false ( status ) ) { BLOGW ( sc , " \n " , status ) ; } }
Legacy interrupt entry point.
Legacy interrupt entry point .
/*
     * 0 for ustorm, 1 for cstorm
     * the bits returned from ack_int() are 0-15
     * bit 0 = attention status block
     * bit 1 = fast path status block
     * a mask of 0x2 or more = tx/rx event
     * a mask of 1 = slow path event
     */ /* the interrupt is not for us */ /* acknowledge and disable further fastpath interrupts */ /* acknowledge and disable further slowpath interrupts */ /* schedule slowpath handler */