public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Randy Vinson <rvinson@mvista•com>
To: linuxppc-dev@ozlabs•org
Subject: [PATCH] Fix IO Window Updates on P2P bridges.
Date: Thu, 12 Oct 2006 13:36:23 -0700	[thread overview]
Message-ID: <452EA747.5080601@mvista.com> (raw)

[-- 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);
 

                 reply	other threads:[~2006-10-12 21:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=452EA747.5080601@mvista.com \
    --to=rvinson@mvista$(echo .)com \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox