From 6df7fdcf0347bd55f399e00ed228f8dda63de850 Mon Sep 17 00:00:00 2001 From: Clemens Zeidler Date: Sun, 4 Jul 2010 02:59:31 +0000 Subject: [PATCH] Fix reading of the irq routing table. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37385 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/arch/x86/irq_routing_table.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/system/kernel/arch/x86/irq_routing_table.cpp b/src/system/kernel/arch/x86/irq_routing_table.cpp index 79d340336f..98c5e38bda 100644 --- a/src/system/kernel/arch/x86/irq_routing_table.cpp +++ b/src/system/kernel/arch/x86/irq_routing_table.cpp @@ -106,19 +106,16 @@ read_device_irq_routing_table(pci_module_info *pci, acpi_module_info* acpi, if (status != B_OK) return status; - acpi_object_type* object = (acpi_object_type*)buffer.pointer; - if (object->object_type != ACPI_TYPE_PACKAGE) { - free(buffer.pointer); - return B_ERROR; - } - irq_routing_entry irqEntry; acpi_pci_routing_table* acpiTable = (acpi_pci_routing_table*)buffer.pointer; while (acpiTable->length) { irqEntry.device_address = acpiTable->address; irqEntry.pin = acpiTable->pin; - irqEntry.source = acpiTable->source; + acpi_handle source; + if (acpi->get_handle(device, acpiTable->source, &source) != B_OK) + continue; + irqEntry.source = source; irqEntry.source_index = acpiTable->sourceIndex; // connect to pci device