mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Andrew Morton <akpm@osdl.org>
Cc: Linus Torvalds <torvalds@osdl.org>,
	Linux Kernel list <linux-kernel@vger.kernel.org>
Subject: [PATCH] Fix PCI<->OF matching on G5 AGP bus
Date: Tue, 09 Mar 2004 20:26:20 +1100	[thread overview]
Message-ID: <1078824380.14366.239.camel@gaston> (raw)

Strangely, I though I fixed that a long time ago, but it was still
broken in the current tree... So drivers like radeonfb fail to
find the OF device matching a given PCI device on the G5 AGP bus
because of some bus renumbering tricks. This patch fixes the
problem by fixing the bus numbers in the OF node. This corrects
radeonfb and other drivers looking for EDID / PLL datas in the
OF node.

===== arch/ppc64/kernel/pmac_pci.c 1.3 vs edited =====
--- 1.3/arch/ppc64/kernel/pmac_pci.c	Mon Mar  1 11:50:37 2004
+++ edited/arch/ppc64/kernel/pmac_pci.c	Tue Mar  9 20:20:53 2004
@@ -719,6 +719,17 @@
 	/* Setup the linkage between OF nodes and PHBs */ 
 	pci_devs_phb_init();
 
+	/* Fixup the PCI<->OF mapping for U3 AGP due to bus renumbering. We
+	 * assume there is no P2P bridge on the AGP bus, which should be a
+	 * safe assumptions hopefully.
+	 */
+	if (u3_agp) {
+		struct device_node *np = u3_agp->arch_data;
+		np->busno = 0xf0;
+		for (np = np->child; np; np = np->sibling)
+			np->busno = 0xf0;
+	}
+
 	pmac_check_ht_link();
 
 	/* Tell pci.c to use the common resource allocation mecanism */



                 reply	other threads:[~2004-03-09  9:29 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=1078824380.14366.239.camel@gaston \
    --to=benh@kernel.crashing.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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

all inboxes | Powered by JetHome®