diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2022-01-26 14:39:08 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2022-01-26 14:39:08 +0000 |
commit | 2f870c4905cb4fa4cc4eb8b75b06101dbd3e027c (patch) | |
tree | 0989b72401dc0bd5ba60d6eafe32b82a02f77dba /sys/dev/acpi | |
parent | fd191bcb799fb3d8b39aeb9c71b57424c0e71b59 (diff) |
An ACPI device needs to be both present and enabled for it to function.
So only attempt to attach hardware that has both bits enabled. This fixes
an issue where com(4) would attach for a disabled serial port leading to
misdetection of the hardware variant and a subsequent hang when /etc/rc
runs ttyflags -a.
ok anton@, deraadt@
Diffstat (limited to 'sys/dev/acpi')
-rw-r--r-- | sys/dev/acpi/acpi.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c index 65b53fbf6ba..dd0c4d1e847 100644 --- a/sys/dev/acpi/acpi.c +++ b/sys/dev/acpi/acpi.c @@ -1,4 +1,4 @@ -/* $OpenBSD: acpi.c,v 1.405 2022/01/12 11:18:30 patrick Exp $ */ +/* $OpenBSD: acpi.c,v 1.406 2022/01/26 14:39:07 kettenis Exp $ */ /* * Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com> * Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org> @@ -3321,7 +3321,7 @@ acpi_foundhid(struct aml_node *node, void *arg) return (0); sta = acpi_getsta(sc, node->parent); - if ((sta & STA_PRESENT) == 0) + if ((sta & (STA_PRESENT | STA_ENABLED)) != (STA_PRESENT | STA_ENABLED)) return (0); if (aml_evalinteger(sc, node->parent, "_CCA", 0, NULL, &cca)) |