FreeBSD/sys/dev/mrsas/mrsas.c
/*
 * mrsas_teardown_intr:	Teardown interrupt
 * input:				Adapter instance soft state
 *
 * This function is called from mrsas_detach() to teardown and release bus
 * interrupt resourse.
 */
Teardown interrupt
input:                               Adapter instance soft state

This function is called from mrsas_detach() to teardown and release bus
interrupt resourse.
Teardown interrupt input : Adapter instance soft state This function is called from mrsas_detach () to teardown and release bus interrupt resourse .
void
mrsas_teardown_intr(struct mrsas_softc *sc)
{
	int i;
	if (!sc->msix_enable) {
		if (sc->intr_handle[0])
			bus_teardown_intr(sc->mrsas_dev, sc->mrsas_irq[0], sc->intr_handle[0]);
		if (sc->mrsas_irq[0] != NULL)
			bus_release_resource(sc->mrsas_dev, SYS_RES_IRQ,
			    sc->irq_id[0], sc->mrsas_irq[0]);
		sc->intr_handle[0] = NULL;
	} else {
		for (i = 0; i < sc->msix_vectors; i++) {
			if (sc->intr_handle[i])
				bus_teardown_intr(sc->mrsas_dev, sc->mrsas_irq[i],
				    sc->intr_handle[i]);
			if (sc->mrsas_irq[i] != NULL)
				bus_release_resource(sc->mrsas_dev, SYS_RES_IRQ,
				    sc->irq_id[i], sc->mrsas_irq[i]);
			sc->intr_handle[i] = NULL;
		}
		pci_release_msi(sc->mrsas_dev);
	}
}
void mrsas_teardown_intr ( struct mrsas_softc * sc ) { int i ; if ( ! sc -> msix_enable ) { if ( sc -> intr_handle [ 0 ] ) bus_teardown_intr ( sc -> mrsas_dev , sc -> mrsas_irq [ 0 ] , sc -> intr_handle [ 0 ] ) ; if ( sc -> mrsas_irq [ 0 ] != NULL ) bus_release_resource ( sc -> mrsas_dev , SYS_RES_IRQ , sc -> irq_id [ 0 ] , sc -> mrsas_irq [ 0 ] ) ; sc -> intr_handle [ 0 ] = NULL ; } else { for ( i = 0 ; i < sc -> msix_vectors ; i ++ ) { if ( sc -> intr_handle [ i ] ) bus_teardown_intr ( sc -> mrsas_dev , sc -> mrsas_irq [ i ] , sc -> intr_handle [ i ] ) ; if ( sc -> mrsas_irq [ i ] != NULL ) bus_release_resource ( sc -> mrsas_dev , SYS_RES_IRQ , sc -> irq_id [ i ] , sc -> mrsas_irq [ i ] ) ; sc -> intr_handle [ i ] = NULL ; } pci_release_msi ( sc -> mrsas_dev ) ; } }
mrsas_teardown_intr: Teardown interrupt
 input:                               Adapter instance soft state
mrsas_teardown_intr : Teardown interrupt input : Adapter instance soft state