All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Dooks <ben.dooks@codethink.co.uk>
To: "Maciej W. Rozycki" <macro@orcam.me.uk>,
	Bjorn Helgaas <helgaas@kernel.org>
Cc: paul.walmsley@sifive.com, greentime.hu@sifive.com,
	lorenzo.pieralisi@arm.com, robh@kernel.org, kw@linux.com,
	bhelgaas@google.com, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org
Subject: Re: [PATCHv4 2/2] PCI: fu740: Force gen1 for initial device probe
Date: Mon, 28 Feb 2022 23:15:39 +0000	[thread overview]
Message-ID: <023a2015-cf04-9673-8e8a-88fe88ee085e@codethink.co.uk> (raw)
In-Reply-To: <alpine.DEB.2.21.2202232100220.27002@angie.orcam.me.uk>

On 23/02/2022 21:19, Maciej W. Rozycki wrote:
> On Wed, 23 Feb 2022, Bjorn Helgaas wrote:
> 
>>> +	dw_pcie_dbi_ro_wr_dis(dw);
>>> +}
>>> +
>>>   static int fu740_pcie_start_link(struct dw_pcie *pci)
>>>   {
>>>   	struct device *dev = pci->dev;
>>>   	struct fu740_pcie *afp = dev_get_drvdata(dev);
>>>   
>>> +	/* Force PCIe gen1 otherwise Unmatched board does not probe */
>>> +	fu740_pcie_force_gen1(pci, afp);
>>
>> I guess the "Unmatched" board is the only thing we need to care about
>> here?  Are there or will there be other boards that don't need this?
> 
>   I wonder if this is the other side of a supposed erratum observed here:
> 
> <https://lore.kernel.org/all/alpine.DEB.2.21.2202010240190.58572@angie.orcam.me.uk/>
> 
> Downstream there's the same ASMedia ASM2824 PCIe switch whose downstream
> ports don't want to train with a Pericom part above Gen1.
> 
>   Of course we don't know an ASM2824 is there until we have successfully
> negotiated the link, so we may have to generalise my proposal if we can
> find a way similar to what I have done for U-boot that does not disturb
> Linux's operation.  This is because there are PCIe option cards out there
> with the ASM2824 onboard, so it could be possible for the problem to
> trigger anywhere where the conditions for the erratum are met.
> 
>   Also in that case retraining should work with the cap removed to get a
> higher final speed just as with the Pericom part.

Possibly. I have just been working on a patch to better force Gen1
speeds and then restore the config which is working on my Unmatched
board.


-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

https://www.codethink.co.uk/privacy.html

WARNING: multiple messages have this Message-ID (diff)
From: Ben Dooks <ben.dooks@codethink.co.uk>
To: "Maciej W. Rozycki" <macro@orcam.me.uk>,
	Bjorn Helgaas <helgaas@kernel.org>
Cc: paul.walmsley@sifive.com, greentime.hu@sifive.com,
	lorenzo.pieralisi@arm.com, robh@kernel.org, kw@linux.com,
	bhelgaas@google.com, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org
Subject: Re: [PATCHv4 2/2] PCI: fu740: Force gen1 for initial device probe
Date: Mon, 28 Feb 2022 23:15:39 +0000	[thread overview]
Message-ID: <023a2015-cf04-9673-8e8a-88fe88ee085e@codethink.co.uk> (raw)
In-Reply-To: <alpine.DEB.2.21.2202232100220.27002@angie.orcam.me.uk>

On 23/02/2022 21:19, Maciej W. Rozycki wrote:
> On Wed, 23 Feb 2022, Bjorn Helgaas wrote:
> 
>>> +	dw_pcie_dbi_ro_wr_dis(dw);
>>> +}
>>> +
>>>   static int fu740_pcie_start_link(struct dw_pcie *pci)
>>>   {
>>>   	struct device *dev = pci->dev;
>>>   	struct fu740_pcie *afp = dev_get_drvdata(dev);
>>>   
>>> +	/* Force PCIe gen1 otherwise Unmatched board does not probe */
>>> +	fu740_pcie_force_gen1(pci, afp);
>>
>> I guess the "Unmatched" board is the only thing we need to care about
>> here?  Are there or will there be other boards that don't need this?
> 
>   I wonder if this is the other side of a supposed erratum observed here:
> 
> <https://lore.kernel.org/all/alpine.DEB.2.21.2202010240190.58572@angie.orcam.me.uk/>
> 
> Downstream there's the same ASMedia ASM2824 PCIe switch whose downstream
> ports don't want to train with a Pericom part above Gen1.
> 
>   Of course we don't know an ASM2824 is there until we have successfully
> negotiated the link, so we may have to generalise my proposal if we can
> find a way similar to what I have done for U-boot that does not disturb
> Linux's operation.  This is because there are PCIe option cards out there
> with the ASM2824 onboard, so it could be possible for the problem to
> trigger anywhere where the conditions for the erratum are met.
> 
>   Also in that case retraining should work with the cap removed to get a
> higher final speed just as with the Pericom part.

Possibly. I have just been working on a patch to better force Gen1
speeds and then restore the config which is working on my Unmatched
board.


-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

https://www.codethink.co.uk/privacy.html

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2022-02-28 23:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-21 21:03 [PATCHv4 1/2] PCI: fu740: fix finding GPIOs Ben Dooks
2022-02-21 21:03 ` Ben Dooks
2022-02-21 21:03 ` [PATCHv4 2/2] PCI: fu740: Force gen1 for initial device probe Ben Dooks
2022-02-21 21:03   ` Ben Dooks
2022-02-23 20:51   ` Bjorn Helgaas
2022-02-23 20:51     ` Bjorn Helgaas
2022-02-23 21:19     ` Maciej W. Rozycki
2022-02-23 21:19       ` Maciej W. Rozycki
2022-02-28 23:15       ` Ben Dooks [this message]
2022-02-28 23:15         ` Ben Dooks
2022-02-28 17:45     ` Ben Dooks
2022-02-28 17:45       ` Ben Dooks
2022-02-23 20:51 ` [PATCHv4 1/2] PCI: fu740: fix finding GPIOs Bjorn Helgaas
2022-02-23 20:51   ` 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=023a2015-cf04-9673-8e8a-88fe88ee085e@codethink.co.uk \
    --to=ben.dooks@codethink.co.uk \
    --cc=bhelgaas@google.com \
    --cc=greentime.hu@sifive.com \
    --cc=helgaas@kernel.org \
    --cc=kw@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=macro@orcam.me.uk \
    --cc=paul.walmsley@sifive.com \
    --cc=robh@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.