Re: [3/5] 2.6.21-rc4: known regressions (v2)

Thomas Meyer
2007-03-24T20:33:13Z

Eric W. Biederman schrieb:
>
> Odd. I would have thought the oops happened in the first resume, not
> the second.
>
> Hmm. It may have something to do with the ``managed'' driver
> aspect of this as well..
>
No. I don't think so. The problem is caused by this sequence: (the info
is always before entry of a function and before the exit of a function):

1.) Normal boot
[kernel] ahci 0000:00:1f.2: version 2.1
[kernel] pci_enable_device: dev= c1a59000
[kernel] pci_enable_device: irq= 0
[kernel] pci_enable_device: msi_enabled= 0
[kernel] PCI: Enabling device 0000:00:1f.2 (0005 -> 0007)
[kernel] ACPI: PCI Interrupt 0000:00:1f.2[B] -> GSI 19 (level, low) ->
IRQ 19
[kernel] pci_enable_device: dev= c1a59000
[kernel] pci_enable_device: irq= 19
[kernel] pci_enable_device: msi_enabled= 0

2.) msi irq 218 gets assigned

3) First suspend to disk. Consists of
3a) Suspend devices
[kernel] ahci 0000:00:1f.2: freeze
[kernel] pci_disable_device: dev= c1a59000
[kernel] pci_disable_device: irq= 218
[kernel] pci_disable_device: msi_enabled= 1
[kernel] ACPI: PCI interrupt for device 0000:00:1f.2 disabled
[kernel] pci_disable_device: dev= c1a59000
[kernel] pci_disable_device: irq= 218
[kernel] pci_disable_device: msi_enabled= 1

3b) Disable non-boot cpus
3c) Snapshot memory
3d) Enable non-boot cpus
3e) Resume devices (after snapshot!)
[kernel] ahci 0000:00:1f.2: resuming
[kernel] PM: Writing back config space on device 0000:00:1f.2 at offset
1 (was 2b00403, writing 2b00407)
[kernel] pci_enable_device: dev= c1a59000
[kernel] pci_enable_device: irq= 218
[kernel] pci_enable_device: msi_enabled= 1
[kernel] ACPI: PCI Interrupt 0000:00:1f.2[B] -> GSI 19 (level, low) ->
IRQ 19
[kernel] pci_enable_device: dev= c1a59000
[kernel] pci_enable_device: irq= 19
[kernel] pci_enable_device: msi_enabled= 1

3f) Write memory image
3g) Power down + reboot

4a) Normal start and restore memory image
4b) Enable non-boot cpus
4c) Resume devices
[kernel] ahci 0000:00:1f.2: resuming
[kernel] PM: Writing back config space on device 0000:00:1f.2 at offset
1 (was 2b00403, writing 2b00407)
[kernel] pci_enable_device: dev= c1a59000
[kernel] pci_enable_device: irq= 218
[kernel] pci_enable_device: msi_enabled= 1
[kernel] ACPI: PCI Interrupt 0000:00:1f.2[B] -> GSI 19 (level, low) ->
IRQ 19
[kernel] pci_enable_device: dev= c1a59000
[kernel] pci_enable_device: irq= 19
[kernel] pci_enable_device: msi_enabled= 1
Now the system is running with irq=19 and msi enabled=1. So let's
suspend again:

5) Second suspend to disk consists of
5a) Suspend devices
[kernel] ahci 0000:00:1f.2: freeze
[kernel] pci_disable_device: dev= c1a59000
[kernel] pci_disable_device: irq= 19
[kernel] pci_disable_device: msi_enabled= 1
[kernel] ACPI: PCI interrupt for device 0000:00:1f.2 disabled
[kernel] pci_disable_device: dev= c1a59000
[kernel] pci_disable_device: irq= 19
[kernel] pci_disable_device: msi_enabled= 1

5b) Disable non-boot cpus
5c) Snapshot memory
5d) Enable non-boot cpus
5e) Resume devices
[kernel] pci_enable_device: dev= c1a59000
[kernel] pci_enable_device: irq= 19
[kernel] pci_enable_device: msi_enabled= 1

-> OOPS in restore_msi because it tries to access msi structure for irq
19 and not 218.

So i guess this has nothing to do with the managed pci functions?