aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shaohua Li <shaohua.li@intel.com>2005-03-18 16:30:29 -0500
committerLen Brown <len.brown@intel.com>2005-07-11 23:22:52 -0400
commit362b06bb70b5a5779b2e852e0f2bdb437061106e (patch)
tree67544336a5fbef1207f564e8d619ce7fb4b11f5f
parent5ae947ecc9c1c23834201e5321684a5cb68bdd3f (diff)
[ACPI] S3 Suspend to RAM: interrupt resume fix
Delete PCI Interrupt Link Device .resume method -- it is the device driver's job to request interrupts, not the Link's job to remember what the devices want. This addresses the issue of attempting to run the ACPI interpreter too early in resume, when interrupts are still disabled. http://bugzilla.kernel.org/show_bug.cgi?id=3469 Signed-off-by: David Shaohua Li <shaohua.li@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r--drivers/acpi/pci_link.c36
1 files changed, 14 insertions, 22 deletions
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
index 520b28ad0740..f2271173bbd5 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -72,10 +72,12 @@ struct acpi_pci_link_irq {
72 u8 active; /* Current IRQ */ 72 u8 active; /* Current IRQ */
73 u8 edge_level; /* All IRQs */ 73 u8 edge_level; /* All IRQs */
74 u8 active_high_low; /* All IRQs */ 74 u8 active_high_low; /* All IRQs */
75 u8 initialized;
76 u8 resource_type; 75 u8 resource_type;
77 u8 possible_count; 76 u8 possible_count;
78 u8 possible[ACPI_PCI_LINK_MAX_POSSIBLE]; 77 u8 possible[ACPI_PCI_LINK_MAX_POSSIBLE];
78 u8 initialized:1;
79 u8 suspend_resume:1;
80 u8 reserved:6;
79}; 81};
80 82
81struct acpi_pci_link { 83struct acpi_pci_link {
@@ -530,6 +532,10 @@ static int acpi_pci_link_allocate(
530 532
531 ACPI_FUNCTION_TRACE("acpi_pci_link_allocate"); 533 ACPI_FUNCTION_TRACE("acpi_pci_link_allocate");
532 534
535 if (link->irq.suspend_resume) {
536 acpi_pci_link_set(link, link->irq.active);
537 link->irq.suspend_resume = 0;
538 }
533 if (link->irq.initialized) 539 if (link->irq.initialized)
534 return_VALUE(0); 540 return_VALUE(0);
535 541
@@ -713,38 +719,24 @@ end:
713 return_VALUE(result); 719 return_VALUE(result);
714} 720}
715 721
716
717static int
718acpi_pci_link_resume (
719 struct acpi_pci_link *link)
720{
721 ACPI_FUNCTION_TRACE("acpi_pci_link_resume");
722
723 if (link->irq.active && link->irq.initialized)
724 return_VALUE(acpi_pci_link_set(link, link->irq.active));
725 else
726 return_VALUE(0);
727}
728
729
730static int 722static int
731irqrouter_resume( 723irqrouter_suspend(
732 struct sys_device *dev) 724 struct sys_device *dev,
725 u32 state)
733{ 726{
734 struct list_head *node = NULL; 727 struct list_head *node = NULL;
735 struct acpi_pci_link *link = NULL; 728 struct acpi_pci_link *link = NULL;
736 729
737 ACPI_FUNCTION_TRACE("irqrouter_resume"); 730 ACPI_FUNCTION_TRACE("irqrouter_suspend");
738 731
739 list_for_each(node, &acpi_link.entries) { 732 list_for_each(node, &acpi_link.entries) {
740
741 link = list_entry(node, struct acpi_pci_link, node); 733 link = list_entry(node, struct acpi_pci_link, node);
742 if (!link) { 734 if (!link) {
743 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid link context\n")); 735 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid link context\n"));
744 continue; 736 continue;
745 } 737 }
746 738 if (link->irq.active && link->irq.initialized)
747 acpi_pci_link_resume(link); 739 link->irq.suspend_resume = 1;
748 } 740 }
749 return_VALUE(0); 741 return_VALUE(0);
750} 742}
@@ -856,7 +848,7 @@ __setup("acpi_irq_balance", acpi_irq_balance_set);
856 848
857static struct sysdev_class irqrouter_sysdev_class = { 849static struct sysdev_class irqrouter_sysdev_class = {
858 set_kset_name("irqrouter"), 850 set_kset_name("irqrouter"),
859 .resume = irqrouter_resume, 851 .suspend = irqrouter_suspend,
860}; 852};
861 853
862 854