Commit 18e35894 authored by Russell King's avatar Russell King

[PCI] pci-15: Fix setup-bus.c resource sizing.

Patch from Ivan Kokshaysky

This fixes long standing typo ('size' instead of 'r_size') which causes
overestimate of the bridge memory ranges calculated in pbus_size_mem().
For example, if we have a device with one 1Mb and one 2Mb memory ranges
behind the bridge, calculated size and alignment of the bridge memory
window will be 4Mb and 2Mb respectively, while the correct values are
3Mb and 1Mb.
parent fc8b54a1
......@@ -275,7 +275,7 @@ pbus_size_mem(struct pci_bus *bus, unsigned long mask, unsigned long type)
order = 0;
/* Exclude ranges with size > align from
calculation of the alignment. */
if (size == align)
if (r_size == align)
aligns[order] += align;
if (order > max_order)
max_order = order;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment