aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/nsrepair.c
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2015-12-29 13:58:02 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2016-01-01 03:47:36 +0100
commitee387409ca7d74d83a26915a367bf9b033e29803 (patch)
tree4c70b5b8e074bcb45d4f81006684360cb79659dd /drivers/acpi/acpica/nsrepair.c
parentACPICA: Namespace: Add scope information to the simple object repair mechanism (diff)
downloadlinux-dev-ee387409ca7d74d83a26915a367bf9b033e29803.tar.xz
linux-dev-ee387409ca7d74d83a26915a367bf9b033e29803.zip
ACPICA: Namespace: Add String -> ObjectReference conversion support
ACPICA commit 80e60d72959bb51c5d08c8500d978607a42ed81d BIOS developers may accidently put the quotes around the name strings, which converts the object references in the packages indicated by the name strings into the data objects (strings). Such kind of error has been seen in _DEP control methods on some platforms. This patch implements a workaround to correct it. Reported by Bastien Nocera. Fixed by Lv Zheng. Link: https://github.com/acpica/acpica/commit/80e60d72 Reference: https://bugzilla.kernel.org/show_bug.cgi?id=106231 Reported-and-tested-by: Bastien Nocera <bugzilla@hadess.net> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpica/nsrepair.c')
-rw-r--r--drivers/acpi/acpica/nsrepair.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/acpi/acpica/nsrepair.c b/drivers/acpi/acpica/nsrepair.c
index 4b7dbff66a14..6418863f93d5 100644
--- a/drivers/acpi/acpica/nsrepair.c
+++ b/drivers/acpi/acpica/nsrepair.c
@@ -116,6 +116,11 @@ static const struct acpi_simple_repair_info acpi_object_repair_info[] = {
ACPI_NOT_PACKAGE_ELEMENT,
acpi_ns_convert_to_resource},
+ /* Object reference conversions */
+
+ {"_DEP", ACPI_RTYPE_STRING, ACPI_ALL_PACKAGE_ELEMENTS,
+ acpi_ns_convert_to_reference},
+
/* Unicode conversions */
{"_MLS", ACPI_RTYPE_STRING, 1,
@@ -360,7 +365,9 @@ static const struct acpi_simple_repair_info *acpi_ns_match_simple_repair(struct
/* Check if we can actually repair this name/type combination */
if ((return_btype & this_name->unexpected_btypes) &&
- (package_index == this_name->package_index)) {
+ (this_name->package_index ==
+ ACPI_ALL_PACKAGE_ELEMENTS
+ || package_index == this_name->package_index)) {
return (this_name);
}