From 18e35894a4d4661a81e47176b296f24c5e722d6f Mon Sep 17 00:00:00 2001 From: Russell King Date: Sun, 16 Mar 2003 23:28:51 +0000 Subject: [PATCH] [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. --- drivers/pci/setup-bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 0eab0b57e10a8..172174f9c61ef 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c @@ -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; -- 2.53.0