public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adam Belay <abelay@novell.com>
To: linux-kernel@vger.kernel.org
Cc: greg@kroah.com
Subject: [RFC][PATCH] PCI root bridge detection fix [7/9]
Date: Thu, 14 Jul 2005 04:55:30 -0400	[thread overview]
Message-ID: <1121331330.3398.95.camel@localhost.localdomain> (raw)

This patch prevents the root bridge drivers from using the legacy API.
It also updates the PCI<->PCI bridge driver to better coexist with the
legacy code.

Signed-off-by: Adam Belay <abelay@novell.com>

--- a/drivers/pci/bus/pci-bridge.c	2005-07-14 02:17:04.735566464 -0400
+++ b/drivers/pci/bus/pci-bridge.c	2005-07-14 02:24:29.577940144 -0400
@@ -128,6 +128,10 @@
 	if (dev->hdr_type != PCI_HEADER_TYPE_BRIDGE)
 		return -ENODEV;
 
+	/* don't bind to devices controlled by legacy code */
+	if (dev->subordinate)
+		return -ENODEV;
+
 	bus = ppb_detect_bus(dev);
 	if (!bus)
 		return -ENODEV;
--- a/drivers/pci/bus/probe.c	2005-07-14 02:26:30.660532792 -0400
+++ b/drivers/pci/bus/probe.c	2005-07-14 02:25:20.455205624 -0400
@@ -395,6 +395,7 @@
 struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent, int bus, struct pci_ops *ops, void *sysdata)
 {
 	int error;
+	unsigned int devfn;
 	struct pci_bus *b;
 	struct device *dev;
 
@@ -440,7 +441,9 @@
 	/* Create legacy_io and legacy_mem files for this bus */
 	pci_create_legacy_files(b);
 
-	b->subordinate = pci_scan_child_bus(b);
+	/* Go find them, Rover! */
+	for (devfn = 0; devfn < 0x100; devfn += 8)
+		pci_scan_slot(b, devfn);
 
 	return b;
 



                 reply	other threads:[~2005-07-14  9:18 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=1121331330.3398.95.camel@localhost.localdomain \
    --to=abelay@novell.com \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.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