LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ishizaki Kou <kou.ishizaki@toshiba.co.jp>
To: paulus@samba.org
Cc: linuxppc-dev@ozlabs.org
Subject: [PATCH 2/4] celleb: fix pci config space accesses to subordinary buses
Date: Wed, 09 May 2007 16:36:40 +0900 (JST)	[thread overview]
Message-ID: <200705090736.l497akNR009559@toshiba.co.jp> (raw)

Checking whether bus->self is NULL is not enough to know "bus" is the
primary bus.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
---

Index: linux-powerpc-git/arch/powerpc/platforms/celleb/scc_epci.c
diff -u linux-powerpc-git/arch/powerpc/platforms/celleb/scc_epci.c:1.1.1.3 linux-powerpc-git/arch/powerpc/platforms/celleb/scc_epci.c:1.22
--- linux-powerpc-git/arch/powerpc/platforms/celleb/scc_epci.c:1.1.1.3	Thu Mar 15 10:41:25 2007
+++ linux-powerpc-git/arch/powerpc/platforms/celleb/scc_epci.c	Thu Mar 22 14:56:30 2007
@@ -133,13 +133,13 @@
 }
 
 static volatile void __iomem *celleb_epci_make_config_addr(
+					struct pci_bus *bus,
 					struct pci_controller *hose,
 					unsigned int devfn, int where)
 {
 	volatile void __iomem *addr;
-	struct pci_bus *bus = hose->bus;
 
-	if (bus->self)
+	if (bus != hose->bus)
 		addr = celleb_epci_get_epci_cfg(hose) +
 		       (((bus->number & 0xff) << 16)
 		        | ((devfn & 0xff) << 8)
@@ -193,7 +193,7 @@
 	} else {
 
 		clear_and_disable_master_abort_interrupt(hose);
-		addr = celleb_epci_make_config_addr(hose, devfn, where);
+		addr = celleb_epci_make_config_addr(bus, hose, devfn, where);
 
 		switch (size) {
 		case 1:
@@ -257,7 +257,7 @@
 	} else {
 
 		clear_and_disable_master_abort_interrupt(hose);
-		addr = celleb_epci_make_config_addr(hose, devfn, where);
+		addr = celleb_epci_make_config_addr(bus, hose, devfn, where);
 
 		switch (size) {
 		case 1:

                 reply	other threads:[~2007-05-09  7:36 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=200705090736.l497akNR009559@toshiba.co.jp \
    --to=kou.ishizaki@toshiba.co.jp \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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