Re: [PATCH] fakephp: Allocate PCI resources before adding the device

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[Fixing cc/to list]

On Tue, Nov 25, 2008 at 08:46:37PM -0800, Trent Piepho wrote:
> 
> 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?

afaict, pci_bus_add_devices calls device_add to set up sysfs files and
trigger a event that can (ultimately) cause a pci probe action to
happen... but the probe will fail because the resources aren't ready.
In any case, if a device shows up in sysfs I'd assume that to mean that
the device is ready to go--all the BARs are reserved for the device,
etc.  For sure, I woudn't expect to be racing
pci_bus_assign_resources().

--D
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux