mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PCI] Various legacy probing options
@ 2003-06-23 15:23 Matthew Wilcox
  2003-07-04  9:34 ` Martin Mares
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew Wilcox @ 2003-06-23 15:23 UTC (permalink / raw)
  To: Greg KH, linux-kernel, Martin Mares


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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PCI] Various legacy probing options
  2003-06-23 15:23 [PCI] Various legacy probing options Matthew Wilcox
@ 2003-07-04  9:34 ` Martin Mares
  0 siblings, 0 replies; 2+ messages in thread
From: Martin Mares @ 2003-07-04  9:34 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: Greg KH, linux-kernel

Hello!

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

Probably not, but many of the ancient BIOSes just set the last bus to 0xff.

				Have a nice fortnight
-- 
Martin `MJ' Mares   <mj@ucw.cz>   http://atrey.karlin.mff.cuni.cz/~mj/
Faculty of Math and Physics, Charles University, Prague, Czech Rep., Earth
"Dijkstra probably hates me." -- /usr/src/linux/kernel/sched.c

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-07-04  9:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-23 15:23 [PCI] Various legacy probing options Matthew Wilcox
2003-07-04  9:34 ` Martin Mares

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®