Author: marius
Date: Sun Dec 29 17:37:32 2013
New Revision: 260044
URL: http://svnweb.freebsd.org/changeset/base/260044

Log:
  Free the MSI again on detach if allocated. Arguably, this code would be
  better off living in aac_pci.c, but it doesn't seem worth creating a
  aac_pci_detach() and it's also not the first PCI-specific bit in aac.c
  
  MFC after:    3 days

Modified:
  head/sys/dev/aac/aac.c

Modified: head/sys/dev/aac/aac.c
==============================================================================
--- head/sys/dev/aac/aac.c      Sun Dec 29 17:08:30 2013        (r260043)
+++ head/sys/dev/aac/aac.c      Sun Dec 29 17:37:32 2013        (r260044)
@@ -631,9 +631,11 @@ aac_free(struct aac_softc *sc)
        /* disconnect the interrupt handler */
        if (sc->aac_intr)
                bus_teardown_intr(sc->aac_dev, sc->aac_irq, sc->aac_intr);
-       if (sc->aac_irq != NULL)
+       if (sc->aac_irq != NULL) {
                bus_release_resource(sc->aac_dev, SYS_RES_IRQ,
                    rman_get_rid(sc->aac_irq), sc->aac_irq);
+               pci_release_msi(sc->aac_dev);
+       }
 
        /* destroy data-transfer DMA tag */
        if (sc->aac_buffer_dmat)
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to