James C. McPherson schrieb:
> Baolu Lu wrote:
>> Hi,
>>
>> I am going to write a kernel component, which will interact with the 
>> kernel PCI subsystem. This part of code will call the PCI interface to
>>
>> 1. traverse the pci device tree
>> 2. locate seg,bus,dev,fn
>> 3. locate parent p2p bridge
>>
>> Any reference for this?
> 
> Writing Device Drivers, publication 819-3196 on docs.sun.com

The problem with the public DDI interface for walking the (PCI) device 
tree is that, starting from your own dev_info_t, you can only go up 
using ddi_get_parent(). All other related functions 
(ddi_get_{sibbling,child}()) are not part of the public DDI interface 
according to the man pages.

What is the rational behind this? My specific problem is that I would 
like the type (device ID) of the hostbridge behind which my device is 
operating. I can not detect it using ddi_get_parent() alone; I would 
need to look sideways in the tree at some point (near the root).

  Joachim

-- 
Joachim Worringen, Software Architect, Dolphin Interconnect Solutions
phone ++49/(0)228/324 08 17 - http://www.dolphinics.com
_______________________________________________
driver-discuss mailing list
driver-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/driver-discuss

Reply via email to