| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: mainbus.c,v 1.92 2011/10/21 21:35:28 dyoung Exp $ */ | | 1 | /* $NetBSD: mainbus.c,v 1.93 2012/01/18 21:34:38 drochner Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. | | 4 | * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. |
5 | * | | 5 | * |
6 | * Redistribution and use in source and binary forms, with or without | | 6 | * Redistribution and use in source and binary forms, with or without |
7 | * modification, are permitted provided that the following conditions | | 7 | * modification, are permitted provided that the following conditions |
8 | * are met: | | 8 | * are met: |
9 | * 1. Redistributions of source code must retain the above copyright | | 9 | * 1. Redistributions of source code must retain the above copyright |
10 | * notice, this list of conditions and the following disclaimer. | | 10 | * notice, this list of conditions and the following disclaimer. |
11 | * 2. Redistributions in binary form must reproduce the above copyright | | 11 | * 2. Redistributions in binary form must reproduce the above copyright |
12 | * notice, this list of conditions and the following disclaimer in the | | 12 | * notice, this list of conditions and the following disclaimer in the |
13 | * documentation and/or other materials provided with the distribution. | | 13 | * documentation and/or other materials provided with the distribution. |
14 | * 3. All advertising materials mentioning features or use of this software | | 14 | * 3. All advertising materials mentioning features or use of this software |
| @@ -21,27 +21,27 @@ | | | @@ -21,27 +21,27 @@ |
21 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR | | 21 | * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR |
22 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES | | 22 | * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES |
23 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. | | 23 | * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. |
24 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | | 24 | * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, |
25 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | | 25 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
26 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | | 26 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | | 27 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | | 28 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | | 29 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
30 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | | 30 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
31 | */ | | 31 | */ |
32 | | | 32 | |
33 | #include <sys/cdefs.h> | | 33 | #include <sys/cdefs.h> |
34 | __KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.92 2011/10/21 21:35:28 dyoung Exp $"); | | 34 | __KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.93 2012/01/18 21:34:38 drochner Exp $"); |
35 | | | 35 | |
36 | #include <sys/param.h> | | 36 | #include <sys/param.h> |
37 | #include <sys/systm.h> | | 37 | #include <sys/systm.h> |
38 | #include <sys/device.h> | | 38 | #include <sys/device.h> |
39 | #include <sys/reboot.h> | | 39 | #include <sys/reboot.h> |
40 | #include <sys/bus.h> | | 40 | #include <sys/bus.h> |
41 | | | 41 | |
42 | #include <dev/isa/isavar.h> | | 42 | #include <dev/isa/isavar.h> |
43 | #include <dev/eisa/eisavar.h> | | 43 | #include <dev/eisa/eisavar.h> |
44 | #include <dev/pci/pcivar.h> | | 44 | #include <dev/pci/pcivar.h> |
45 | | | 45 | |
46 | #include <dev/isa/isareg.h> /* for ISA_HOLE_VADDR */ | | 46 | #include <dev/isa/isareg.h> /* for ISA_HOLE_VADDR */ |
47 | | | 47 | |
| @@ -396,27 +396,26 @@ mainbus_rescan(device_t self, const char | | | @@ -396,27 +396,26 @@ mainbus_rescan(device_t self, const char |
396 | * XXX that's not currently possible. | | 396 | * XXX that's not currently possible. |
397 | */ | | 397 | */ |
398 | #if NPCI > 0 | | 398 | #if NPCI > 0 |
399 | if (pci_mode_detect() != 0 && ifattr_match(ifattr, "pcibus")) { | | 399 | if (pci_mode_detect() != 0 && ifattr_match(ifattr, "pcibus")) { |
400 | int npcibus = 0; | | 400 | int npcibus = 0; |
401 | | | 401 | |
402 | mba.mba_pba.pba_iot = x86_bus_space_io; | | 402 | mba.mba_pba.pba_iot = x86_bus_space_io; |
403 | mba.mba_pba.pba_memt = x86_bus_space_mem; | | 403 | mba.mba_pba.pba_memt = x86_bus_space_mem; |
404 | mba.mba_pba.pba_dmat = &pci_bus_dma_tag; | | 404 | mba.mba_pba.pba_dmat = &pci_bus_dma_tag; |
405 | mba.mba_pba.pba_dmat64 = NULL; | | 405 | mba.mba_pba.pba_dmat64 = NULL; |
406 | mba.mba_pba.pba_pc = NULL; | | 406 | mba.mba_pba.pba_pc = NULL; |
407 | mba.mba_pba.pba_flags = pci_bus_flags(); | | 407 | mba.mba_pba.pba_flags = pci_bus_flags(); |
408 | mba.mba_pba.pba_bus = 0; | | 408 | mba.mba_pba.pba_bus = 0; |
409 | mba.mba_pba.pba_sub = 255; | | | |
410 | mba.mba_pba.pba_bridgetag = NULL; | | 409 | mba.mba_pba.pba_bridgetag = NULL; |
411 | #if NACPICA > 0 && defined(ACPI_SCANPCI) | | 410 | #if NACPICA > 0 && defined(ACPI_SCANPCI) |
412 | if (npcibus == 0 && sc->sc_mpacpi_active) | | 411 | if (npcibus == 0 && sc->sc_mpacpi_active) |
413 | npcibus = mp_pci_scan(self, &mba.mba_pba, pcibusprint); | | 412 | npcibus = mp_pci_scan(self, &mba.mba_pba, pcibusprint); |
414 | #endif | | 413 | #endif |
415 | #if defined(MPBIOS) && defined(MPBIOS_SCANPCI) | | 414 | #if defined(MPBIOS) && defined(MPBIOS_SCANPCI) |
416 | if (npcibus == 0 && mpbios_scanned != 0) | | 415 | if (npcibus == 0 && mpbios_scanned != 0) |
417 | npcibus = mp_pci_scan(self, &mba.mba_pba, pcibusprint); | | 416 | npcibus = mp_pci_scan(self, &mba.mba_pba, pcibusprint); |
418 | #endif | | 417 | #endif |
419 | if (npcibus == 0 && sc->sc_pci == NULL) { | | 418 | if (npcibus == 0 && sc->sc_pci == NULL) { |
420 | sc->sc_pci = config_found_ia(self, "pcibus", | | 419 | sc->sc_pci = config_found_ia(self, "pcibus", |
421 | &mba.mba_pba, pcibusprint); | | 420 | &mba.mba_pba, pcibusprint); |
422 | } | | 421 | } |