]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 Mar 2014 16:54:36 +0000 (09:54 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 Mar 2014 16:54:36 +0000 (09:54 -0700)
added patches:
pnp-acpi-proper-handling-of-acpi-io-memory-resource-parsing-failures.patch

queue-3.10/pnp-acpi-proper-handling-of-acpi-io-memory-resource-parsing-failures.patch [new file with mode: 0644]
queue-3.10/series

diff --git a/queue-3.10/pnp-acpi-proper-handling-of-acpi-io-memory-resource-parsing-failures.patch b/queue-3.10/pnp-acpi-proper-handling-of-acpi-io-memory-resource-parsing-failures.patch
new file mode 100644 (file)
index 0000000..cb165d1
--- /dev/null
@@ -0,0 +1,70 @@
+From 89935315f192abf7068d0044cefc84f162c3c81f Mon Sep 17 00:00:00 2001
+From: Zhang Rui <rui.zhang@intel.com>
+Date: Tue, 11 Mar 2014 22:40:27 +0800
+Subject: PNP / ACPI: proper handling of ACPI IO/Memory resource parsing failures
+
+From: Zhang Rui <rui.zhang@intel.com>
+
+commit 89935315f192abf7068d0044cefc84f162c3c81f upstream.
+
+Before commit b355cee88e3b (ACPI / resources: ignore invalid ACPI
+device resources), if acpi_dev_resource_memory()/acpi_dev_resource_io()
+returns false, it means the the resource is not a memeory/IO resource.
+
+But after commit b355cee88e3b, those functions return false if the
+given memory/IO resource entry is invalid (the length of the resource
+is zero).
+
+This breaks pnpacpi_allocated_resource(), because it now recognizes
+the invalid memory/io resources as resources of unknown type.  Thus
+users see confusing warning messages on machines with zero length
+ACPI memory/IO resources.
+
+Fix the problem by rearranging pnpacpi_allocated_resource() so that
+it calls acpi_dev_resource_memory() for memory type and IO type
+resources only, respectively.
+
+Fixes: b355cee88e3b (ACPI / resources: ignore invalid ACPI device resources)
+Signed-off-by: Zhang Rui <rui.zhang@intel.com>
+Reported-and-tested-by: Markus Trippelsdorf <markus@trippelsdorf.de>
+Reported-and-tested-by: Julian Wollrath <jwollrath@web.de>
+Reported-and-tested-by: Paul Bolle <pebolle@tiscali.nl>
+[rjw: Changelog]
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/pnp/pnpacpi/rsparser.c |   15 ++++++++++++---
+ 1 file changed, 12 insertions(+), 3 deletions(-)
+
+--- a/drivers/pnp/pnpacpi/rsparser.c
++++ b/drivers/pnp/pnpacpi/rsparser.c
+@@ -183,9 +183,7 @@ static acpi_status pnpacpi_allocated_res
+       struct resource r;
+       int i, flags;
+-      if (acpi_dev_resource_memory(res, &r)
+-          || acpi_dev_resource_io(res, &r)
+-          || acpi_dev_resource_address_space(res, &r)
++      if (acpi_dev_resource_address_space(res, &r)
+           || acpi_dev_resource_ext_address_space(res, &r)) {
+               pnp_add_resource(dev, &r);
+               return AE_OK;
+@@ -217,6 +215,17 @@ static acpi_status pnpacpi_allocated_res
+       }
+       switch (res->type) {
++      case ACPI_RESOURCE_TYPE_MEMORY24:
++      case ACPI_RESOURCE_TYPE_MEMORY32:
++      case ACPI_RESOURCE_TYPE_FIXED_MEMORY32:
++              if (acpi_dev_resource_memory(res, &r))
++                      pnp_add_resource(dev, &r);
++              break;
++      case ACPI_RESOURCE_TYPE_IO:
++      case ACPI_RESOURCE_TYPE_FIXED_IO:
++              if (acpi_dev_resource_io(res, &r))
++                      pnp_add_resource(dev, &r);
++              break;
+       case ACPI_RESOURCE_TYPE_DMA:
+               dma = &res->data.dma;
+               if (dma->channel_count > 0 && dma->channels[0] != (u8) -1)
index 1c75866e34dcbf4451adcfc604f46fc887f32282..cbde6c52f1b44497edbd2ab7286e2a07c053b5ce 100644 (file)
@@ -84,3 +84,4 @@ arm-ignore-memory-below-phys_offset.patch
 iscsi-iser-target-use-list_del_init-for-i_conn_node.patch
 iscsi-iser-target-fix-isert_conn-state-hung-shutdown-issues.patch
 iser-target-fix-post_send_buf_count-for-rdma-read-write.patch
+pnp-acpi-proper-handling-of-acpi-io-memory-resource-parsing-failures.patch