diff options
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/pci.c | 6 | ||||
-rw-r--r-- | sys/dev/pci/pcivar.h | 4 | ||||
-rw-r--r-- | sys/dev/pci/ppb.c | 6 |
3 files changed, 9 insertions, 7 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index 016406167e2..9f04610a989 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci.c,v 1.89 2011/04/12 20:29:35 deraadt Exp $ */ +/* $OpenBSD: pci.c,v 1.90 2011/05/14 13:23:38 kettenis Exp $ */ /* $NetBSD: pci.c,v 1.31 1997/06/06 23:48:04 thorpej Exp $ */ /* @@ -167,6 +167,7 @@ pciattach(struct device *parent, struct device *self, void *aux) sc->sc_memt = pba->pba_memt; sc->sc_dmat = pba->pba_dmat; sc->sc_pc = pba->pba_pc; + sc->sc_flags = pba->pba_flags; sc->sc_ioex = pba->pba_ioex; sc->sc_memex = pba->pba_memex; sc->sc_pmemex = pba->pba_pmemex; @@ -371,7 +372,8 @@ pci_probe_device(struct pci_softc *sc, pcitag_t tag, /* This is a simplification of the NetBSD code. We don't support turning off I/O or memory on broken hardware. <csapuntz@stanford.edu> */ - pa.pa_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED; + pa.pa_flags = sc->sc_flags; + pa.pa_flags |= PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED; if (sc->sc_bridgetag == NULL) { pa.pa_intrswiz = 0; diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h index d1b36b41f4b..4b31992edc7 100644 --- a/sys/dev/pci/pcivar.h +++ b/sys/dev/pci/pcivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pcivar.h,v 1.63 2010/09/07 16:21:45 deraadt Exp $ */ +/* $OpenBSD: pcivar.h,v 1.64 2011/05/14 13:23:38 kettenis Exp $ */ /* $NetBSD: pcivar.h,v 1.23 1997/06/06 23:48:05 thorpej Exp $ */ /* @@ -90,6 +90,7 @@ struct pcibus_attach_args { bus_space_tag_t pba_memt; /* pci mem space tag */ bus_dma_tag_t pba_dmat; /* DMA tag */ pci_chipset_tag_t pba_pc; + int pba_flags; /* flags; see below */ struct extent *pba_ioex; struct extent *pba_memex; @@ -180,6 +181,7 @@ struct pci_softc { bus_space_tag_t sc_iot, sc_memt; bus_dma_tag_t sc_dmat; pci_chipset_tag_t sc_pc; + int sc_flags; struct extent *sc_ioex; struct extent *sc_memex; struct extent *sc_pmemex; diff --git a/sys/dev/pci/ppb.c b/sys/dev/pci/ppb.c index 2009fd7dfd8..3e671c6515d 100644 --- a/sys/dev/pci/ppb.c +++ b/sys/dev/pci/ppb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ppb.c,v 1.48 2011/04/18 04:18:36 deraadt Exp $ */ +/* $OpenBSD: ppb.c,v 1.49 2011/05/14 13:23:38 kettenis Exp $ */ /* $NetBSD: ppb.c,v 1.16 1997/06/06 23:48:05 thorpej Exp $ */ /* @@ -291,12 +291,10 @@ ppbattach(struct device *parent, struct device *self, void *aux) pba.pba_memt = pa->pa_memt; pba.pba_dmat = pa->pa_dmat; pba.pba_pc = pc; + pba.pba_flags = pa->pa_flags & ~PCI_FLAGS_MRM_OKAY; pba.pba_ioex = sc->sc_ioex; pba.pba_memex = sc->sc_memex; pba.pba_pmemex = sc->sc_pmemex; -#if 0 - pba.pba_flags = pa->pa_flags & ~PCI_FLAGS_MRM_OKAY; -#endif pba.pba_domain = pa->pa_domain; pba.pba_bus = PPB_BUSINFO_SECONDARY(busdata); pba.pba_bridgeih = sc->sc_ih; |