summaryrefslogtreecommitdiffstats
path: root/sys/dev/aac
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2014-04-25 21:24:33 +0000
committermarius <marius@FreeBSD.org>2014-04-25 21:24:33 +0000
commit68e83c58d95579740d618b904320fc17d0188d24 (patch)
tree3c4b2d0912f8ec5a52eb93bfc56c9b553a3658e7 /sys/dev/aac
parent0adda655335e0cde0d9a207119fada63997ce8aa (diff)
downloadFreeBSD-src-68e83c58d95579740d618b904320fc17d0188d24.zip
FreeBSD-src-68e83c58d95579740d618b904320fc17d0188d24.tar.gz
MFC: r260044
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
Diffstat (limited to 'sys/dev/aac')
-rw-r--r--sys/dev/aac/aac.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/aac/aac.c b/sys/dev/aac/aac.c
index c56aeca..c0f11f9 100644
--- a/sys/dev/aac/aac.c
+++ b/sys/dev/aac/aac.c
@@ -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)
OpenPOWER on IntegriCloud