summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/pci_pci.c
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2012-06-27 22:17:52 +0000
committermarius <marius@FreeBSD.org>2012-06-27 22:17:52 +0000
commitcc16064ec60995fbfcff9356382c3943888d7750 (patch)
treeddac2f6fb79bf20b7a682c7b9912881e8fef257f /sys/dev/pci/pci_pci.c
parent1b7001386c813b58c1e8467e1fb5d5d2cdb08890 (diff)
downloadFreeBSD-src-cc16064ec60995fbfcff9356382c3943888d7750.zip
FreeBSD-src-cc16064ec60995fbfcff9356382c3943888d7750.tar.gz
For subtractively decoding bridges, don't try to grow windows but pass
the request up the tree in order to be on the safe side. Growing windows in this case would mean to switch resources to positive decoding and it's unclear how to correctly handle this. At least with ALi/ULi M5249 PCI-PCI bridges, this also just doesn't work out of the box. Reviewed by: jhb MFC after: 3 days
Diffstat (limited to 'sys/dev/pci/pci_pci.c')
-rw-r--r--sys/dev/pci/pci_pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c
index 9dc72ef..6d058c4 100644
--- a/sys/dev/pci/pci_pci.c
+++ b/sys/dev/pci/pci_pci.c
@@ -1038,7 +1038,7 @@ pcib_alloc_resource(device_t dev, device_t child, int type, int *rid,
case SYS_RES_IOPORT:
r = pcib_suballoc_resource(sc, &sc->io, child, type, rid, start,
end, count, flags);
- if (r != NULL)
+ if (r != NULL || (sc->flags & PCIB_SUBTRACTIVE) != 0)
break;
if (pcib_grow_window(sc, &sc->io, type, start, end, count,
flags) == 0)
@@ -1062,7 +1062,7 @@ pcib_alloc_resource(device_t dev, device_t child, int type, int *rid,
}
r = pcib_suballoc_resource(sc, &sc->mem, child, type, rid,
start, end, count, flags);
- if (r != NULL)
+ if (r != NULL || (sc->flags & PCIB_SUBTRACTIVE) != 0)
break;
if (flags & RF_PREFETCHABLE) {
if (pcib_grow_window(sc, &sc->pmem, type, start, end,
OpenPOWER on IntegriCloud