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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux