From: "Nakajima, Jun" Doing this for Len, who is on vacation. We would like to thank the people who provided debugging info such as acpidmp, dmidecode, and demsg. This is one of our findings, and we believe this would fix some interrupt problems (with USB, for example) with ACPI enabled, especially when the dmesg reads like: ACPI: PCI Interrupt Link [ALKA] enabled at IRQ 0 ACPI: PCI Interrupt Link [ALKB] enabled at IRQ 0 ACPI: PCI Interrupt Link [ALKC] enabled at IRQ 0 ACPI: PCI Interrupt Link [ALKD] enabled at IRQ 0 Basically we assumed that _CRS returned the one we set with _SRS, when setting up a PCI interrupt link device, but that's not the case with some AML codes. Some of them always return 0. Attached is a patch against 2.4.23-pre1. It should be easy to apply this to 2.6. DESC acpi fix EDESC From: Chris Wright This patch wouldn't compile with CONFIG_ACPI_DEBUG=y drivers/acpi/pci_link.c | 32 ++++++++++++++++++++++++++------ 1 files changed, 26 insertions(+), 6 deletions(-) diff -puN drivers/acpi/pci_link.c~acpi-pci-routing-fixes drivers/acpi/pci_link.c --- 25/drivers/acpi/pci_link.c~acpi-pci-routing-fixes 2003-09-03 23:40:23.000000000 -0700 +++ 25-akpm/drivers/acpi/pci_link.c 2003-09-03 23:40:23.000000000 -0700 @@ -220,7 +220,6 @@ acpi_pci_link_check_current ( return AE_CTRL_TERMINATE; } - static int acpi_pci_link_get_current ( struct acpi_pci_link *link) @@ -279,6 +278,31 @@ end: return_VALUE(result); } +static int +acpi_pci_link_try_get_current ( + struct acpi_pci_link *link, + int irq) +{ + int result; + + ACPI_FUNCTION_TRACE("acpi_pci_link_try_get_current"); + + result = acpi_pci_link_get_current(link); + if (result && link->irq.active) { + return_VALUE(result); + } + + if (!link->irq.active) { + ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "No active IRQ resource found\n")); + printk(KERN_WARNING "_CRS returns NULL! Using IRQ %d for " + "device (%s [%s]).\n", + irq, acpi_device_name(link->device), + acpi_device_bid(link->device)); + link->irq.active = irq; + } + + return 0; +} static int acpi_pci_link_set ( @@ -361,7 +385,7 @@ acpi_pci_link_set ( } /* Make sure the active IRQ is the one we requested. */ - result = acpi_pci_link_get_current(link); + result = acpi_pci_link_try_get_current(link, irq); if (result) { return_VALUE(result); } @@ -574,10 +598,6 @@ acpi_pci_link_add ( else printk(" %d", link->irq.possible[i]); } - if (!link->irq.active) - printk(", disabled"); - else if (!found) - printk(", enabled at IRQ %d", link->irq.active); printk(")\n"); /* TBD: Acquire/release lock */ _