aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorBob Moore <robert.moore@intel.com>2008-06-10 02:16:47 -0400
committerAndi Kleen <andi@basil.nowhere.org>2008-07-16 17:27:04 -0400
commitd0e184abc5983281ef189db2c759d65d56eb1b80 (patch)
tree48ec8b44dcfec1e5c537997f115b21c887da1e52 /drivers/acpi
parentb25d2a470bc9ffef4c34248952d914bd6fc0fcf6 (diff)
ACPICA: Workaround for reversed _PRT entries from BIOS
Some BIOSs erroneously reverse the _PRT SourceName and the SourceIndex. Detect and repair this problem. MS ACPI also allows and repairs this problem, thus ACPICA must also. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> Signed-off-by: Andi Kleen <ak@linux.intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/resources/rscreate.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/acpi/resources/rscreate.c b/drivers/acpi/resources/rscreate.c
index faddaee1bc07..70c84ece87f1 100644
--- a/drivers/acpi/resources/rscreate.c
+++ b/drivers/acpi/resources/rscreate.c
@@ -285,6 +285,23 @@ acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object,
285 } 285 }
286 286
287 /* 287 /*
288 * If the BIOS has erroneously reversed the _PRT source_name (index 2)
289 * and the source_index (index 3), fix it. _PRT is important enough to
290 * workaround this BIOS error. This also provides compatibility with
291 * other ACPI implementations.
292 */
293 obj_desc = sub_object_list[3];
294 if (!obj_desc
295 || (ACPI_GET_OBJECT_TYPE(obj_desc) != ACPI_TYPE_INTEGER)) {
296 sub_object_list[3] = sub_object_list[2];
297 sub_object_list[2] = obj_desc;
298
299 ACPI_WARNING((AE_INFO,
300 "(PRT[%X].Source) SourceName and SourceIndex are reversed, fixed",
301 index));
302 }
303
304 /*
288 * 3) Third subobject: Dereference the PRT.source_name 305 * 3) Third subobject: Dereference the PRT.source_name
289 * The name may be unresolved (slack mode), so allow a null object 306 * The name may be unresolved (slack mode), so allow a null object
290 */ 307 */