From owner-svn-src-head@freebsd.org Mon Feb 26 08:45:39 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E977F35277; Mon, 26 Feb 2018 08:45:39 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D5F556A23F; Mon, 26 Feb 2018 08:45:38 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CCC63192D3; Mon, 26 Feb 2018 08:45:38 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w1Q8jcaB087183; Mon, 26 Feb 2018 08:45:38 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w1Q8jc3E087182; Mon, 26 Feb 2018 08:45:38 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201802260845.w1Q8jc3E087182@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 26 Feb 2018 08:45:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330016 - head/sys/dev/uart X-SVN-Group: head X-SVN-Commit-Author: andrew X-SVN-Commit-Paths: head/sys/dev/uart X-SVN-Commit-Revision: 330016 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Feb 2018 08:45:39 -0000 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);