Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Dec 2019 06:22:28 +0000 (UTC)
From:      Conrad Meyer <cem@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r355876 - head/sys/dev/acpica
Message-ID:  <201912180622.xBI6MSsZ058720@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: cem
Date: Wed Dec 18 06:22:28 2019
New Revision: 355876
URL: https://svnweb.freebsd.org/changeset/base/355876

Log:
  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

Modified:
  head/sys/dev/acpica/acpi.c

Modified: head/sys/dev/acpica/acpi.c
==============================================================================
--- head/sys/dev/acpica/acpi.c	Wed Dec 18 02:29:27 2019	(r355875)
+++ head/sys/dev/acpica/acpi.c	Wed Dec 18 06:22:28 2019	(r355876)
@@ -884,11 +884,14 @@ acpi_child_pnpinfo_str_method(device_t cbdev, device_t
 	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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912180622.xBI6MSsZ058720>