On Wed, Sep 04, 2019 at 11:22:13PM -0500, Shawn Anastasio wrote: > If anybody has more insight or a better way to fix this, please let me know. Have you considered moving the invocation of pcibios_setup_device() to pcibios_bus_add_device()? The latter is called from pci_bus_add_device() in drivers/pci/bus.c. At this point device_add() has been called, so the device exists in sysfs. Basically when adding a PCI device, the order is: * pci_device_add() populates struct pci_dev, calls device_add(), binding the device to a driver is prevented * after pci_device_add() has been called for all discovered devices, resources are allocated * pci_bus_add_device() is called for each device, calls pcibios_bus_add_device() and binds the device to a driver Thanks, Lukas