aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/probe.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2012-03-16 19:47:59 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2012-03-20 13:41:27 -0400
commitcf48fb6a2bf2e59990e1438d0dedc706df911996 (patch)
treeece7583684a8a3e7a97d471db9a6984ababf100b /drivers/pci/probe.c
parent63ab387ca0d1576edef35ef68e4b8ea5e0757b7a (diff)
PCI: fix bridge I/O window bus-to-resource conversion
In 5bfa14ed9f3c, I forgot to initialize res2.flags before calling pcibios_bus_to_resource(), which depends on the resource type to locate the correct aperture. This bug won't hurt x86, which currently never has an offset between bus and CPU addresses, but will affect other architectures. Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r--drivers/pci/probe.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 944e05a66b97..5e1ca3c58a7d 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -367,6 +367,7 @@ static void __devinit pci_read_bridge_io(struct pci_bus *child)
367 367
368 if (base && base <= limit) { 368 if (base && base <= limit) {
369 res->flags = (io_base_lo & PCI_IO_RANGE_TYPE_MASK) | IORESOURCE_IO; 369 res->flags = (io_base_lo & PCI_IO_RANGE_TYPE_MASK) | IORESOURCE_IO;
370 res2.flags = res->flags;
370 region.start = base; 371 region.start = base;
371 region.end = limit + 0xfff; 372 region.end = limit + 0xfff;
372 pcibios_bus_to_resource(dev, &res2, &region); 373 pcibios_bus_to_resource(dev, &res2, &region);