Commit 697a2d63 authored by Linus Torvalds's avatar Linus Torvalds

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.
parent 4ceb5db9
...@@ -776,15 +776,25 @@ acpi_pci_link_add ( ...@@ -776,15 +776,25 @@ acpi_pci_link_add (
} }
static int static int
irqrouter_suspend( acpi_pci_link_resume(
struct sys_device *dev, struct acpi_pci_link *link)
u32 state) {
ACPI_FUNCTION_TRACE("acpi_pci_link_resume");
if (link->refcnt && link->irq.active && link->irq.initialized)
return_VALUE(acpi_pci_link_set(link, link->irq.active));
else
return_VALUE(0);
}
static int
irqrouter_resume(
struct sys_device *dev)
{ {
struct list_head *node = NULL; struct list_head *node = NULL;
struct acpi_pci_link *link = NULL; struct acpi_pci_link *link = NULL;
int ret = 0;
ACPI_FUNCTION_TRACE("irqrouter_suspend"); ACPI_FUNCTION_TRACE("irqrouter_resume");
list_for_each(node, &acpi_link.entries) { list_for_each(node, &acpi_link.entries) {
link = list_entry(node, struct acpi_pci_link, node); link = list_entry(node, struct acpi_pci_link, node);
...@@ -793,21 +803,9 @@ irqrouter_suspend( ...@@ -793,21 +803,9 @@ irqrouter_suspend(
"Invalid link context\n")); "Invalid link context\n"));
continue; continue;
} }
if (link->irq.initialized && link->refcnt != 0 acpi_pci_link_resume(link);
/* We ignore legacy IDE device irq */
&& link->irq.active != 14 && link->irq.active !=15) {
printk(KERN_WARNING PREFIX
"%d drivers with interrupt %d neglected to call"
" pci_disable_device at .suspend\n",
link->refcnt,
link->irq.active);
printk(KERN_WARNING PREFIX
"Fix the driver, or rmmod before suspend\n");
link->refcnt = 0;
ret = -EINVAL;
}
} }
return_VALUE(ret); return_VALUE(0);
} }
...@@ -922,7 +920,7 @@ __setup("acpi_irq_balance", acpi_irq_balance_set); ...@@ -922,7 +920,7 @@ __setup("acpi_irq_balance", acpi_irq_balance_set);
/* FIXME: we will remove this interface after all drivers call pci_disable_device */ /* FIXME: we will remove this interface after all drivers call pci_disable_device */
static struct sysdev_class irqrouter_sysdev_class = { static struct sysdev_class irqrouter_sysdev_class = {
set_kset_name("irqrouter"), set_kset_name("irqrouter"),
.suspend = irqrouter_suspend, .resume = irqrouter_resume,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment