[PCI] Various legacy probing options

Matthew Wilcox (willy@debian.org)
Mon, 23 Jun 2003 16:23:10 +0100


I'd like to take the logic that checks whether a bus has already
been scanned out of pcibios_scan_root() and push it down into
pci_scan_bus{,_parented}().

The trouble is that pci_scan_bus() already has a check for whether
a bus has been scanned or not and returns the opposite possibiity
(pcibios_scan_root() returns the bus if it exists; pci_scan_bus()
returns NULL if that bus already exists).

Most callers of pci_scan_bus() don't even bother to check the return
value, so they don't care if this changes. The only caller I can find
that actually cares is arch/i386/pci/irq.c:pirq_peer_trick() [can someone
check me on this? some of the architectures are a bit strange].

I wonder if this case ever occurs, though. pirq_peer_trick() is called
from pcibios_irq_init() which is a subsys_initcall. irq.o is linked
after legacy.o, which contains the subsys_initcall pci_legacy_init(),
which calls pcibios_fixup_peer_bridges() which already iterates over
0-pcibios_last_bus looking for busses.

Are there really broken PCs out there that will have additional bridges
found in the PIRQ tables after pcibios_last_bus?

-- 
"It's not Hollywood.  War is real, war is primarily not about defeat or
victory, it is about death.  I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/