linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Yang <weiyang@linux.vnet.ibm.com>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: Richard Yang <weiyang@linux.vnet.ibm.com>, linux-pci@vger.kernel.org
Subject: Re: Does my understanding correct?
Date: Wed, 2 May 2012 14:24:43 +0800	[thread overview]
Message-ID: <20120502062443.GB24172@richard> (raw)
In-Reply-To: <CAErSpo7mjeo8f=_3Uhj0V-Q1-q5dYqi8T7pMqBY6zdahpCWTRA@mail.gmail.com>

On Mon, Apr 30, 2012 at 09:56:13AM -0600, Bjorn Helgaas wrote:
>On Fri, Apr 27, 2012 at 11:01 PM, Richard Yang
><weiyang@linux.vnet.ibm.com> wrote:
>
Thanks for your nice chart.
>I think assignments shown for the PCIe-to-PCI bridge are OK, although
>I would draw it like this because the bridge originates a single bus
>02 that may have multiple devices attached to it (this side is PCI,
>not PCIe, so it really is a shared bus):
>
>                                 ^
>                                 |
>                        +--------+--------+
>                        |     00:02.0     |
>                        | PCIe-PCI bridge |
>                        |                 |
>                        +--------+--------+
>                                 |
>                                 |
>                      +---------------------+    Bus 02
>                      |                     |
>                      |                     |
>                      |                     |
>                 +----v----+           +----v----+
>                 | 02:00.0 |           | 02:01.0 |
>                 +---------+           +---------+
>
So for this case, there is not internal bus, while this is really a
physical shared bus, not a logical one.
>I think the PCIe switch part is incorrect.  Here's Figure 1-3 from sec
>1.3.3 of the PCIe r3 spec:

                                     ^
                                     |
     +-------------------------------|------------------------------+
     |                               |                              |
     |                          +----+----+                         |
     |                          | virtual |                         |
     |                          | PCI-PCI |                         |
     |                          | bridge  |                         |
     |                          +----+----+                         |
     |                               |                              |
     |                               |Bus#3                         |
     |                               |                              |
     |          +----------------------------------------+          |
     |          |                    |                   |          |
     |          |                    |                   |          |
     |          |03:00.0             |03:01.0            |03:02.0   |
     |     +----+----+          +----+----+         +----++---+     |
     |     | virtual |          | virtual |         | virtual |     |
     |     | PCI-PCI |          | PCI-PCI |         | PCI-PCI |     |
     |     | bridge  |          | bridge  |         | bridge  |     |
     |     +----+----+          +----+----+         +----+----+     |
     |          |Bus#4?              |                   |          |
     |     -----+-------             |                   |          |
     +----------|--------------------|-------------------|----------+
                |                    |                   |
                v                    v                   v


>A PCIe switch appears as two or more PCI-PCI bridges.  One is
>associated with the upstream port; the others with the downstream
>ports.
>
>A bridge always has a primary side and a secondary side.  In your
>diagram, the bridge associated with the upstream port would be 00:01.0
>(primary bus 00) and could have a secondary bus of 03 (since 02 is
>already consumed by the PCIe-PCI bridge).
Hmm... I am confused why is 03. 02 is used but 01 is not used.
Switch should be configured after PCIe2PCI bridge?
>
>The bridges associated with the downstream ports are all logically on
>bus 03.  Their primary bus number would be 03; they might be 03:00.0,
>03:01.0, 03:02.0, etc.  Each would have its own secondary bus number,
>for example 04, 05, 06.  That secondary bus number is for the
>downstream link from the corresponding downstream port.
Hmm, as you mentioned in previous letter, PCIe is an point-to-point
protocol, then the secondary bus should reside in the Switch?
Do you think my Bus#4 is correct?
>
>The endpoints below the PCIe switch could then be 04:00.0 and 05:00.0
>(or these could be the upstream ports of more PCIe switches).
So below the PCIe downstream port, there is only on PCIe device. 
The whole bus is occupied by this device?
That is why the device could have upto 256 functions?
>
>Bjorn

-- 
Richard Yang
Help you, Help me


  reply	other threads:[~2012-05-02  6:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-27  9:27 Does my understanding correct? Richard Yang
2012-04-27 14:10 ` Jiang Liu
2012-04-27 15:55   ` Bjorn Helgaas
2012-04-27 14:17 ` Bjorn Helgaas
2012-04-28  5:01   ` Richard Yang
2012-04-28  7:21     ` Richard Yang
2012-04-30 15:56     ` Bjorn Helgaas
2012-05-02  6:24       ` Richard Yang [this message]
2012-05-02 14:59         ` Bjorn Helgaas
2012-05-02 21:05           ` Don Dutile
2012-05-03  6:21           ` Richard Yang
2012-05-03 16:39             ` Bjorn Helgaas
2012-05-04  2:11               ` Richard Yang
2012-05-06 15:21               ` Richard Yang
2012-05-07  3:00               ` Richard Yang
2012-04-28  8:21   ` Richard Yang

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=20120502062443.GB24172@richard \
    --to=weiyang@linux.vnet.ibm.com \
    --cc=bhelgaas@google.com \
    --cc=linux-pci@vger.kernel.org \
    /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).