summaryrefslogtreecommitdiff
path: root/sys/arch/i386/pci
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>2001-03-15 03:55:20 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>2001-03-15 03:55:20 +0000
commit6a467096b06d52bcf84b8621815327013df873e6 (patch)
tree022094dae25cb3dd127c2ff2ab50d642e3b603b5 /sys/arch/i386/pci
parent38e4143c006af251d03ecba3338faf534221fa51 (diff)
make sure pcibios ever attached; found by aaron@
Diffstat (limited to 'sys/arch/i386/pci')
-rw-r--r--sys/arch/i386/pci/pci_addr_fixup.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/arch/i386/pci/pci_addr_fixup.c b/sys/arch/i386/pci/pci_addr_fixup.c
index 66f4324a0e4..e0ee513f97f 100644
--- a/sys/arch/i386/pci/pci_addr_fixup.c
+++ b/sys/arch/i386/pci/pci_addr_fixup.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_addr_fixup.c,v 1.8 2001/01/27 04:59:39 mickey Exp $ */
+/* $OpenBSD: pci_addr_fixup.c,v 1.9 2001/03/15 03:55:19 mickey Exp $ */
/* $NetBSD: pci_addr_fixup.c,v 1.7 2000/08/03 20:10:45 nathanw Exp $ */
/*-
@@ -369,9 +369,8 @@ pciaddr_search(mem_port, startp, size)
extern struct cfdriver pcibios_cd;
struct pcibios_softc *sc;
- sc = pcibios_cd.cd_devs[0];
-
- if (!(pcibios_flags & PCIBIOS_ADDR_FIXUP)) {
+ sc = (struct pcibios_softc *)device_lookup(&pcibios_cd, 0);
+ if (sc && !(pcibios_flags & PCIBIOS_ADDR_FIXUP)) {
struct extent_region *rp;
struct extent *ex = mem_port? sc->extent_mem : sc->extent_port;