181211f
From patchwork Fri Apr 20 03:29:47 2018
181211f
Content-Type: text/plain; charset="utf-8"
181211f
MIME-Version: 1.0
181211f
Content-Transfer-Encoding: 7bit
181211f
Subject: ACPI / scan: Fix regression related to X-Gene UARTs
181211f
From: Mark Salter <msalter@redhat.com>
181211f
X-Patchwork-Id: 10351797
181211f
Message-Id: <20180420032947.23023-1-msalter@redhat.com>
181211f
To: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Danis?= <frederic.danis.oss@gmail.com>
181211f
Cc: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
181211f
 linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
181211f
Date: Thu, 19 Apr 2018 23:29:47 -0400
181211f
181211f
Commit e361d1f85855 ("ACPI / scan: Fix enumeration for special UART
181211f
devices") caused a regression with some X-Gene based platforms (Mustang
181211f
and M400) with invalid DSDT. The DSDT makes it appear that the UART
181211f
device is also a slave device attached to itself. With the above commit
181211f
the UART won't be enumerated by ACPI scan (slave serial devices shouldn't
181211f
be). So check for X-Gene UART device and skip slace device check on it.
181211f
181211f
Signed-off-by: Mark Salter <msalter@redhat.com>
181211f
---
181211f
 drivers/acpi/scan.c | 8 ++++++++
181211f
 1 file changed, 8 insertions(+)
181211f
181211f
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
181211f
index cc234e6a6297..1dcdd0122862 100644
181211f
--- a/drivers/acpi/scan.c
181211f
+++ b/drivers/acpi/scan.c
181211f
@@ -1551,6 +1551,14 @@ static bool acpi_device_enumeration_by_parent(struct acpi_device *device)
181211f
 	     fwnode_property_present(&device->fwnode, "baud")))
181211f
 		return true;
181211f
 
181211f
+	/*
181211f
+	 * Firmware on some arm64 X-Gene platforms will make the UART
181211f
+	 * device appear as both a UART and a slave of that UART. Just
181211f
+	 * bail out here for X-Gene UARTs.
181211f
+	 */
181211f
+	if (!strcmp(acpi_device_hid(device), "APMC0D08"))
181211f
+		return false;
181211f
+
181211f
 	INIT_LIST_HEAD(&resource_list);
181211f
 	acpi_dev_get_resources(device, &resource_list,
181211f
 			       acpi_check_serial_bus_slave,