* [PATCH 12/13]: PCI Err: RPA-PHP clarification
@ 2005-06-29 0:00 Linas Vepstas
0 siblings, 0 replies; only message in thread
From: Linas Vepstas @ 2005-06-29 0:00 UTC (permalink / raw)
To: linux-kernel, Benjamin Herrenschmidt, long
Cc: Hidetoshi Seto, Greg KH, ak, Paul Mackerras, linuxppc64-dev,
linux-pci, johnrose
[-- Attachment #1: Type: text/plain, Size: 249 bytes --]
pci-err-12-rpaphp-symmetry.patch
Restructure handling of bus remove and bus add to make the pairs
of calls more symmetrical. Doesn't change function, but does
make the code easier to understand.
Signed-off-by: Linas Vepstas <linas@linas.org>
[-- Attachment #2: pci-err-12-rpaphp-symmetry.patch --]
[-- Type: text/plain, Size: 2086 bytes --]
--- linux-2.6.12-git10/drivers/pci/hotplug/rpaphp_pci.c.linas-orig 2005-06-17 14:48:29.000000000 -0500
+++ linux-2.6.12-git10/drivers/pci/hotplug/rpaphp_pci.c 2005-06-22 15:28:29.000000000 -0500
@@ -63,6 +63,7 @@ int rpaphp_claim_resource(struct pci_dev
root ? "Address space collision on" :
"No parent found for",
resource, dtype, pci_name(dev), res->start, res->end);
+ dump_stack();
}
return err;
}
@@ -188,6 +189,19 @@ rpaphp_fixup_new_pci_devices(struct pci_
static int rpaphp_pci_config_bridge(struct pci_dev *dev);
+static void rpaphp_eeh_add_bus_device(struct pci_bus *bus)
+{
+ struct pci_dev *dev;
+ list_for_each_entry(dev, &bus->devices, bus_list) {
+ eeh_add_device_late(dev);
+ if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
+ struct pci_bus *subbus = dev->subordinate;
+ if (bus)
+ rpaphp_eeh_add_bus_device (subbus);
+ }
+ }
+}
+
/*****************************************************************************
rpaphp_pci_config_slot() will configure all devices under the
given slot->dn and return the the first pci_dev.
@@ -215,6 +229,8 @@ rpaphp_pci_config_slot(struct device_nod
}
if (dev->hdr_type == PCI_HEADER_TYPE_BRIDGE)
rpaphp_pci_config_bridge(dev);
+
+ rpaphp_eeh_add_bus_device(bus);
}
return dev;
}
@@ -223,7 +239,6 @@ static int rpaphp_pci_config_bridge(stru
{
u8 sec_busno;
struct pci_bus *child_bus;
- struct pci_dev *child_dev;
dbg("Enter %s: BRIDGE dev=%s\n", __FUNCTION__, pci_name(dev));
@@ -240,11 +255,7 @@ static int rpaphp_pci_config_bridge(stru
/* do pci_scan_child_bus */
pci_scan_child_bus(child_bus);
- list_for_each_entry(child_dev, &child_bus->devices, bus_list) {
- eeh_add_device_late(child_dev);
- }
-
- /* fixup new pci devices without touching bus struct */
+ /* Fixup new pci devices without touching bus struct */
rpaphp_fixup_new_pci_devices(child_bus, 0);
/* Make the discovered devices available */
@@ -320,7 +331,6 @@ static void rpaphp_eeh_remove_bus_device
if (pdev)
rpaphp_eeh_remove_bus_device(pdev);
}
-
}
return;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-06-29 0:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-29 0:00 [PATCH 12/13]: PCI Err: RPA-PHP clarification Linas Vepstas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox