diff options
author | Randy Vinson <rvinson@mvista.com> | 2006-10-12 16:36:23 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-10-16 01:53:30 -0400 |
commit | 60b2a46cd60c54bd6551ddfa01f0aab08ca58a5d (patch) | |
tree | 7eeea9f0b7419b19e1292a563dd6415fddf5122c | |
parent | 8ba738c2bb8fb83c0c99f680444d3ffd4c178ca2 (diff) |
[POWERPC] Fix IO Window Updates on P2P bridges.
When update_bridge_base() updates the IO window on a PCI-to-PCI
bridge, it fails to zero the upper 16 bits of the base and limit
registers if the window size is less than 64K. This fixes it.
Signed-off-by: Paul Mackerras <paulus@samba.org>
-rw-r--r-- | 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 9b49f8691d29..0d9ff72e2852 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, int i) | |||
441 | end = res->end - off; | 441 | end = res->end - off; |
442 | io_base_lo = (start >> 8) & PCI_IO_RANGE_MASK; | 442 | io_base_lo = (start >> 8) & PCI_IO_RANGE_MASK; |
443 | io_limit_lo = (end >> 8) & PCI_IO_RANGE_MASK; | 443 | io_limit_lo = (end >> 8) & PCI_IO_RANGE_MASK; |
444 | if (end > 0xffff) { | 444 | if (end > 0xffff) |
445 | pci_write_config_word(dev, PCI_IO_BASE_UPPER16, | ||
446 | start >> 16); | ||
447 | pci_write_config_word(dev, PCI_IO_LIMIT_UPPER16, | ||
448 | end >> 16); | ||
449 | io_base_lo |= PCI_IO_RANGE_TYPE_32; | 445 | io_base_lo |= PCI_IO_RANGE_TYPE_32; |
450 | } else | 446 | else |
451 | io_base_lo |= PCI_IO_RANGE_TYPE_16; | 447 | io_base_lo |= PCI_IO_RANGE_TYPE_16; |
448 | pci_write_config_word(dev, PCI_IO_BASE_UPPER16, | ||
449 | start >> 16); | ||
450 | pci_write_config_word(dev, PCI_IO_LIMIT_UPPER16, | ||
451 | end >> 16); | ||
452 | pci_write_config_byte(dev, PCI_IO_BASE, io_base_lo); | 452 | pci_write_config_byte(dev, PCI_IO_BASE, io_base_lo); |
453 | pci_write_config_byte(dev, PCI_IO_LIMIT, io_limit_lo); | 453 | pci_write_config_byte(dev, PCI_IO_LIMIT, io_limit_lo); |
454 | 454 | ||