Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

David Shaohua Li and committed by
Len Brown
362b06bb 5ae947ec

+14 -22
+14 -22
drivers/acpi/pci_link.c
··· 72 72 u8 active; /* Current IRQ */ 73 73 u8 edge_level; /* All IRQs */ 74 74 u8 active_high_low; /* All IRQs */ 75 - u8 initialized; 76 75 u8 resource_type; 77 76 u8 possible_count; 78 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 81 83 struct acpi_pci_link { ··· 532 530 533 531 ACPI_FUNCTION_TRACE("acpi_pci_link_allocate"); 534 532 533 + if (link->irq.suspend_resume) { 534 + acpi_pci_link_set(link, link->irq.active); 535 + link->irq.suspend_resume = 0; 536 + } 535 537 if (link->irq.initialized) 536 538 return_VALUE(0); 537 539 ··· 719 713 return_VALUE(result); 720 714 } 721 715 722 - 723 716 static int 724 - acpi_pci_link_resume ( 725 - struct acpi_pci_link *link) 726 - { 727 - ACPI_FUNCTION_TRACE("acpi_pci_link_resume"); 728 - 729 - if (link->irq.active && link->irq.initialized) 730 - return_VALUE(acpi_pci_link_set(link, link->irq.active)); 731 - else 732 - return_VALUE(0); 733 - } 734 - 735 - 736 - static int 737 - irqrouter_resume( 738 - struct sys_device *dev) 717 + irqrouter_suspend( 718 + struct sys_device *dev, 719 + u32 state) 739 720 { 740 721 struct list_head *node = NULL; 741 722 struct acpi_pci_link *link = NULL; 742 723 743 - ACPI_FUNCTION_TRACE("irqrouter_resume"); 724 + ACPI_FUNCTION_TRACE("irqrouter_suspend"); 744 725 745 726 list_for_each(node, &acpi_link.entries) { 746 - 747 727 link = list_entry(node, struct acpi_pci_link, node); 748 728 if (!link) { 749 729 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid link context\n")); 750 730 continue; 751 731 } 752 - 753 - acpi_pci_link_resume(link); 732 + if (link->irq.active && link->irq.initialized) 733 + link->irq.suspend_resume = 1; 754 734 } 755 735 return_VALUE(0); 756 736 } ··· 848 856 849 857 static struct sysdev_class irqrouter_sysdev_class = { 850 858 set_kset_name("irqrouter"), 851 - .resume = irqrouter_resume, 859 + .suspend = irqrouter_suspend, 852 860 }; 853 861 854 862