linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] PCI: keystone: Fix link training retries initiation
@ 2019-12-17 11:38 Yurii Monakov
  2019-12-17 11:59 ` Andrew Murray
  2020-01-10 17:31 ` Lorenzo Pieralisi
  0 siblings, 2 replies; 3+ messages in thread
From: Yurii Monakov @ 2019-12-17 11:38 UTC (permalink / raw)
  To: linux-pci; +Cc: stable, andrew.murray, m-karicheri2

ks_pcie_stop_link() function does not clear LTSSM_EN_VAL bit so
link training was not triggered more than once after startup.
In configurations where link can be unstable during early boot,
for example, under low temperature, it will never be established.

Fixes: 0c4ffcfe1fbc ("PCI: keystone: Add TI Keystone PCIe driver")
Signed-off-by: Yurii Monakov <monakov.y@gmail.com>
CC:stable@vger.kernel.org
---
 drivers/pci/controller/dwc/pci-keystone.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/controller/dwc/pci-keystone.c
index af677254a072..d4de4f6cff8b 100644
--- a/drivers/pci/controller/dwc/pci-keystone.c
+++ b/drivers/pci/controller/dwc/pci-keystone.c
@@ -510,7 +510,7 @@ static void ks_pcie_stop_link(struct dw_pcie *pci)
 	/* Disable Link training */
 	val = ks_pcie_app_readl(ks_pcie, CMD_STATUS);
 	val &= ~LTSSM_EN_VAL;
-	ks_pcie_app_writel(ks_pcie, CMD_STATUS, LTSSM_EN_VAL | val);
+	ks_pcie_app_writel(ks_pcie, CMD_STATUS, val);
 }
 
 static int ks_pcie_start_link(struct dw_pcie *pci)
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] PCI: keystone: Fix link training retries initiation
  2019-12-17 11:38 [PATCH v2] PCI: keystone: Fix link training retries initiation Yurii Monakov
@ 2019-12-17 11:59 ` Andrew Murray
  2020-01-10 17:31 ` Lorenzo Pieralisi
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Murray @ 2019-12-17 11:59 UTC (permalink / raw)
  To: Yurii Monakov; +Cc: linux-pci, stable, m-karicheri2

On Tue, Dec 17, 2019 at 02:38:36PM +0300, Yurii Monakov wrote:
> ks_pcie_stop_link() function does not clear LTSSM_EN_VAL bit so
> link training was not triggered more than once after startup.
> In configurations where link can be unstable during early boot,
> for example, under low temperature, it will never be established.
> 
> Fixes: 0c4ffcfe1fbc ("PCI: keystone: Add TI Keystone PCIe driver")
> Signed-off-by: Yurii Monakov <monakov.y@gmail.com>
> CC:stable@vger.kernel.org
> ---
>  drivers/pci/controller/dwc/pci-keystone.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/controller/dwc/pci-keystone.c
> index af677254a072..d4de4f6cff8b 100644
> --- a/drivers/pci/controller/dwc/pci-keystone.c
> +++ b/drivers/pci/controller/dwc/pci-keystone.c
> @@ -510,7 +510,7 @@ static void ks_pcie_stop_link(struct dw_pcie *pci)
>  	/* Disable Link training */
>  	val = ks_pcie_app_readl(ks_pcie, CMD_STATUS);
>  	val &= ~LTSSM_EN_VAL;
> -	ks_pcie_app_writel(ks_pcie, CMD_STATUS, LTSSM_EN_VAL | val);
> +	ks_pcie_app_writel(ks_pcie, CMD_STATUS, val);

Looks great, thanks for respinning this.

Acked-by: Andrew Murray <andrew.murray@arm.com>

Thanks,

Andrew Murray

>  }
>  
>  static int ks_pcie_start_link(struct dw_pcie *pci)
> -- 
> 2.17.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] PCI: keystone: Fix link training retries initiation
  2019-12-17 11:38 [PATCH v2] PCI: keystone: Fix link training retries initiation Yurii Monakov
  2019-12-17 11:59 ` Andrew Murray
@ 2020-01-10 17:31 ` Lorenzo Pieralisi
  1 sibling, 0 replies; 3+ messages in thread
From: Lorenzo Pieralisi @ 2020-01-10 17:31 UTC (permalink / raw)
  To: Yurii Monakov; +Cc: linux-pci, stable, andrew.murray, m-karicheri2

On Tue, Dec 17, 2019 at 02:38:36PM +0300, Yurii Monakov wrote:
> ks_pcie_stop_link() function does not clear LTSSM_EN_VAL bit so
> link training was not triggered more than once after startup.
> In configurations where link can be unstable during early boot,
> for example, under low temperature, it will never be established.
> 
> Fixes: 0c4ffcfe1fbc ("PCI: keystone: Add TI Keystone PCIe driver")
> Signed-off-by: Yurii Monakov <monakov.y@gmail.com>
> CC:stable@vger.kernel.org
> ---
>  drivers/pci/controller/dwc/pci-keystone.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to pci/keystone, thanks.

Lorenzo

> diff --git a/drivers/pci/controller/dwc/pci-keystone.c b/drivers/pci/controller/dwc/pci-keystone.c
> index af677254a072..d4de4f6cff8b 100644
> --- a/drivers/pci/controller/dwc/pci-keystone.c
> +++ b/drivers/pci/controller/dwc/pci-keystone.c
> @@ -510,7 +510,7 @@ static void ks_pcie_stop_link(struct dw_pcie *pci)
>  	/* Disable Link training */
>  	val = ks_pcie_app_readl(ks_pcie, CMD_STATUS);
>  	val &= ~LTSSM_EN_VAL;
> -	ks_pcie_app_writel(ks_pcie, CMD_STATUS, LTSSM_EN_VAL | val);
> +	ks_pcie_app_writel(ks_pcie, CMD_STATUS, val);
>  }
>  
>  static int ks_pcie_start_link(struct dw_pcie *pci)
> -- 
> 2.17.1

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-01-10 17:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-17 11:38 [PATCH v2] PCI: keystone: Fix link training retries initiation Yurii Monakov
2019-12-17 11:59 ` Andrew Murray
2020-01-10 17:31 ` Lorenzo Pieralisi

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).