From: Bjorn Helgaas <helgaas@kernel.org>
To: "Yong, Jonathan" <jonathan.yong@intel.com>
Cc: linux-pci@vger.kernel.org, bhelgaas@google.com
Subject: Re: [PATCH] PCI: PTM preliminary implementation
Date: Tue, 15 Mar 2016 08:36:05 -0500 [thread overview]
Message-ID: <20160315133605.GA19974@localhost> (raw)
In-Reply-To: <56E7C771.6060700@intel.com>
On Tue, Mar 15, 2016 at 04:27:29PM +0800, Yong, Jonathan wrote:
> On 03/14/2016 23:42, Bjorn Helgaas wrote:
> >
> >The nomenclature is confusing, but I think you're reading this
> >backwards. An Upstream Port is on the downstream end of a Link. The
> >"Upstream" definition in the PCIe spec "Terms and Acronyms" section
> >says:
> >
> > The Port on a Switch that is closest topologically to the Root Complex
> > is the Upstream Port. The Port on a component that contains only
> > Endpoint or Bridge Functions is an Upstream Port.
> >
> >I think the spec is saying that PTM must be enabled in a bridge before
> >it is enabled in any device downstream from the bridge.
> >
>
> Thanks for the explanation, looks like back to the drawing board. Do
> you recommend using pci_walk_bus on all potential PTM masters?
No, I try to avoid using pci_walk_bus(). I would try something like this
in the pci_init_capabilities() path:
pci_ptm_init(struct pci_dev *dev)
{
if (!pci_find_ext_capability(dev, PCI_EXT_CAP_ID_PTM))
return;
type = pci_pcie_type(dev);
if (type == PCI_EXP_TYPE_ENDPOINT || type == PCI_EXP_TYPE_RC_END) {
if (pci_upstream_bridge(dev)->ptm_enabled)
enable_ptm(dev);
return;
}
if (type == PCI_EXP_TYPE_DOWNSTREAM) {
dev->ptm_enabled = pci_upstream_bridge(dev)->ptm_enabled;
return;
}
enable_ptm(dev);
dev_info(&dev->dev, "PTM enabled, root, granularity, etc...")
}
I've only skimmed the PTM spec, so this is just a brief and incomplete
sketch.
Bjorn
next prev parent reply other threads:[~2016-03-15 13:36 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-11 7:26 [RFC] PCI: PTM Driver Yong, Jonathan
2016-03-11 7:26 ` [PATCH] PCI: PTM preliminary implementation Yong, Jonathan
2016-03-11 15:53 ` Bjorn Helgaas
2016-03-14 7:44 ` Yong, Jonathan
2016-03-14 15:42 ` Bjorn Helgaas
2016-03-15 8:27 ` Yong, Jonathan
2016-03-15 13:36 ` Bjorn Helgaas [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-04-19 6:29 [RFC v4] PCI: PTM Driver Yong, Jonathan
2016-04-19 6:29 ` [PATCH] PCI: PTM preliminary implementation Yong, Jonathan
2016-04-29 16:20 ` Bjorn Helgaas
2016-04-30 12:19 ` Bjorn Helgaas
2016-05-10 3:52 ` Yong, Jonathan
2016-05-08 2:38 ` Bjorn Helgaas
2016-05-09 3:11 ` Yong, Jonathan
2016-05-09 13:35 ` Bjorn Helgaas
2016-04-19 6:24 [RFC v4] PCI: PTM Driver Yong, Jonathan
2016-04-19 6:24 ` [PATCH] PCI: PTM preliminary implementation Yong, Jonathan
2016-03-23 4:04 [RFC v3] PCI: PTM Driver Yong, Jonathan
2016-03-23 4:04 ` [PATCH] PCI: PTM preliminary implementation Yong, Jonathan
2016-04-12 4:23 ` Bjorn Helgaas
2016-04-12 4:48 ` Bjorn Helgaas
2016-03-23 2:47 [RFC v2] PCI: PTM Driver Yong, Jonathan
2016-03-23 2:47 ` [PATCH] PCI: PTM preliminary implementation Yong, Jonathan
2016-03-23 3:11 ` kbuild test robot
2016-03-23 3:57 ` kbuild test robot
2016-02-29 7:29 [RFC] PCI: PTM Driver Yong, Jonathan
2016-02-29 7:29 ` [PATCH] PCI: PTM preliminary implementation Yong, Jonathan
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=20160315133605.GA19974@localhost \
--to=helgaas@kernel.org \
--cc=bhelgaas@google.com \
--cc=jonathan.yong@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.