aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2013-03-23 15:16:37 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-03-23 20:00:38 -0400
commitf084dbb939070281be7c882db63a4a428c51fcf4 (patch)
treebfda012c8613e30ff2bd6e41255af7d3533b497e /drivers/platform
parenteccc534378e74030b31cfe10f1188df06f7f680a (diff)
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 <yinghai@kernel.org> Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/sony-laptop.c3
1 files changed, 2 insertions, 1 deletions
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,
4121 resource->res3.data.irq.sharable = ACPI_SHARED; 4121 resource->res3.data.irq.sharable = ACPI_SHARED;
4122 4122
4123 resource->res4.type = ACPI_RESOURCE_TYPE_END_TAG; 4123 resource->res4.type = ACPI_RESOURCE_TYPE_END_TAG;
4124 4124 resource->res4.length = sizeof(struct acpi_resource);
4125 } 4125 }
4126 /* setup Type 2/3 resources */ 4126 /* setup Type 2/3 resources */
4127 else { 4127 else {
@@ -4140,6 +4140,7 @@ static int sony_pic_enable(struct acpi_device *device,
4140 resource->res2.data.irq.sharable = ACPI_SHARED; 4140 resource->res2.data.irq.sharable = ACPI_SHARED;
4141 4141
4142 resource->res3.type = ACPI_RESOURCE_TYPE_END_TAG; 4142 resource->res3.type = ACPI_RESOURCE_TYPE_END_TAG;
4143 resource->res3.length = sizeof(struct acpi_resource);
4143 } 4144 }
4144 4145
4145 /* Attempt to set the resource */ 4146 /* Attempt to set the resource */