[RFC v2] ACPI: pci_link, use the lowest possible IRQ

From: Jiri Slaby
Date: Sun Jun 05 2011 - 16:58:47 EST


On IBM Bartolo machines, the serial board enumerated as 00:09.0 is
defunct (if uses interrupts). The board has probably incorrectly
set IRQ routing in BIOS. DSDT says that this slot (with function 0,
i.e. pin A) is routed to \_SB_.PCI0.PIB_.LNKB. But it doesn't look
like that. If a quirk is added to override this to LNKC, it works OK.

What's interesting is that Windows (with ACPI enabled) work with this
system without problems. So it does with ACPI routing disabled in
Linux. By investigating further we found out (there are two boards
with two ports each):
* acpi routing enabled (no kernel parameter) => ports 4+5 defunct.
ports 4+5+6+7 are all on irq 11
* acpi routing disabled (acpi=noirq) => all ports working, 4+5 on irq
10, 6+7 on irq 11
* with the quirk and acpi routing enabled => all ports working,
ports 4+5 on irq 10, 6+7 on irq 11
* with this patch and acpi routing enabled => all ports working,
ports 4+5 on irq 10, 6+7 on irq 11
* in windows (ACPI enabled) => 4+5+6+7 are all on irq 9 and the ports
are all working.

As Windows seem to use the lowest possible IRQ, let's do the same
thing. However they perhaps enumerate the buses in a different order
so they end up with different IRQs.

References: https://bugzilla.kernel.org/show_bug.cgi?id=18092
References: https://bugzilla.novell.com/show_bug.cgi?id=595683
References: https://lkml.org/lkml/2011/4/12/323
Signed-off-by: Jiri Slaby <jslaby@xxxxxxx>
Cc: Len Brown <lenb@xxxxxxxxxx>
Cc: Jesse Barnes <jbarnes@xxxxxxxxxxxxxxxx>
Cc: Matthew Garrett <mjg59@xxxxxxxxxxxxx>
---
drivers/acpi/pci_link.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index 4a29763..feac720 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -557,7 +557,7 @@ static int acpi_pci_link_allocate(struct acpi_pci_link *link)
* the use of IRQs 9, 10, 11, and >15.
*/
for (i = (link->irq.possible_count - 1); i >= 0; i--) {
- if (acpi_irq_penalty[irq] >
+ if (acpi_irq_penalty[irq] >=
acpi_irq_penalty[link->irq.possible[i]])
irq = link->irq.possible[i];
}
--
1.7.5.3


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/