]> git.hungrycats.org Git - linux/commit
[ACPI] restore PCI Interrupt Link Devices upon resume
authorNathan Bryant <nbryant@optonline.net>
Wed, 4 Aug 2004 13:06:43 +0000 (09:06 -0400)
committerLen Brown <lenb@dhcppc3.>
Wed, 4 Aug 2004 13:06:43 +0000 (09:06 -0400)
commit06df808539357aa5b9c43684cf72eb9ea40496d6
tree5ec4dd985d5f60ef9738bf03bcb6f9a97d28568e
parentb34b79113f292ce1fd2e2a9cebfb4549cd7b567e
[ACPI] restore PCI Interrupt Link Devices upon resume

* register as as a sys_device so that we can get resume callbacks and restore
  interrupt routing state.
* add acpi_pci_link_resume(), which will be called when resuming from a suspend
  state that needs IRQ routing to be restored. This fixes issues reported on
  the mailing lists, e.g.:
http://marc.theaimsgroup.com/?l=acpi4linux&m=109142999328643&w=2
* rename setonboot --> initialized
* change to test acpi_noirq in init

We want to initialize everything on S3 resume in case the BIOS points an
interrupt link somewhere we didn't expect. (Doing so avoids "missing interrupt"
or "irq x: nobody cared" problems.) According to Len, past experience has shown
that it's a good idea to initialize only devices that exist or were explicitly
asked for, so we try to initialize only the IRQ's that were previously
initialized at some point before suspend, by checking the "initialized" flag.
This corresponds to links that have PCI devices attached.  Everything else, we
leave alone. Assuming the BIOS does the same thing on resume that it did on
boot, this will leave all the unused links in the same state that they were on
boot.

We are registered as a sysdev in order to do this work fairly early during
resume, before devices are resumed; some devices may not call
pci_device_enable.

Previous "setonboot once" behavior is left in place, to be conservative.
drivers/acpi/pci_link.c