From f084dbb939070281be7c882db63a4a428c51fcf4 Mon Sep 17 00:00:00 2001 From: Yinghai Lu Date: Sat, 23 Mar 2013 19:16:37 +0000 Subject: ACPI: Set length even for TYPE_END_TAG acpi resource Found with a network device in QEMU/KVM guest not working anymore. Bisected to commit c13085e5 ACPICA: Resource Mgr: Prevent infinite loops in resource walks That commit will check acpi_resource length strictly which causes acpi_set_current_resources to return failure and IRQ for PCI devices is not set properly. Set length for all those TYPE_END_TAG acpi_resources. [rjw: Changelog] Bisected-by: Yinghai Lu Signed-off-by: Yinghai Lu Signed-off-by: Rafael J. Wysocki --- drivers/platform/x86/sony-laptop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/platform/x86') diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index 14d4dced1def..d544e3aaf761 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c @@ -4121,7 +4121,7 @@ static int sony_pic_enable(struct acpi_device *device, resource->res3.data.irq.sharable = ACPI_SHARED; resource->res4.type = ACPI_RESOURCE_TYPE_END_TAG; - + resource->res4.length = sizeof(struct acpi_resource); } /* setup Type 2/3 resources */ else { @@ -4140,6 +4140,7 @@ static int sony_pic_enable(struct acpi_device *device, resource->res2.data.irq.sharable = ACPI_SHARED; resource->res3.type = ACPI_RESOURCE_TYPE_END_TAG; + resource->res3.length = sizeof(struct acpi_resource); } /* Attempt to set the resource */ -- cgit v1.2.3