* [PATCH] Solved: 2.4.20, 2.5.66 have different IDE channel order
@ 2003-04-18 23:33 Chuck Ebbert
0 siblings, 0 replies; only message in thread
From: Chuck Ebbert @ 2003-04-18 23:33 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, Alan Cox
2.4 builds its global PCI device list in breadth-first order.
2.5 is doing the scan that way but defers the construction of the
global list until later and then does it depth-first. This causes
devices to found in different order by drivers. The below fixed that
problem for me:
--- linux-2.5.66-ref/drivers/pci/bus.c Sat Mar 29 09:16:22 2003
+++ linux-2.5.66-uni/drivers/pci/bus.c Fri Apr 18 19:08:04 2003
@ -75,7 +75,8 @
* Add newly discovered PCI devices (which are on the bus->devices
* list) to the global PCI device list, add the sysfs and procfs
* entries. Where a bridge is found, add the discovered bus to
- * the parents list of child buses, and recurse.
+ * the parents list of child buses, and recurse (breadth-first
+ * to be compatible with 2.4)
*
* Call hotplug for each new devices.
*/
@ -98,6 +99,12 @
#endif
pci_create_sysfs_dev_files(dev);
+ }
+
+ list_for_each_entry(dev, &bus->devices, bus_list) {
+
+ BUG_ON(list_empty(&dev->global_list));
+
/*
* If there is an unattached subordinate bus, attach
* it and then scan for unattached PCI devices.
------
Chuck
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-04-18 23:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-18 23:33 [PATCH] Solved: 2.4.20, 2.5.66 have different IDE channel order Chuck Ebbert
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®