Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Bjorn Helgaas and committed by
Jesse Barnes
cf48fb6a 63ab387c

+1
+1
drivers/pci/probe.c
··· 367 367 368 368 if (base && base <= limit) { 369 369 res->flags = (io_base_lo & PCI_IO_RANGE_TYPE_MASK) | IORESOURCE_IO; 370 + res2.flags = res->flags; 370 371 region.start = base; 371 372 region.end = limit + 0xfff; 372 373 pcibios_bus_to_resource(dev, &res2, &region);