downstream pci walk

Amerei Acuna amerei at gmail.com
Wed Jul 16 17:58:03 EDT 2014


Hello

I'm writing a custom PCI driver for a hobby endpoint. Due to some
"special", possibly unique, circumstance, I need to determine if two
devices form a pair. As I'm using a PCI switch to connect these two
devices, I'm thinking on the possibility of checking if the two devices
share a common pci-pci bridge (or finding the least common ancestor in a
directed graph).

Basically, I'm trying to implement pci/bus.c::pci_walk_bus(), only, in a
downstream direction (from end point to bridge). I could use
pci_bus_upstream_bridge() to do my reverse walk but I noticed it uses a
semaphore pci_bus_sem that is only made available via internal "pci.h" e.g.
not available to outside modules.

Along with my study, I would like to ask for advice and a push in the right
direction on how can I achieve a reverse PCI walk - if that is possible.

Thank you in advance for your help.

~amerei
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20140717/496430d2/attachment.html 


More information about the Kernelnewbies mailing list