Bug 12257
Description
Rafael J. Wysocki
2008-12-19 14:10:13 UTC
Created attachment 19383 [details]
ACPI: PCI Interrupt Links -- disable when unused
With this patch applied, the box resumes from suspend to RAM (unless it's been booted with 'noapic', in which case it doesn't resume), but after the resume some PCI devices don't work (most noticeably Ethernet, USB, wireless)
Created attachment 19384 [details]
Output of 'lspci -vv' from Asus L5D
Created attachment 19385 [details]
Output of 'acpidump' from Asus L5D
Created attachment 19386 [details]
Boot log from Asus L5D (without 'noapic')
Created attachment 19387 [details]
/proc/interrupts from Asus L5D (booted without 'noapic'
Created attachment 19388 [details]
dmesg log from Asus L5D containing one suspend-resume cycle
Created attachment 19389 [details]
Boot log from Asus L5D (with 'noapic')
Created attachment 19390 [details]
/proc/interrupts from Asus L5D (booted with 'noapic')
Created attachment 19391 [details]
Debug patch for ACPI pci_link
Created attachment 19392 [details]
dmesg log from Asus L5D containing one suspend-resume cycle
The previous suspend log was from a wrong kernel. Also, this one contains debug information generated by the patch from the previous comment.
Additional information: If skge, ohci-hcd and ehci-hcd are unloaded before suspend and reloaded after the subsequent resume, everything works. If these modules are loaded during suspend, eth0 and USB don't work after the resume (in that case unloading and reloading skge doesn't bright eth0 to life). This appears to be 100% reproducible. Interestingly enough, skge, ohci_hcd, ehci_hcd don't free IRQs on suspend. However, making them do that doesn't seem to help. Created attachment 19410 [details]
skge suspend patch
In particular, I did a suspend-resume cycle with the attached patch making skge free IRQ during suspend. Both ohci_hcd and ehci_hcd were unloaded before suspend.
skge didn't work after the resume and the audio adapter, which _doesn't_ share the interrupt with the skge, didn't work either. Moreover, unloading and reloading skge after the resume didn't help.
FWIW, booting with acpi_sleep=old_ordering doesn't change anything. Interrupts are not properly configured on this box, even before suspend/resume is attempted. Device assignment to IRQ is identical in PIC and IOAPIC mode, and in IOAPIC mode, interrupts that are shared are configured as IO-APIC-edge 9: 27 IO-APIC-edge acpi, yenta Further, the existence of this interrupt: 2: 0 XT-PIC-XT cascade suggests that MPS is configuring interrupts rather than ACPI. Please attach the .config Created attachment 19434 [details]
.config for Asus L5D
Created attachment 19438 [details]
config that works on compaq presario r3000 nforce3
Created attachment 19440 [details]
Boot log from Asus L5D (without 'noapic' and with 'acpi.debug_layer=0x400000')
Clarification: Comment #11 doesn't apply to the kernel booted with 'noapic' (ie. with 'noapic' resume doesn't work no matter what). Created attachment 19446 [details]
patch vs 2.6.28-rc9 to use PIC mode on systems such as the Asus L5D
This patch should give the same results as if the Asus L5D
were booted with "noapic" using previous kernels.
ie. the MPS Table information for the IOAPIC
should be ignored, and the system should register
IRQS in XT-PIC mode, consistent with how ACPI is
configuring the Interrupt Links.
Of course this fixes only the 1st layer of the onion --
getting the Asus L5D booted into a sane and consistent
interrupt configuration.
Assuming this works, the next layer of the onion shall
be to poke at the clue above that the resume failure is
interrupt related, and perhaps interrupt link related.
Please compare a patched kernel vs an older kernel booted
with "noapic" and report any dmesg and /proc/interrupts differences.
Created attachment 19454 [details] Boot log from Asus L5D with acpi=noirq When booted with acpi=noirq, the contents of /proc/interrupts looks the same as in attachment #19387 [details]. However, resume from suspend to RAM doesn't work at all in this configuration. With the patch from comment #20 applied, the kernel behaves like with 'noapic'. Created attachment 19460 [details]
patch vs 2.6.28-rc9 to add irqrouter_suspend()
Please apply this patch on top of Linus' tree,
in addition to the patch in commend #20.
This patch will disable all Links on suspend,
and will disable any unreferenced links on resume.
Resume doesn't work with these two patches applied. It seems to me that on this box we have to restore the IOAPIC registers during resume for things to work. note that patch in comment #20 shipped in 2.6.28-git14 (2.6.29-rc1) patch in comment #23 looks correct, but needs a customer, and this box doesn't appear to be it... |