提交 cf48fb6a 编写于 作者: B Bjorn Helgaas 提交者: Jesse Barnes

PCI: fix bridge I/O window bus-to-resource conversion

In 5bfa14ed, 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: NBjorn Helgaas <bhelgaas@google.com>
Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
上级 63ab387c
...@@ -367,6 +367,7 @@ static void __devinit pci_read_bridge_io(struct pci_bus *child) ...@@ -367,6 +367,7 @@ static void __devinit pci_read_bridge_io(struct pci_bus *child)
if (base && base <= limit) { if (base && base <= limit) {
res->flags = (io_base_lo & PCI_IO_RANGE_TYPE_MASK) | IORESOURCE_IO; res->flags = (io_base_lo & PCI_IO_RANGE_TYPE_MASK) | IORESOURCE_IO;
res2.flags = res->flags;
region.start = base; region.start = base;
region.end = limit + 0xfff; region.end = limit + 0xfff;
pcibios_bus_to_resource(dev, &res2, &region); pcibios_bus_to_resource(dev, &res2, &region);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册