All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: "Pali Rohár" <pali@kernel.org>,
	"Konstantin Porotchkin" <kostap@marvell.com>
Cc: "Marek Behún" <marek.behun@nic.cz>, u-boot@lists.denx.de
Subject: Re: [PATCH v2 1/7] arm: a37xx: pci: Don't put link into LTSSM Recovery state during probe
Date: Fri, 4 Jun 2021 15:12:21 +0200	[thread overview]
Message-ID: <bb0facfd-7a1b-2de4-d1c5-3d523b752d65@denx.de> (raw)
In-Reply-To: <20210526155940.26141-1-pali@kernel.org>

On 26.05.21 17:59, Pali Rohár wrote:
> During our debugging of the Aardvark driver in Linux we have discovered
> that the PCIE_CORE_LINK_CTRL_STAT_REG register in fact controls standard
> PCIe Link Control Register for PCIe Root Bridge. This led us to discover
> that the name of the PCIE_CORE_LINK_TRAINING macro and the corresponding
> comment by this macro's usage is misleading; this bit in fact controls
> Retrain Link, which, according to PCIe base spec is defined as:
> 
>    A write of 1b to this bit initiates Link retraining by directing the
>    Physical Layer LTSSM to the Recovery state. If the LTSSM is already in
>    Recovery or Configuration, re-entering Recovery is permitted but not
>    required.
> 
> Entering Recovery state is normally done from LTSSM L0, L0s and L1 states.
> But since the pci-aardvark.c driver enables Link Training just a few lines
> above, the controller is not in L0 ready state yet. So setting aardvark bit
> PCIE_CORE_LINK_TRAINING does not actually enter Recovery state at this
> place.
> 
> Moreover, trying to enter LTSSM Recovery state without other configuration
> is causing issues for some cards (e.g. Atheros AR9xxx and QCA9xxx). Since
> Recovery state is not entered, these issues are not triggered.
> 
> Remove code which tries to enter LTSSM Recovery state completely.
> 
> Signed-off-by: Pali Rohár <pali@kernel.org>
> Reviewed-by: Marek Behún <marek.behun@nic.cz>

Complete series:

Applied to u-boot-marvell/master

Thanks,
Stefan

> ---
>   drivers/pci/pci-aardvark.c | 5 -----
>   1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/pci/pci-aardvark.c b/drivers/pci/pci-aardvark.c
> index c43d4f309b19..06c567e236f9 100644
> --- a/drivers/pci/pci-aardvark.c
> +++ b/drivers/pci/pci-aardvark.c
> @@ -613,11 +613,6 @@ static int pcie_advk_setup_hw(struct pcie_advk *pcie)
>   	reg |= PIO_CTRL_ADDR_WIN_DISABLE;
>   	advk_writel(pcie, reg, PIO_CTRL);
>   
> -	/* Start link training */
> -	reg = advk_readl(pcie, PCIE_CORE_LINK_CTRL_STAT_REG);
> -	reg |= PCIE_CORE_LINK_TRAINING;
> -	advk_writel(pcie, reg, PCIE_CORE_LINK_CTRL_STAT_REG);
> -
>   	/* Wait for PCIe link up */
>   	if (pcie_advk_wait_for_link(pcie))
>   		return -ENXIO;
> 


Viele Grüße,
Stefan

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: sr@denx.de

      parent reply	other threads:[~2021-06-04 13:12 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-17  6:39 [PATCH 1/6] arm: a37xx: pci: Don't put link into LTSSM Recovery state during probe Pali Rohár
2021-05-17  6:39 ` [PATCH 2/6] arm: a37xx: pci: Disable bus mastering when unloading driver Pali Rohár
2021-05-17  6:39 ` [PATCH 3/6] arm: a37xx: pci: Fix DT compatible string to Linux' DT compatible Pali Rohár
2021-05-17  6:39 ` [PATCH 4/6] arm: a37xx: pci: Find PCIe controller node by compatible instead of path Pali Rohár
2021-05-17  6:39 ` [PATCH 5/6] arm: a37xx: pci: Fix a3700_fdt_fix_pcie_regions() function Pali Rohár
2021-05-17  6:39 ` [PATCH 6/6] arm: a37xx: pci: Increase PCIe MEM size from 16 MiB to 128 MiB - 64 KiB Pali Rohár
2021-05-24  7:20   ` Pali Rohár
2021-05-26 15:59 ` [PATCH v2 1/7] arm: a37xx: pci: Don't put link into LTSSM Recovery state during probe Pali Rohár
2021-05-26 15:59   ` [PATCH v2 2/7] arm: a37xx: pci: Disable bus mastering when unloading driver Pali Rohár
2021-05-27  6:20     ` Stefan Roese
2021-05-26 15:59   ` [PATCH v2 3/7] arm: a37xx: pci: Fix DT compatible string to Linux' DT compatible Pali Rohár
2021-05-27  6:20     ` Stefan Roese
2021-05-26 15:59   ` [PATCH v2 4/7] arm: a37xx: pci: Find PCIe controller node by compatible instead of path Pali Rohár
2021-05-27  6:21     ` Stefan Roese
2021-05-26 15:59   ` [PATCH v2 5/7] arm: a37xx: pci: Fix a3700_fdt_fix_pcie_regions() function Pali Rohár
2021-05-27  6:22     ` Stefan Roese
2021-05-26 15:59   ` [PATCH v2 6/7] arm: a37xx: pci: Increase PCIe MEM size from 16 MiB to 127 MiB Pali Rohár
2021-05-27  6:23     ` Stefan Roese
2021-05-26 15:59   ` [PATCH v2 7/7] arm: a37xx: pci: Fix configuring PCIe resources Pali Rohár
2021-05-27  6:24     ` Stefan Roese
2021-05-27  6:19   ` [PATCH v2 1/7] arm: a37xx: pci: Don't put link into LTSSM Recovery state during probe Stefan Roese
2021-06-01 12:57     ` Pali Rohár
2021-06-02  5:12       ` Stefan Roese
2021-06-02 12:42         ` Marek Behún
2021-06-04  9:28           ` Stefan Roese
2021-06-04 13:12   ` Stefan Roese [this message]

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=bb0facfd-7a1b-2de4-d1c5-3d523b752d65@denx.de \
    --to=sr@denx.de \
    --cc=kostap@marvell.com \
    --cc=marek.behun@nic.cz \
    --cc=pali@kernel.org \
    --cc=u-boot@lists.denx.de \
    /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.