fanghuilin / rpms / kernel

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