* [PATCH] Fix IO Window Updates on P2P bridges.
@ 2006-10-12 20:36 Randy Vinson
0 siblings, 0 replies; only message in thread
From: Randy Vinson @ 2006-10-12 20:36 UTC (permalink / raw)
To: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 238 bytes --]
Greetings,
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. The attached patch corrects this.
Randy Vinson
[-- Attachment #2: pci_update_IO.patch --]
[-- Type: text/plain, Size: 1594 bytes --]
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 <rvinson@mvista•com>
---
commit 46be7a52bb42e3323644f4d15bd1e93f14632a60
tree 3e5b1c12c04255d59647f6660cd6b0e3f39d1cc5
parent 10270613fb4d5a44c335cfa13e9626bf5743c01d
author Randy Vinson <rvinson@linuxbox.(none)> Thu, 12 Oct 2006 13:25:46 -0700
committer Randy Vinson <rvinson@linuxbox.(none)> 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);
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2006-10-12 21:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-10-12 20:36 [PATCH] Fix IO Window Updates on P2P bridges Randy Vinson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox