jingni / rpms / kernel

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