linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: marex@denx.de (Marek Vasut)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 1/1] pci-imx6: add speed change timeout message
Date: Fri, 22 May 2015 01:31:23 +0200	[thread overview]
Message-ID: <201505220131.23825.marex@denx.de> (raw)
In-Reply-To: <555E6795.6090009@boundarydevices.com>

On Friday, May 22, 2015 at 01:17:41 AM, Troy Kisky wrote:
> On 5/21/2015 2:19 PM, Marek Vasut wrote:
> > On Thursday, May 21, 2015 at 08:35:45 PM, Troy Kisky wrote:
> >> Currently, the timeout is never detected as count
> >> has a value of -1 if a timeout happens, but the code is checking
> >> for 0.
> >> 
> >> Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
> >> 
> >> ---
> >> 
> >> This patch breaks pcie for imx6sx as my board always times out.
> >> So, if someone could check this on an imx6sx I'd appreciate it.
> >> 
> >> Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
> >> ---
> >> 
> >>  drivers/pci/host/pci-imx6.c | 18 ++++++++++--------
> >>  1 file changed, 10 insertions(+), 8 deletions(-)
> >> 
> >> diff --git a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c
> >> index fdb9536..51be92c 100644
> >> --- a/drivers/pci/host/pci-imx6.c
> >> +++ b/drivers/pci/host/pci-imx6.c
> >> @@ -398,20 +398,22 @@ static int imx6_pcie_start_link(struct pcie_port
> >> *pp)
> >> 
> >>  	writel(tmp, pp->dbi_base + PCIE_LINK_WIDTH_SPEED_CONTROL);
> >>  	
> >>  	count = 200;
> >> 
> >> -	while (count--) {
> > 
> > Uh, wouldn't "while (--count)" fix this as well, with a smaller patch?
> > 
> > Best regards,
> > Marek Vasut
> 
> Yes, but you'd have an unnecessary usleep_range (no check for finished
> after it) if a timeout happens.

Oki, then I'll wait for Fabio to ACK this and that'd be it :)

Thanks!

Best regards,
Marek Vasut

  reply	other threads:[~2015-05-21 23:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-21 18:35 [RFC PATCH 1/1] pci-imx6: add speed change timeout message Troy Kisky
2015-05-21 21:19 ` Marek Vasut
2015-05-21 23:17   ` Troy Kisky
2015-05-21 23:31     ` Marek Vasut [this message]
2015-05-22 17:43       ` Troy Kisky
2015-05-22 18:02         ` Fabio Estevam
2015-05-22 19:52           ` Troy Kisky
2015-05-22 20:18             ` Fabio Estevam

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=201505220131.23825.marex@denx.de \
    --to=marex@denx.de \
    --cc=linux-arm-kernel@lists.infradead.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).