Fixing USB interrupt problems with ACPI enabled
From: Nakajima, Jun (jun.nakajima_at_intel.com)
Date: 08/30/03
- Previous message: Andrea Arcangeli: "Re: Andrea VM changes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 30 Aug 2003 08:47:41 -0700 To: "lkml" <linux-kernel@vger.kernel.org>, <acpi-devel@lists.sourceforge.net>
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.
Thanks,
Jun
___
diff -ru /build/orig/linux-2.4.23-pre1/drivers/acpi/pci_link.c
linux-2.4.23-pre1/drivers/acpi/pci_link.c
--- /build/orig/linux-2.4.23-pre1/drivers/acpi/pci_link.c
2003-08-25 04:44:41.000000000 -0700
+++ linux-2.4.23-pre1/drivers/acpi/pci_link.c 2003-08-29
20:21:13.000000000 -0700
@@ -216,7 +216,6 @@
return AE_CTRL_TERMINATE;
}
-
static int
acpi_pci_link_get_current (
struct acpi_pci_link *link)
@@ -275,6 +274,26 @@
return_VALUE(result);
}
+static int
+acpi_pci_link_try_get_current (
+ struct acpi_pci_link *link,
+ int irq)
+{
+ int result;
+
+ 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 (
@@ -359,7 +378,7 @@
}
/* 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);
}
@@ -573,10 +592,6 @@
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 */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Previous message: Andrea Arcangeli: "Re: Andrea VM changes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- Re: Catching NForce2 lockup with NMI watchdog
... Using ACPI for SMP configuration information ... number of MP IRQ sources:
... PCI Interrupt Link ... Pin 2-23 already programmed ... (Linux-Kernel) - Re: libata Promise driver regression 2.6.5->2.6.6 (now 2.6.7-rc1-bk4)
... Using ACPI for SMP configuration information ... PCI Interrupt Link BIOS
reported IRQ 0, ... no device found (phy stat 00000000) ... (Linux-Kernel) - kernels 2.6{1,2,3-rc3}: Prolific PL3507 external HDD enclosure problems
... usb 1-3: new high speed USB device using address 2 ... ACPI: IRQ9 SCI:
Level Trigger. ... PCI Interrupt Link ... PCI Interrupt Link enabled at IRQ
9 ... (Linux-Kernel) - Re: rc4-mm1 pci-routing
... ACPI: Local APIC address 0xfee00000 ... ...trying to set up timer as Virtual
Wire IRQ... ... PCI Interrupt Link, ... 15 nodes reported by PnP BIOS; 15 recorded
by driver ... (Linux-Kernel) - Re: [PATCH] Staircase 7.1 for 2.6.7-mm1
... I have tried this staircase patch on 2.6.7-mm1 kernel under NForce2 ... Using
ACPI for SMP configuration information ... ...trying to set up timer as Virtual Wire
IRQ... ... PCI Interrupt Link, ... (Linux-Kernel)