Re: One chart on pci bridge and its bus and their children

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 05, 2012 at 12:11:46PM +0800, Ram Pai wrote:
>On Tue, Jun 05, 2012 at 11:26:27AM +0800, Richard Yang wrote:
>> 
>> All, 
>> 
>> I draw a chart on the relationship of bridge/bus/devics.
>> 
>> I am not sure it is exact, so please correct me if it is not correct.
>
>A clearer representation can be found at http://tldp.org/LDP/tlk/dd/pci.html		
>in section 6.6.1
Thanks, Ram.

I found I missed one important field in pci_bus.

>
>> 
>> BTW, the pci_bus->self, pci_bus->bridge seem to point the same thing.
>> So this is really necessary to do this?
>
>pci_bus->self points to the pci_dev structure, and pci_bus->bridge
>points to the device structure. Both correspond to the same bridge. BTW: device
>structure is the basic structure to represent any device in the system,
>not necessarily pci device.
>
>
>> 
>>                             Bus 0(pci_bus)                      
>>                             +--------------------+<----+
>>                             |                    |     |
>>                             +--------------------+     |
>>                                                        |
>>                                                        |
>>                              Bridge(pci_dev)           |                     
>>                             +--------------------+<----|---+--------------+
>>                             |subordinate(pci_bus)|-+   |   |              |
>>                             +--------------------+ |   |   |              |
>>                                                    |   |   |              |
>>                                                    |   |   |              |
>>                                                    |   |   |              |
>>                             Bus 1(pci_bus)         |   |   |              |
>>                        +--->+-------------------+<-+   |   |              |
>>                        |    |parent(pci_bus)    |------+   |              |
>>                        |    +-------------------+          |              |
>>                        |    |self(pci_dev)      |----------+              |
>>                        |    |bridge(device)     |                         |
>>                        |    +-------------------+                         |
>>                        |    |devices(list_head) |                         |
>>                        |    +--------+----------+                         |
>>                        |             |                                    |
>>                        |      ----+--+---+----                            |
>>    pci_dev             |          |      |          pci_dev               |
>>    +---------------+<--|----------+      +--------->+-----------------+   |
>>    |bus(pci_bus)   |---+                            |bus(pci_bus)     |   |
>>    +---------------+                                +-----------------+   |
>>    |dev.parent     |                                |dev.parent       |---+
>>    +---------------+                                +-----------------+

-- 
Richard Yang
Help you, Help me

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux