multiple calls to pci_attach

I have an app that has two pci cards and one of these cards is a carrier card so it has multiple “sub cards”.

Is there anything that should be considered when calling pci_attach() multiple times within the same process? The structure of the code (c++) would allow this to happen currently. What issues (if any) would there be doing this?

TIA
–chris

Hi Chris

Not much info to go on here, but I think that there is actually no problem doing that, but you may consider extracting the “driver” part from your app and starting that as a driver process, that way you may have more flexibility and possiblity to handle multiple tranfers and calls (IRQS) without stoppping your main app. So I believe it will be up to you to consider and take precautions to this.

On the other hand I did not have subcards, we only had two PCI cards and I wrote one driver to each card to which I then communicated with an API/Interface.

Regards

/Jörgen