linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Yang <weiyang@linux.vnet.ibm.com>
To: Ram Pai <linuxram@us.ibm.com>
Cc: Richard Yang <weiyang@linux.vnet.ibm.com>,
	linux-pci@vger.kernel.org, Gavin Shan <shangw@linux.vnet.ibm.com>
Subject: Re: One chart on pci bridge and its bus and their children
Date: Tue, 5 Jun 2012 13:33:15 +0800	[thread overview]
Message-ID: <20120605053315.GA24358@richard> (raw)
In-Reply-To: <20120605041146.GD6637@ram-ThinkPad-T61>

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


      parent reply	other threads:[~2012-06-05  6:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-05  3:26 One chart on pci bridge and its bus and their children Richard Yang
2012-06-05  4:11 ` Ram Pai
2012-06-05  4:37   ` Bjorn Helgaas
2012-06-05  5:18     ` Yinghai Lu
2012-06-05  5:20       ` Yinghai Lu
2012-06-05  5:41         ` Richard Yang
2012-06-05  6:35         ` Ram Pai
2012-06-05 14:41           ` Jiang Liu
2012-06-05 16:40             ` Ram Pai
2012-06-06  1:58               ` Ram Pai
2012-06-05 19:38           ` Yinghai Lu
2012-06-06  5:28             ` Richard Yang
2012-06-06  7:58               ` Richard Yang
2012-06-05 21:52         ` Gavin Shan
2012-06-05  6:02       ` Richard Yang
2012-06-05 14:32         ` Jiang Liu
2012-06-05 14:37         ` Jiang Liu
2012-06-05 19:41         ` Yinghai Lu
2012-06-05  5:33   ` Richard Yang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120605053315.GA24358@richard \
    --to=weiyang@linux.vnet.ibm.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=linuxram@us.ibm.com \
    --cc=shangw@linux.vnet.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).