Fix IO Window Updates on P2P bridges. When updating the I/O window of a PCI-to-PCI bridge, update_bridge_base() fails to zero the upper 16 bits of the IO base and limit registers if the new I/O window is under 64k in size. Signed-off-by: Randy Vinson --- commit 46be7a52bb42e3323644f4d15bd1e93f14632a60 tree 3e5b1c12c04255d59647f6660cd6b0e3f39d1cc5 parent 10270613fb4d5a44c335cfa13e9626bf5743c01d author Randy Vinson Thu, 12 Oct 2006 13:25:46 -0700 committer Randy Vinson Thu, 12 Oct 2006 13:25:46 -0700 arch/powerpc/kernel/pci_32.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c index 9b49f86..0d9ff72 100644 --- a/arch/powerpc/kernel/pci_32.c +++ b/arch/powerpc/kernel/pci_32.c @@ -441,14 +441,14 @@ update_bridge_base(struct pci_bus *bus, end = res->end - off; io_base_lo = (start >> 8) & PCI_IO_RANGE_MASK; io_limit_lo = (end >> 8) & PCI_IO_RANGE_MASK; - if (end > 0xffff) { - pci_write_config_word(dev, PCI_IO_BASE_UPPER16, - start >> 16); - pci_write_config_word(dev, PCI_IO_LIMIT_UPPER16, - end >> 16); + if (end > 0xffff) io_base_lo |= PCI_IO_RANGE_TYPE_32; - } else + else io_base_lo |= PCI_IO_RANGE_TYPE_16; + pci_write_config_word(dev, PCI_IO_BASE_UPPER16, + start >> 16); + pci_write_config_word(dev, PCI_IO_LIMIT_UPPER16, + end >> 16); pci_write_config_byte(dev, PCI_IO_BASE, io_base_lo); pci_write_config_byte(dev, PCI_IO_LIMIT, io_limit_lo);