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@
-/* $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>
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))