Jeremy Cline 7452c29
From 1e494dc5f3140005ff1f17bc06c0c16d6d50d580 Mon Sep 17 00:00:00 2001
fa3b85b
From: Mark Salter <msalter@redhat.com>
fa3b85b
Date: Thu, 19 Apr 2018 23:29:47 -0400
Jeremy Cline 7452c29
Subject: [PATCH] ACPI / scan: Fix regression related to X-Gene UARTs
fa3b85b
fa3b85b
Commit e361d1f85855 ("ACPI / scan: Fix enumeration for special UART
fa3b85b
devices") caused a regression with some X-Gene based platforms (Mustang
fa3b85b
and M400) with invalid DSDT. The DSDT makes it appear that the UART
fa3b85b
device is also a slave device attached to itself. With the above commit
fa3b85b
the UART won't be enumerated by ACPI scan (slave serial devices shouldn't
fa3b85b
be). So check for X-Gene UART device and skip slace device check on it.
fa3b85b
fa3b85b
Signed-off-by: Mark Salter <msalter@redhat.com>
fa3b85b
---
fa3b85b
 drivers/acpi/scan.c | 8 ++++++++
fa3b85b
 1 file changed, 8 insertions(+)
fa3b85b
fa3b85b
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
Jeremy Cline 7452c29
index e1b6231cfa1c..542dafac4306 100644
fa3b85b
--- a/drivers/acpi/scan.c
fa3b85b
+++ b/drivers/acpi/scan.c
Jeremy Cline 7452c29
@@ -1567,6 +1567,14 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device)
Jeremy Cline 7452c29
 	if (!acpi_match_device_ids(device, i2c_multi_instantiate_ids))
Jeremy Cline 7452c29
 		return false;
fa3b85b
 
fa3b85b
+	/*
fa3b85b
+	 * Firmware on some arm64 X-Gene platforms will make the UART
fa3b85b
+	 * device appear as both a UART and a slave of that UART. Just
fa3b85b
+	 * bail out here for X-Gene UARTs.
fa3b85b
+	 */
fa3b85b
+	if (!strcmp(acpi_device_hid(device), "APMC0D08"))
fa3b85b
+		return false;
fa3b85b
+
fa3b85b
 	INIT_LIST_HEAD(&resource_list);
fa3b85b
 	acpi_dev_get_resources(device, &resource_list,
fa3b85b
 			       acpi_check_serial_bus_slave,
Jeremy Cline 7452c29
-- 
Jeremy Cline 7452c29
2.17.1
Jeremy Cline 7452c29