--- linux-2.4.22-1.2174.nptl.asp/drivers/acpi/pci_link.c 2004-02-20 00:52:23.000000000 +0300 +++ linux-2.4.22-1.2174.nptl.aspmy/drivers/acpi/pci_link.c 2004-04-24 13:15:09.000000000 +0400 @@ -261,12 +261,6 @@ goto end; } - /* - * Note that we don't validate that the current IRQ (_CRS) exists - * within the possible IRQs (_PRS): we blindly assume that whatever - * IRQ a boot-enabled Link device is set to is the correct one. - * (Required to support systems such as the Toshiba 5005-S504.) - */ link->irq.active = irq; ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Link at IRQ %d \n", link->irq.active)); @@ -495,13 +489,26 @@ static int acpi_pci_link_allocate(struct acpi_pci_link* link) { int irq; int i; + int irq_allowed; ACPI_FUNCTION_TRACE("acpi_pci_link_allocate"); if (link->irq.setonboot) return_VALUE(0); - if (link->irq.active) { + if(link->irq.active) { + irq_allowed = 0; + for (i=(link->irq.possible_count-1); i>0; i--) + if(link->irq.possible[i] == link->irq.active) + { + irq_allowed = 1; + break; + } + } else { + irq_allowed = 1; + } + + if (link->irq.active && irq_allowed) { irq = link->irq.active; } else { irq = link->irq.possible[0];