Messages in this thread | | | Date | Tue, 25 Nov 2008 20:46:37 -0800 (PST) | From | Trent Piepho <> | Subject | Re: [PATCH] fakephp: Allocate PCI resources before adding the device |
| |
On Tue, 25 Nov 2008, Darrick J. Wong wrote: > For PCI devices, pci_bus_assign_resources() must be called to set up the > pci_device->resource array before pci_bus_add_devices() can be called, else > attempts to load drivers results in BAR collision errors where there are none.
I've had a patch to fakephp that did something like this for a while, but I called pci_bus_assign_resources() _after_ adding the devices with calls to pci_bus_add_device(). It seems like that might be easier, to just add all the devices and then call pci_bus_assign_resources() when done. It appears to work fine for me. Is there a reason this is wrong?
| |