[haiku-commits] Change in haiku[master]: hda: Remove interrupt hanlder before freeing interrupt vector.

  • From: Gerrit <review@xxxxxxxxxxxxxxxxxxx>
  • To: waddlesplash <waddlesplash@xxxxxxxxx>, haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 31 Jul 2020 22:32:29 +0000

From Michael Lotz <mmlr@xxxxxxxx>:

Michael Lotz has uploaded this change for review. ( 
https://review.haiku-os.org/c/haiku/+/3112 ;)


Change subject: hda: Remove interrupt hanlder before freeing interrupt vector.
......................................................................

hda: Remove interrupt hanlder before freeing interrupt vector.

Freeing an interrupt vector that still has handlers is not allowed.
---
M src/add-ons/kernel/drivers/audio/hda/hda_controller.cpp
1 file changed, 3 insertions(+), 3 deletions(-)



  git pull ssh://git.haiku-os.org:22/haiku refs/changes/12/3112/1

diff --git a/src/add-ons/kernel/drivers/audio/hda/hda_controller.cpp 
b/src/add-ons/kernel/drivers/audio/hda/hda_controller.cpp
index 72c6fa9..22212c1 100644
--- a/src/add-ons/kernel/drivers/audio/hda/hda_controller.cpp
+++ b/src/add-ons/kernel/drivers/audio/hda/hda_controller.cpp
@@ -1313,6 +1313,9 @@
        // Disable interrupts, and remove interrupt handler
        controller->Write32(HDAC_INTR_CONTROL, 0);

+       remove_io_interrupt_handler(controller->irq,
+               (interrupt_handler)hda_interrupt_handler, controller);
+
        if (controller->msi) {
                // Disable MSI
                gPCIx86Module->disable_msi(controller->pci_info.bus,
@@ -1321,9 +1324,6 @@
                        controller->pci_info.device, 
controller->pci_info.function);
        }

-       remove_io_interrupt_handler(controller->irq,
-               (interrupt_handler)hda_interrupt_handler, controller);
-
        // Delete corb/rirb area
        if (controller->corb_rirb_pos_area >= 0) {
                delete_area(controller->corb_rirb_pos_area);

--
To view, visit https://review.haiku-os.org/c/haiku/+/3112
To unsubscribe, or for help writing mail filters, visit 
https://review.haiku-os.org/settings

Gerrit-Project: haiku
Gerrit-Branch: master
Gerrit-Change-Id: If2f256e5288c7a61b7e23bdb202f259f5b67b7ae
Gerrit-Change-Number: 3112
Gerrit-PatchSet: 1
Gerrit-Owner: Michael Lotz <mmlr@xxxxxxxx>
Gerrit-MessageType: newchange

Other related posts:

  • » [haiku-commits] Change in haiku[master]: hda: Remove interrupt hanlder before freeing interrupt vector. - Gerrit