Regardless whether or not a device is being handled by a resource manager/driver, pci_device_find() will locate all enumerated devices.
Again ... the identical resource managers of two identical boards are started out of a very late position within a boot image.see When the system first starts, before you start any resource manager on you device, do both instances of the device show up in the pci-tool output?
We do it since more than 25 years in a correct way and understanding!If they do, then pci_device_find() will also find them given the correct parameters bec pci-tool uses the pci_device_find() API. If you have 2 instances of a device, the instance of interest is specified with the first parameter to pci_device_find(). Keep in mind however that this is based on the search criteria. It may be that the wrong 'idx' parameter is being passed to pci_device_find().
The behavior of pci_device_find seems to work unpredictable in our configuration.Please see also the 'use' information in pci-tool that describes this. If none of this solves the problem, please provide additional information (slog2info, pci_tool -tvv output, etc)