From owner-dev-commits-src-branches@freebsd.org Fri Dec 25 18:25:49 2020 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4554C4C787F; Fri, 25 Dec 2020 18:25:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D2b3d12skz3lLt; Fri, 25 Dec 2020 18:25:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 16B7426B65; Fri, 25 Dec 2020 18:25:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 0BPIPn87091297; Fri, 25 Dec 2020 18:25:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 0BPIPntO091296; Fri, 25 Dec 2020 18:25:49 GMT (envelope-from git) Date: Fri, 25 Dec 2020 18:25:49 GMT Message-Id: <202012251825.0BPIPntO091296@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Vladimir Kondratyev Subject: git: 162b82dfa0cb - MFC r355876 (by cem): MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wulf X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 162b82dfa0cbc4a744f13559ac0574ae7dc9f663 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Commit messages for the stable branches of the src repository." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Dec 2020 18:25:49 -0000 The branch stable/12 has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=162b82dfa0cbc4a744f13559ac0574ae7dc9f663 commit 162b82dfa0cbc4a744f13559ac0574ae7dc9f663 Author: Conrad Meyer AuthorDate: 2019-12-18 06:22:28 +0000 Commit: Vladimir Kondratyev CommitDate: 2020-12-25 18:22:57 +0000 MFC r355876 (by cem): acpi(4): Add _CID to PNP info string While a given ACPI device may have 0-N compatibility IDs, in practice most seem to have 0 or 1. If one is present, emit it as part of the PNP info string associated with a device. This could enable MODULE_PNP_INFO-based automatic kldload for ACPI drivers associated with a given _CID (but without a good _HID or _UID identifier). Reviewed by: imp, jhb Differential Revision: https://reviews.freebsd.org/D22846 (cherry picked from commit 359a5f96a1685f6779e7ddbe5daafd67e73a066e) --- sys/dev/acpica/acpi.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index a0b9a19f6090..6d7ed154c463 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -885,11 +885,14 @@ acpi_pnpinfo_str(ACPI_HANDLE handle, char *buf, size_t buflen) return (0); } - snprintf(buf, buflen, "_HID=%s _UID=%lu", + snprintf(buf, buflen, "_HID=%s _UID=%lu _CID=%s", (adinfo->Valid & ACPI_VALID_HID) ? adinfo->HardwareId.String : "none", (adinfo->Valid & ACPI_VALID_UID) ? - strtoul(adinfo->UniqueId.String, NULL, 10) : 0UL); + strtoul(adinfo->UniqueId.String, NULL, 10) : 0UL, + ((adinfo->Valid & ACPI_VALID_CID) && + adinfo->CompatibleIdList.Count > 0) ? + adinfo->CompatibleIdList.Ids[0].String : "none"); AcpiOsFree(adinfo); return (0);