From f0a0571c1eecaba28b51613f55d7283592003f15 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sat, 8 Jun 2019 12:25:20 +0000 Subject: When establishing the mapping between ACPI device nodes and PCI devices, skip PCI host bridges and devices that aren't there. ok patrick@ --- sys/dev/acpi/acpi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 * Copyright (c) 2005 Jordan Hargrave @@ -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)) { -- cgit v1.2.3