Justin Vreeland 794d92
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
Justin Vreeland 794d92
From: Mark Salter <msalter@redhat.com>
Justin Vreeland 794d92
Date: Thu, 10 May 2018 17:38:44 -0400
Justin Vreeland 794d92
Subject: [PATCH] aarch64: acpi scan: Fix regression related to X-Gene UARTs
Justin Vreeland 794d92
Justin Vreeland 794d92
Message-id: <20180510173844.29580-4-msalter@redhat.com>
Justin Vreeland 794d92
Patchwork-id: 214381
Justin Vreeland 794d92
O-Subject: [RHEL-8 BZ1519554 3/3] aarch64: acpi scan: Fix regression related to X-Gene UARTs
Justin Vreeland 794d92
Bugzilla: 1519554
Justin Vreeland 794d92
RH-Acked-by: Al Stone <astone@redhat.com>
Justin Vreeland 794d92
RH-Acked-by: Tony Camuso <tcamuso@redhat.com>
Justin Vreeland 794d92
Justin Vreeland 794d92
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1519554
Justin Vreeland 794d92
Brew: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=16144520
Justin Vreeland 794d92
Justin Vreeland 794d92
Commit e361d1f85855 ("ACPI / scan: Fix enumeration for special UART
Justin Vreeland 794d92
devices") caused a regression with some X-Gene based platforms (Mustang
Justin Vreeland 794d92
and M400) with invalid DSDT. The DSDT makes it appear that the UART
Justin Vreeland 794d92
device is also a slave device attached to itself. With the above commit
Justin Vreeland 794d92
the UART won't be enumerated by ACPI scan (slave serial devices shouldn't
Justin Vreeland 794d92
be). So check for X-Gene UART device and skip slace device check on it.
Justin Vreeland 794d92
Justin Vreeland 794d92
Upstream Status: RHEL only
Justin Vreeland 794d92
Signed-off-by: Mark Salter <msalter@redhat.com>
Justin Vreeland 794d92
Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
Justin Vreeland 794d92
---
Justin Vreeland 794d92
 drivers/acpi/scan.c | 9 +++++++++
Justin Vreeland 794d92
 1 file changed, 9 insertions(+)
Justin Vreeland 794d92
Justin Vreeland 794d92
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
Justin Vreeland 794d92
index 2142f1554761..f5fdf6f3650c 100644
Justin Vreeland 794d92
--- a/drivers/acpi/scan.c
Justin Vreeland 794d92
+++ b/drivers/acpi/scan.c
Justin Vreeland 794d92
@@ -1574,6 +1574,15 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device)
Justin Vreeland 794d92
 	if (!acpi_match_device_ids(device, i2c_multi_instantiate_ids))
Justin Vreeland 794d92
 		return false;
Justin Vreeland 794d92
Justin Vreeland 794d92
+	/*
Justin Vreeland 794d92
+	 * Firmware on some arm64 X-Gene platforms will make the UART
Justin Vreeland 794d92
+	 * device appear as both a UART and a slave of that UART. Just
Justin Vreeland 794d92
+	 * bail out here for X-Gene UARTs.
Justin Vreeland 794d92
+	 */
Justin Vreeland 794d92
+	if (IS_ENABLED(CONFIG_ARM64) &&
Justin Vreeland 794d92
+	    !strcmp(acpi_device_hid(device), "APMC0D08"))
Justin Vreeland 794d92
+		return false;
Justin Vreeland 794d92
+
Justin Vreeland 794d92
 	INIT_LIST_HEAD(&resource_list);
Justin Vreeland 794d92
 	acpi_dev_get_resources(device, &resource_list,
Justin Vreeland 794d92
 			       acpi_check_serial_bus_slave,
Justin Vreeland 794d92
-- 
Justin Vreeland 794d92
2.28.0
Justin Vreeland 794d92