Li-Ta Lo ollie@lanl.gov writes:
On Wed, 2004-11-03 at 16:19, Eric W. Biederman wrote:
Li-Ta Lo ollie@lanl.gov writes:
On Wed, 2004-11-03 at 15:51, Eric W. Biederman wrote:
So my immediate suggestion would be to call pci_set_method from the
pci_domain's
scan_bus method before it does anything. We can worry about the rest
later.
Isn't the root_dev::scan_bus() called before pci_domain::scan_bus() ?
Yes but it uses scan_static_bus()
But the mainboard::enable_dev() updatea the root_dev::scan_bus(), if I am right. So the mainboard::scan_bus() will be called before pci_domain::scan_bus().
I am not arguing that you cannot arrange a scenario where it cannot happen. And an enable_dev method may be a slightly more appropriate place to set the pci_ops than early in scan_bus. What I am arguing is that I believe we have no remaining code that sanely does that. And that for the future it can be as simple as saying don't do that then.
The only case I remember leaving code that looked like was in emulation/qemu-i386 and that was because I thought it did not define a northbridge. Since even that code defines a northbridge I don't for see any problems. I am going to examine all of the mainboard code though and actually look to see what is going on.
An advantage of doing this is that with just a little work I can not even compile in support for the unused configuration type which should keep the code a little smaller.
Eric