[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <200812061316.38460.elendil@planet.nl>
Date: Sat, 6 Dec 2008 13:16:37 +0100
From: Frans Pop <elendil@...net.nl>
To: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Cc: linux1394-devel@...ts.sourceforge.net,
Jarod Wilson <jwilson@...hat.com>,
Stefan Richter <stefanr@...6.in-berlin.de>,
"Rafael J. Wysocki" <rjw@...k.pl>
Subject: ohci1394: "irq 19: nobody cared" during resume from suspend to ram
After resume from suspend to RAM dmesg on my HP 2510p notebook shows:
irq 19: nobody cared (try booting with the "irqpoll" option)
Pid: 0, comm: swapper Not tainted 2.6.28-rc7 #67
Call Trace:
<IRQ> [<ffffffffa00ee9e1>] ? ohci_irq_handler+0x60/0x7e9 [ohci1394]
[<ffffffff8026aa4d>] __report_bad_irq+0x38/0x87
[<ffffffff8026abaa>] note_interrupt+0x10e/0x174
[<ffffffff8026b262>] handle_fasteoi_irq+0xa7/0xd1
[<ffffffff8020eb87>] do_IRQ+0x73/0xe4
[<ffffffff8020c626>] ret_from_intr+0x0/0xa
<EOI> [<ffffffffa0012606>] ? acpi_idle_enter_bm+0x26b/0x2b2 [processor]
[<ffffffffa00125fc>] ? acpi_idle_enter_bm+0x261/0x2b2 [processor]
[<ffffffff8024f30f>] ? notifier_call_chain+0x33/0x5b
[<ffffffff803b9c64>] ? cpuidle_idle_call+0x8c/0xc4
[<ffffffff8020b312>] ? cpu_idle+0x4a/0x9a
[<ffffffff8042c5c8>] ? rest_init+0x5c/0x5e
handlers:
[<ffffffffa00ee981>] (ohci_irq_handler+0x0/0x7e9 [ohci1394])
Disabling IRQ #19
Attached a dmesg that includes one suspend/resume cycle.
I only get the error once on resume, not at any other time.
While looking at the suspend and resume functions I noticed that the
suspend function calls free_irq before saving the PCI config, but there
is no corresponding request_irq in the resume function.
So I naively tried the following patch:
diff --git a/drivers/firewire/fw-ohci.c b/drivers/firewire/fw-ohci.c
index 46610b0..3f283df 100644
--- a/drivers/firewire/fw-ohci.c
+++ b/drivers/firewire/fw-ohci.c
@@ -2570,6 +2570,14 @@ static int pci_resume(struct pci_dev *dev)
fw_error("pci_enable_device failed\n");
return err;
}
+ if (request_irq(dev->irq, irq_handler,
+ IRQF_SHARED, ohci_driver_name, ohci)) {
+ fw_error("Failed to allocate shared interrupt %d.\n",
+ dev->irq);
+ dma_free_coherent(ohci->card.device, CONFIG_ROM_SIZE,
+ ohci->config_rom, ohci->config_rom_bus);
+ return -EIO;
+ }
return ohci_enable(&ohci->card, NULL, 0);
}
And, hé presto, the error disappeared, and that's the only relevant diff
with a kernel without the patch.
Only after testing that did I notice that I had copied the call to
request_irq from ohci_enable, but that function is already getting called
immediately afterwards!
So it seems that the real problem is a timing issue and request_irq is
somehow being called too late during resume?
Could it be that the device is left in a half-active state (or that its
PCI config is saved while in a half-active state), resulting in IRQs
getting through before request_irq is executed in ohci_enable?
Note that I don't actually use firewire.
Note also that both with and without the error IRQ 19 is listed the same
in /proc/interrupts (and even with rather a high count for a device that
is not in use; this is shortly after a clean reboot + suspend/resume).
Cheers,
FJP
$ cat /proc/interrupts
CPU0 CPU1
0: 18744 10269 IO-APIC-edge timer
1: 115 41 IO-APIC-edge i8042
8: 1 0 IO-APIC-edge rtc0
9: 454 152 IO-APIC-fasteoi acpi
12: 342 139 IO-APIC-edge i8042
14: 4243 3517 IO-APIC-edge ata_piix
15: 0 0 IO-APIC-edge ata_piix
16: 46 11 IO-APIC-fasteoi uhci_hcd:usb1, i915@pci:0000:00:02.0
17: 1780 1583 IO-APIC-fasteoi uhci_hcd:usb3, HDA Intel
18: 2 2 IO-APIC-fasteoi ehci_hcd:usb2, uhci_hcd:usb7, yenta
19: 99968 33 IO-APIC-fasteoi ohci1394
20: 33 12 IO-APIC-fasteoi ehci_hcd:usb4, uhci_hcd:usb5, mmc0
22: 0 0 IO-APIC-fasteoi uhci_hcd:usb6
508: 1335 1039 PCI-MSI-edge iwlagn
NMI: 0 0 Non-maskable interrupts
LOC: 10382 14256 Local timer interrupts
RES: 10016 9596 Rescheduling interrupts
CAL: 173 36 Function call interrupts
TLB: 41 23 TLB shootdowns
TRM: 0 0 Thermal event interrupts
THR: 0 0 Threshold APIC interrupts
SPU: 0 0 Spurious interrupts
ERR: 1
MIS: 0
View attachment "2.6.28-rc7" of type "text/plain" (47736 bytes)
Powered by blists - more mailing lists