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
This commit is contained in:
Marius Strobl 2012-06-27 22:17:52 +00:00
parent 49ce68b369
commit a6c8226584
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=237673

View File

@ -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,