summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2019-06-08 12:25:20 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2019-06-08 12:25:20 +0000
commitf0a0571c1eecaba28b51613f55d7283592003f15 (patch)
tree32dd1d954be3c295b9ad6d7a68cd9821813b766d /sys/dev
parentdc8cb236a9e108970d525cc77be40a5f86ecdd37 (diff)
When establishing the mapping between ACPI device nodes and PCI devices,
skip PCI host bridges and devices that aren't there. ok patrick@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/acpi/acpi.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/acpi/acpi.c b/sys/dev/acpi/acpi.c
index eedad9c1914..37da92c91e6 100644
--- a/sys/dev/acpi/acpi.c
+++ b/sys/dev/acpi/acpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi.c,v 1.368 2019/06/07 15:40:41 kettenis Exp $ */
+/* $OpenBSD: acpi.c,v 1.369 2019/06/08 12:25:19 kettenis Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
* Copyright (c) 2005 Jordan Hargrave <jordan@openbsd.org>
@@ -574,8 +574,13 @@ acpi_getpci(struct aml_node *node, void *arg)
pci_chipset_tag_t pc;
pcitag_t tag;
uint64_t val;
+ int64_t sta;
uint32_t reg;
+ sta = acpi_getsta(sc, node);
+ if ((sta & STA_PRESENT) == 0)
+ return 0;
+
if (!node->value || node->value->type != AML_OBJTYPE_DEVICE)
return 0;
if (!aml_evalhid(node, &res)) {