FreeBSD/sys/dev/bxe/bxe.c
/* Release all interrupts allocated by the driver. */
Release all interrupts allocated by the driver.
Release all interrupts allocated by the driver .
static void
bxe_interrupt_free(struct bxe_softc *sc)
{
    int i;
    switch (sc->interrupt_mode) {
    case INTR_MODE_INTX:
        BLOGD(sc, DBG_LOAD, "Releasing legacy INTx vector\n");
        if (sc->intr[0].resource != NULL) {
            bus_release_resource(sc->dev,
                                 SYS_RES_IRQ,
                                 sc->intr[0].rid,
                                 sc->intr[0].resource);
        }
        break;
    case INTR_MODE_MSI:
        for (i = 0; i < sc->intr_count; i++) {
            BLOGD(sc, DBG_LOAD, "Releasing MSI vector %d\n", i);
            if (sc->intr[i].resource && sc->intr[i].rid) {
                bus_release_resource(sc->dev,
                                     SYS_RES_IRQ,
                                     sc->intr[i].rid,
                                     sc->intr[i].resource);
            }
        }
        pci_release_msi(sc->dev);
        break;
    case INTR_MODE_MSIX:
        for (i = 0; i < sc->intr_count; i++) {
            BLOGD(sc, DBG_LOAD, "Releasing MSI-X vector %d\n", i);
            if (sc->intr[i].resource && sc->intr[i].rid) {
                bus_release_resource(sc->dev,
                                     SYS_RES_IRQ,
                                     sc->intr[i].rid,
                                     sc->intr[i].resource);
            }
        }
        pci_release_msi(sc->dev);
        break;
    default:
        break;
    }
}
static void bxe_interrupt_free ( struct bxe_softc * sc ) { int i ; switch ( sc -> interrupt_mode ) { case INTR_MODE_INTX : BLOGD ( sc , DBG_LOAD , " \n " ) ; if ( sc -> intr [ 0 ] . resource != NULL ) { bus_release_resource ( sc -> dev , SYS_RES_IRQ , sc -> intr [ 0 ] . rid , sc -> intr [ 0 ] . resource ) ; } break ; case INTR_MODE_MSI : for ( i = 0 ; i < sc -> intr_count ; i ++ ) { BLOGD ( sc , DBG_LOAD , " \n " , i ) ; if ( sc -> intr [ i ] . resource && sc -> intr [ i ] . rid ) { bus_release_resource ( sc -> dev , SYS_RES_IRQ , sc -> intr [ i ] . rid , sc -> intr [ i ] . resource ) ; } } pci_release_msi ( sc -> dev ) ; break ; case INTR_MODE_MSIX : for ( i = 0 ; i < sc -> intr_count ; i ++ ) { BLOGD ( sc , DBG_LOAD , " \n " , i ) ; if ( sc -> intr [ i ] . resource && sc -> intr [ i ] . rid ) { bus_release_resource ( sc -> dev , SYS_RES_IRQ , sc -> intr [ i ] . rid , sc -> intr [ i ] . resource ) ; } } pci_release_msi ( sc -> dev ) ; break ; default : break ; } }
Release all interrupts allocated by the driver.
Release all interrupts allocated by the driver .
/* nothing to do as initial allocation failed */