Re: [patch 2.5.31] transparent PCI-to-PCI bridges

Ivan Kokshaysky
2002-08-31T22:36:37Z

On Sat, Aug 31, 2002 at 09:49:14AM -0700, Linus Torvalds wrote:
>
> On 31 Aug 2002, Alan Cox wrote:
> >
> > Related question while we are on the subject of bridges. I'm trying to
> > work out a clean way to initialize a new subtree of devices given a
> > bridge that suddenely has devices behind it.
> >
> > This occurs in three cases I know about now
> > - Easidock cardbus->PCI extender
> > - IBM Thinkpad hot docking bridge
> > - Magma PCI extended split bridge
>
> pci_do_scan_bus() should do almost everything for you. Pat Mochel had some
> code that made the cardbus driver basically do just this on cardbus
> insertion, you might ask him.

I guess Pat's code has something to do with a resource allocation
(haven't seen it though).
I would play with following if I have the hardware:
{
pci_do_scan_bus(bus);
pbus_size_bridges(bus);
pbus_assign_resources(bus);
}
Obviously, __init qualifiers should be changed to __devinit for pbus_*
and other stuff in setup-bus.c and setup-res.c.

Ivan.