Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 May 2019 08:30:04 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r348108 - head/sys/dev/acpica
Message-ID:  <201905220830.x4M8U46a089726@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Wed May 22 08:30:03 2019
New Revision: 348108
URL: https://svnweb.freebsd.org/changeset/base/348108

Log:
  acpi_hpet: restore support for timers defined only in HPET table
  
  This fixes a regress introduced in r339754.
  After that change the code required that there is a HPET device
  in the ACPI namespace.
  The problem has been noticed on an PC Engines apu2 system.
  
  While here, fix a small formatting issue.

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

Modified: head/sys/dev/acpica/acpi_hpet.c
==============================================================================
--- head/sys/dev/acpica/acpi_hpet.c	Wed May 22 07:41:58 2019	(r348107)
+++ head/sys/dev/acpica/acpi_hpet.c	Wed May 22 08:30:03 2019	(r348108)
@@ -455,9 +455,12 @@ hpet_probe(device_t dev)
 	ACPI_FUNCTION_TRACE((char *)(uintptr_t) __func__);
 	if (acpi_disabled("hpet") || acpi_hpet_disabled)
 		return (ENXIO);
-	rv = ACPI_ID_PROBE(device_get_parent(dev), dev, hpet_ids, NULL);
+	if (acpi_get_handle(dev) != NULL)
+		rv = ACPI_ID_PROBE(device_get_parent(dev), dev, hpet_ids, NULL);
+	else
+		rv = 0;
 	if (rv <= 0)
-	   device_set_desc(dev, "High Precision Event Timer");
+		device_set_desc(dev, "High Precision Event Timer");
 	return (rv);
 }
 



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