* [RFC][PATCH] PCI root bridge detection fix [7/9]
@ 2005-07-14 8:55 Adam Belay
0 siblings, 0 replies; only message in thread
From: Adam Belay @ 2005-07-14 8:55 UTC (permalink / raw)
To: linux-kernel; +Cc: greg
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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-07-14 9:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-07-14 8:55 [RFC][PATCH] PCI root bridge detection fix [7/9] Adam Belay
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox