linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Brian Norris <briannorris@chromium.org>
To: Shawn Lin <shawn.lin@rock-chips.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	Jeffy Chen <jeffy.chen@rock-chips.com>,
	Wenrui Li <wenrui.li@rock-chips.com>,
	Heiko Stuebner <heiko@sntech.de>,
	linux-pci@vger.kernel.org, linux-rockchip@lists.infradead.org
Subject: Re: [PATCH] PCI: rockchip: Support quirk to disable 5 GT/s (PCIe 2.x) link rate
Date: Thu, 22 Sep 2016 18:15:19 -0700	[thread overview]
Message-ID: <20160923011518.GA97876@google.com> (raw)
In-Reply-To: <b9527acf-e3cf-19d2-b8fc-0a59637e9598@rock-chips.com>

Hi Shawn,

On Fri, Sep 23, 2016 at 08:27:35AM +0800, Shawn Lin wrote:
> 在 2016/9/23 1:31, Brian Norris 写道:
> >rk3399 supports PCIe 2.x link speeds marginally at best, and on some
> >boards, the link won't train at 5 GT/s at all. Rather than sacrifice 500
> >ms waiting for training that will never happen, let's support a device
> >tree quirk flag to disable generation 2 speeds entirely.
> 
> I was thinking about could we get target link speed [TLS] from the
> end-point when finishing Gen1 training, but it seems that the location
> of ep's TLS is not fixed.

Indeed it's not, but we could probably handle that if absolutely needed
(get a reference to the root port pci_dev somehow, then use the existing
helpers to walk children and get the computed ->pcie_cap offset). But
that's not the problem here; we have 5 GT/s devices, but they are not
running at 5 GT/s because link training can't pass. We have been told
there are still SI issues, and so you wouldn't really be able to turn
this out at runtime anyway.

But sure, I suppose that'd be a way to (for chips/boards that don't have
SI issues) determine whether or not to attempt gen2 training at all.
That does sound better than just timing out after 500ms...

> Anyway, your patch looks sane to me as we leave gen2 as default and
> people could drop that feature by adding rockchip,disable-gen2 to
> their dts if they are sure the board would never supoort Gen2 devices.
> 
> Acked-by: Shawn Lin <shawn.lin@rock-chips.com>

Thanks.

Brian

  reply	other threads:[~2016-09-23  1:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-22 17:31 [PATCH] PCI: rockchip: Support quirk to disable 5 GT/s (PCIe 2.x) link rate Brian Norris
2016-09-23  0:27 ` Shawn Lin
2016-09-23  1:15   ` Brian Norris [this message]
2016-09-23  1:34     ` Shawn Lin
2016-09-23 21:46 ` Rob Herring
2016-09-23 23:55 ` Bjorn Helgaas

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=20160923011518.GA97876@google.com \
    --to=briannorris@chromium.org \
    --cc=bhelgaas@google.com \
    --cc=devicetree@vger.kernel.org \
    --cc=heiko@sntech.de \
    --cc=jeffy.chen@rock-chips.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=shawn.lin@rock-chips.com \
    --cc=wenrui.li@rock-chips.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).