diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2009-05-15 21:47:41 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2009-05-15 21:47:41 +0000 |
commit | b0ae5b509558c66a70f0e199f40b9521542e19e3 (patch) | |
tree | 96b5a4fb670c03acfcec32d20fec3618b1f7796d | |
parent | 83890bfcd60fce957d7ae8b72c294fe6811a2b80 (diff) |
Always subregion the main PCI I/O extents. This will handle things properly
when we pass the main PCI I/O extents to the secondary bus of subtractive
decode brigdes.
-rw-r--r-- | sys/arch/amd64/amd64/rbus_machdep.c | 11 | ||||
-rw-r--r-- | sys/arch/i386/i386/rbus_machdep.c | 11 |
2 files changed, 12 insertions, 10 deletions
diff --git a/sys/arch/amd64/amd64/rbus_machdep.c b/sys/arch/amd64/amd64/rbus_machdep.c index f4a2ebdf53d..13266ff2559 100644 --- a/sys/arch/amd64/amd64/rbus_machdep.c +++ b/sys/arch/amd64/amd64/rbus_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rbus_machdep.c,v 1.9 2009/04/28 18:37:13 kettenis Exp $ */ +/* $OpenBSD: rbus_machdep.c,v 1.10 2009/05/15 21:47:40 kettenis Exp $ */ /* $NetBSD: rbus_machdep.c,v 1.2 1999/10/15 06:43:06 haya Exp $ */ /* @@ -82,11 +82,12 @@ rbus_pccbb_parent_io(struct device *self, struct pci_attach_args *pa) return &rbus_null; start = ex->ex_start; - if (pa->pa_bridgetag == NULL) { + if (ex == pciio_ex) { /* - * If we're not behind a PCI-PCI bridge, we must be on - * the root bus. To avoid conflicts with onboard - * legacy devices, we only make a subregion available. + * We're on the root bus, or behind a subtractive + * decode PCI-PCI bridge. To avoid conflicts with + * onboard legacy devices, we only make a subregion + * available. */ start = max(start, RBUS_IO_START); } diff --git a/sys/arch/i386/i386/rbus_machdep.c b/sys/arch/i386/i386/rbus_machdep.c index a3d9487a97c..2dc241bb27c 100644 --- a/sys/arch/i386/i386/rbus_machdep.c +++ b/sys/arch/i386/i386/rbus_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rbus_machdep.c,v 1.24 2009/04/28 18:37:13 kettenis Exp $ */ +/* $OpenBSD: rbus_machdep.c,v 1.25 2009/05/15 21:47:40 kettenis Exp $ */ /* $NetBSD: rbus_machdep.c,v 1.2 1999/10/15 06:43:06 haya Exp $ */ /* @@ -82,11 +82,12 @@ rbus_pccbb_parent_io(struct device *self, struct pci_attach_args *pa) return &rbus_null; start = ex->ex_start; - if (pa->pa_bridgetag == NULL) { + if (ex == pciio_ex) { /* - * If we're not behind a PCI-PCI bridge, we must be on - * the root bus. To avoid conflicts with onboard - * legacy devices, we only make a subregion available. + * We're on the root bus, or behind a subtractive + * decode PCI-PCI bridge. To avoid conflicts with + * onboard legacy devices, we only make a subregion + * available. */ start = max(start, RBUS_IO_START); } |