Re: "irq 11: nobody cared" after S3

Nathan Bryant
2004-08-03T01:27:50Z

[-- Attachment #1: Type: text/plain, Size: 585 bytes --]

Li, Shaohua wrote:

>I don't think your patch works, and even it works for your system, it
>will break other systems. The goal of 'setonboot' is to prevent setting
>LINK device's IRQ every time, which we added last year. Without it, many
>systems will break. IIRC, its goal is to resolve a bug in bugzilla. But
>currently I don't remember the exact bug number.
>
>
Thanks for the feedback. It works for my system--but only for devices
that call pci_device_enable(). Therefore I am currently reinstating the
"setonboot" flag and reworking the patch along the lines of the attached:

[-- Attachment #2: acpi-fixes.patch --]
[-- Type: text/x-patch, Size: 2202 bytes --]

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
# 2004/08/02 20:41:54-04:00 nbryant-p32f3XyCuykqcZcGjlUOXw@public.gmane.org
# [ACPI] drivers/acpi/pci_link.c: 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
#
# drivers/acpi/pci_link.c
# 2004/08/02 20:41:45-04:00 nbryant-p32f3XyCuykqcZcGjlUOXw@public.gmane.org +23 -0
# [ACPI] drivers/acpi/pci_link.c: 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
#
# BitKeeper/etc/ignore
# 2004/08/02 20:41:45-04:00 nbryant-p32f3XyCuykqcZcGjlUOXw@public.gmane.org +2 -0
# Added Module.symvers drivers/acpi/pci_link.c~ to the ignore list
#
diff -Nru a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c
--- a/drivers/acpi/pci_link.c 2004-08-02 21:23:19 -04:00
+++ b/drivers/acpi/pci_link.c 2004-08-02 21:23:19 -04:00
@@ -55,6 +55,7 @@
#define ACPI_PCI_LINK_MAX_POSSIBLE 16

static int acpi_pci_link_add (struct acpi_device *device);
+static int acpi_pci_link_resume (struct acpi_device *device, int state);
static int acpi_pci_link_remove (struct acpi_device *device, int type);

static struct acpi_driver acpi_pci_link_driver = {
@@ -64,6 +65,7 @@
.ops = {
.add = acpi_pci_link_add,
.remove = acpi_pci_link_remove,
+ .resume = acpi_pci_link_resume,
},
};

@@ -691,6 +693,27 @@
kfree(link);

return_VALUE(result);
+}
+
+
+static int
+acpi_pci_link_resume (
+ struct acpi_device *device,
+ int state)
+{
+ struct acpi_pci_link *link = NULL;
+
+ ACPI_FUNCTION_TRACE("acpi_pci_link_resume");
+
+ if (!device || !acpi_driver_data(device))
+ return_VALUE(-EINVAL);
+
+ link = (struct acpi_pci_link *) acpi_driver_data(device);
+
+ if (link->irq.active && link->irq.setonboot)
+ return_VALUE(acpi_pci_link_set(link, link->irq.active));
+ else
+ return_VALUE(0);
}