aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@evo.osdl.org>2005-08-01 15:37:54 -0400
committerLinus Torvalds <torvalds@evo.osdl.org>2005-08-01 15:37:54 -0400
commit697a2d63a3844caaa2b6565ab7f3d69086af94d4 (patch)
tree4ebfef965b37d4a7c56425521a26c960649594de
parent4ceb5db9757aaeadcf8fbbf97d76bd42aa4df0d6 (diff)
Revert ACPI interrupt resume changes
If there are devices that use interrupts over a suspend event, ACPI must restore the PCI interrupt links on resume. Anything else breaks any device that hasn't been converted to the new (dubious) PM rules. Drivers that need the irq free/re-aquire sequence can be done one by one independently of this one.
-rw-r--r--drivers/acpi/pci_link.c38
1 files changed, 18 insertions, 20 deletions
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index 6a29610edc11..d9a9b86ecb28 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -776,15 +776,25 @@ end:
776} 776}
777 777
778static int 778static int
779irqrouter_suspend( 779acpi_pci_link_resume(
780 struct sys_device *dev, 780 struct acpi_pci_link *link)
781 u32 state) 781{
782 ACPI_FUNCTION_TRACE("acpi_pci_link_resume");
783
784 if (link->refcnt && link->irq.active && link->irq.initialized)
785 return_VALUE(acpi_pci_link_set(link, link->irq.active));
786 else
787 return_VALUE(0);
788}
789
790static int
791irqrouter_resume(
792 struct sys_device *dev)
782{ 793{
783 struct list_head *node = NULL; 794 struct list_head *node = NULL;
784 struct acpi_pci_link *link = NULL; 795 struct acpi_pci_link *link = NULL;
785 int ret = 0;
786 796
787 ACPI_FUNCTION_TRACE("irqrouter_suspend"); 797 ACPI_FUNCTION_TRACE("irqrouter_resume");
788 798
789 list_for_each(node, &acpi_link.entries) { 799 list_for_each(node, &acpi_link.entries) {
790 link = list_entry(node, struct acpi_pci_link, node); 800 link = list_entry(node, struct acpi_pci_link, node);
@@ -793,21 +803,9 @@ irqrouter_suspend(
793 "Invalid link context\n")); 803 "Invalid link context\n"));
794 continue; 804 continue;
795 } 805 }
796 if (link->irq.initialized && link->refcnt != 0 806 acpi_pci_link_resume(link);
797 /* We ignore legacy IDE device irq */
798 && link->irq.active != 14 && link->irq.active !=15) {
799 printk(KERN_WARNING PREFIX
800 "%d drivers with interrupt %d neglected to call"
801 " pci_disable_device at .suspend\n",
802 link->refcnt,
803 link->irq.active);
804 printk(KERN_WARNING PREFIX
805 "Fix the driver, or rmmod before suspend\n");
806 link->refcnt = 0;
807 ret = -EINVAL;
808 }
809 } 807 }
810 return_VALUE(ret); 808 return_VALUE(0);
811} 809}
812 810
813 811
@@ -922,7 +920,7 @@ __setup("acpi_irq_balance", acpi_irq_balance_set);
922/* FIXME: we will remove this interface after all drivers call pci_disable_device */ 920/* FIXME: we will remove this interface after all drivers call pci_disable_device */
923static struct sysdev_class irqrouter_sysdev_class = { 921static struct sysdev_class irqrouter_sysdev_class = {
924 set_kset_name("irqrouter"), 922 set_kset_name("irqrouter"),
925 .suspend = irqrouter_suspend, 923 .resume = irqrouter_resume,
926}; 924};
927 925
928 926