Date: Mon, 26 Feb 2018 08:45:38 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330016 - head/sys/dev/uart Message-ID: <201802260845.w1Q8jc3E087182@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andrew Date: Mon Feb 26 08:45:38 2018 New Revision: 330016 URL: https://svnweb.freebsd.org/changeset/base/330016 Log: Check all entries in the ACPI uart compat table and not just the first. Sponsored by: DARPA, AFRL Modified: head/sys/dev/uart/uart_cpu_arm64.c Modified: head/sys/dev/uart/uart_cpu_arm64.c ============================================================================== --- head/sys/dev/uart/uart_cpu_arm64.c Mon Feb 26 08:00:01 2018 (r330015) +++ head/sys/dev/uart/uart_cpu_arm64.c Mon Feb 26 08:45:38 2018 (r330016) @@ -83,16 +83,23 @@ uart_cpu_eqres(struct uart_bas *b1, struct uart_bas *b static struct acpi_uart_compat_data * uart_cpu_acpi_scan(uint8_t interface_type) { - struct acpi_uart_compat_data **cd; + struct acpi_uart_compat_data **cd, *curcd; + int i; SET_FOREACH(cd, uart_acpi_class_and_device_set) { - if ((*cd)->port_subtype == interface_type) - return (*cd); + curcd = *cd; + for (i = 0; curcd[i].hid != NULL; i++) { + if (curcd[i].port_subtype == interface_type) + return (&curcd[i]); + } } SET_FOREACH(cd, uart_acpi_class_set) { - if ((*cd)->port_subtype == interface_type) - return (*cd); + curcd = *cd; + for (i = 0; curcd[i].hid != NULL; i++) { + if (curcd[i].port_subtype == interface_type) + return (&curcd[i]); + } } return (NULL);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802260845.w1Q8jc3E087182>