diff options
author | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2000-08-01 00:18:38 +0000 |
---|---|---|
committer | Niklas Hallqvist <niklas@cvs.openbsd.org> | 2000-08-01 00:18:38 +0000 |
commit | 0ae9b62dde705083eae065552f2724a1b2eab910 (patch) | |
tree | aef389eec9b010d9bf4b5ef7fd39882abaa186d1 /sys/dev/pci | |
parent | 18b19624fbc19b600ea1d34ff8bcd85c6d752d36 (diff) |
Make driver attach no matter the setting of jumper S4.
This solves the "cannot map DPMEM" problem some people have been seeing.
Still there is an ugly printout while configuring if S4 is out, I do not
know how to pretty that one just yet. Howevr it is just a cosmetic thing.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/gdt_pci.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sys/dev/pci/gdt_pci.c b/sys/dev/pci/gdt_pci.c index 22f80c96763..048c3ca46f8 100644 --- a/sys/dev/pci/gdt_pci.c +++ b/sys/dev/pci/gdt_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: gdt_pci.c,v 1.3 2000/03/01 22:38:51 niklas Exp $ */ +/* $OpenBSD: gdt_pci.c,v 1.4 2000/08/01 00:18:37 niklas Exp $ */ /* * Copyright (c) 1999 Niklas Hallqvist. All rights reserved. @@ -279,8 +279,14 @@ gdt_pci_attach(parent, self, aux) GDT_CLASS(gdt) == GDT_PCINEW ? GDT_PCINEW_DPMEM : GDT_PCI_DPMEM, PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT_1M, 0, &dpmemt, &dpmemh, &dpmembase, &dpmemsize)) { - printf("cannot map DPMEM\n"); - goto bail_out; + if (pci_mapreg_map(pa, + GDT_CLASS(gdt) == GDT_PCINEW ? GDT_PCINEW_DPMEM : + GDT_PCI_DPMEM, + PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT, 0, + &dpmemt,&dpmemh, &dpmembase, &dpmemsize)) { + printf("cannot map DPMEM\n"); + goto bail_out; + } } status |= DPMEM_MAPPED; gdt->sc_dpmemt = dpmemt; |