All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PCI: tegra: Fix host initialization during resume
@ 2021-05-04 17:21 Vidya Sagar
  2021-05-06  8:49 ` Jon Hunter
  2021-06-03 14:21 ` Lorenzo Pieralisi
  0 siblings, 2 replies; 7+ messages in thread
From: Vidya Sagar @ 2021-05-04 17:21 UTC (permalink / raw)
  To: lorenzo.pieralisi, robh, bhelgaas, thierry.reding, jonathanh,
	jingoohan1, gustavo.pimentel
  Cc: linux-pci, linux-tegra, linux-kernel, kthota, mmaddireddy,
	vidyas, sagar.tv

Commit 275e88b06a27 ("PCI: tegra: Fix host link initialization") broke
host initialization during resume as it misses out calling the API
dw_pcie_setup_rc() which is required for host and MSI initialization.

Fixes: 275e88b06a27 ("PCI: tegra: Fix host link initialization")
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
---
 drivers/pci/controller/dwc/pcie-tegra194.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c
index 6fa216e52d14..4c3c0738f2e6 100644
--- a/drivers/pci/controller/dwc/pcie-tegra194.c
+++ b/drivers/pci/controller/dwc/pcie-tegra194.c
@@ -2214,6 +2214,8 @@ static int tegra_pcie_dw_resume_noirq(struct device *dev)
 		goto fail_host_init;
 	}
 
+	dw_pcie_setup_rc(&pcie->pci.pp);
+
 	ret = tegra_pcie_dw_start_link(&pcie->pci);
 	if (ret < 0)
 		goto fail_host_init;
-- 
2.17.1


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

* Re: [PATCH] PCI: tegra: Fix host initialization during resume
  2021-05-04 17:21 [PATCH] PCI: tegra: Fix host initialization during resume Vidya Sagar
@ 2021-05-06  8:49 ` Jon Hunter
  2021-05-17 14:11   ` Jon Hunter
  2021-06-03 14:21 ` Lorenzo Pieralisi
  1 sibling, 1 reply; 7+ messages in thread
From: Jon Hunter @ 2021-05-06  8:49 UTC (permalink / raw)
  To: Vidya Sagar, lorenzo.pieralisi, robh, bhelgaas, thierry.reding,
	jingoohan1, gustavo.pimentel
  Cc: linux-pci, linux-tegra, linux-kernel, kthota, mmaddireddy, sagar.tv


On 04/05/2021 18:21, Vidya Sagar wrote:
> Commit 275e88b06a27 ("PCI: tegra: Fix host link initialization") broke
> host initialization during resume as it misses out calling the API
> dw_pcie_setup_rc() which is required for host and MSI initialization.
> 
> Fixes: 275e88b06a27 ("PCI: tegra: Fix host link initialization")
> Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
> ---
>  drivers/pci/controller/dwc/pcie-tegra194.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c
> index 6fa216e52d14..4c3c0738f2e6 100644
> --- a/drivers/pci/controller/dwc/pcie-tegra194.c
> +++ b/drivers/pci/controller/dwc/pcie-tegra194.c
> @@ -2214,6 +2214,8 @@ static int tegra_pcie_dw_resume_noirq(struct device *dev)
>  		goto fail_host_init;
>  	}
>  
> +	dw_pcie_setup_rc(&pcie->pci.pp);
> +
>  	ret = tegra_pcie_dw_start_link(&pcie->pci);
>  	if (ret < 0)
>  		goto fail_host_init;
> 


Thanks for fixing!

Tested-by: Jon Hunter <jonathanh@nvidia.com>

We should also mark this for stable so that this gets back-ported.

Jon

-- 
nvpublic

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

* Re: [PATCH] PCI: tegra: Fix host initialization during resume
  2021-05-06  8:49 ` Jon Hunter
@ 2021-05-17 14:11   ` Jon Hunter
  2021-05-17 16:18     ` Lorenzo Pieralisi
  0 siblings, 1 reply; 7+ messages in thread
From: Jon Hunter @ 2021-05-17 14:11 UTC (permalink / raw)
  To: Vidya Sagar, lorenzo.pieralisi, robh, bhelgaas, thierry.reding,
	jingoohan1, gustavo.pimentel
  Cc: linux-pci, linux-tegra, linux-kernel, kthota, mmaddireddy, sagar.tv

Hi Lorenzo, Bjorn,

On 06/05/2021 09:49, Jon Hunter wrote:
> 
> On 04/05/2021 18:21, Vidya Sagar wrote:
>> Commit 275e88b06a27 ("PCI: tegra: Fix host link initialization") broke
>> host initialization during resume as it misses out calling the API
>> dw_pcie_setup_rc() which is required for host and MSI initialization.
>>
>> Fixes: 275e88b06a27 ("PCI: tegra: Fix host link initialization")
>> Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
>> ---
>>  drivers/pci/controller/dwc/pcie-tegra194.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c
>> index 6fa216e52d14..4c3c0738f2e6 100644
>> --- a/drivers/pci/controller/dwc/pcie-tegra194.c
>> +++ b/drivers/pci/controller/dwc/pcie-tegra194.c
>> @@ -2214,6 +2214,8 @@ static int tegra_pcie_dw_resume_noirq(struct device *dev)
>>  		goto fail_host_init;
>>  	}
>>  
>> +	dw_pcie_setup_rc(&pcie->pci.pp);
>> +
>>  	ret = tegra_pcie_dw_start_link(&pcie->pci);
>>  	if (ret < 0)
>>  		goto fail_host_init;
>>
> 
> 
> Thanks for fixing!
> 
> Tested-by: Jon Hunter <jonathanh@nvidia.com>
> 
> We should also mark this for stable so that this gets back-ported.


Can we queue this as a fix for v5.13 and tag for stable?

Thanks!
Jon

-- 
nvpublic

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

* Re: [PATCH] PCI: tegra: Fix host initialization during resume
  2021-05-17 14:11   ` Jon Hunter
@ 2021-05-17 16:18     ` Lorenzo Pieralisi
  2021-05-17 16:47       ` Bjorn Helgaas
  0 siblings, 1 reply; 7+ messages in thread
From: Lorenzo Pieralisi @ 2021-05-17 16:18 UTC (permalink / raw)
  To: Jon Hunter
  Cc: Vidya Sagar, robh, bhelgaas, thierry.reding, jingoohan1,
	gustavo.pimentel, linux-pci, linux-tegra, linux-kernel, kthota,
	mmaddireddy, sagar.tv

On Mon, May 17, 2021 at 03:11:00PM +0100, Jon Hunter wrote:
> Hi Lorenzo, Bjorn,
> 
> On 06/05/2021 09:49, Jon Hunter wrote:
> > 
> > On 04/05/2021 18:21, Vidya Sagar wrote:
> >> Commit 275e88b06a27 ("PCI: tegra: Fix host link initialization") broke
> >> host initialization during resume as it misses out calling the API
> >> dw_pcie_setup_rc() which is required for host and MSI initialization.
> >>
> >> Fixes: 275e88b06a27 ("PCI: tegra: Fix host link initialization")
> >> Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
> >> ---
> >>  drivers/pci/controller/dwc/pcie-tegra194.c | 2 ++
> >>  1 file changed, 2 insertions(+)
> >>
> >> diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c
> >> index 6fa216e52d14..4c3c0738f2e6 100644
> >> --- a/drivers/pci/controller/dwc/pcie-tegra194.c
> >> +++ b/drivers/pci/controller/dwc/pcie-tegra194.c
> >> @@ -2214,6 +2214,8 @@ static int tegra_pcie_dw_resume_noirq(struct device *dev)
> >>  		goto fail_host_init;
> >>  	}
> >>  
> >> +	dw_pcie_setup_rc(&pcie->pci.pp);
> >> +
> >>  	ret = tegra_pcie_dw_start_link(&pcie->pci);
> >>  	if (ret < 0)
> >>  		goto fail_host_init;
> >>
> > 
> > 
> > Thanks for fixing!
> > 
> > Tested-by: Jon Hunter <jonathanh@nvidia.com>
> > 
> > We should also mark this for stable so that this gets back-ported.
> 
> 
> Can we queue this as a fix for v5.13 and tag for stable?

We usually send fixes for -rc* when the patches they are fixing
were merged in the current cycle (ie merged for v5.13).

This is not the case so I shall send it for v5.14.

Lorenzo

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

* Re: [PATCH] PCI: tegra: Fix host initialization during resume
  2021-05-17 16:18     ` Lorenzo Pieralisi
@ 2021-05-17 16:47       ` Bjorn Helgaas
  2021-05-17 17:41         ` Jon Hunter
  0 siblings, 1 reply; 7+ messages in thread
From: Bjorn Helgaas @ 2021-05-17 16:47 UTC (permalink / raw)
  To: Lorenzo Pieralisi
  Cc: Jon Hunter, Vidya Sagar, robh, bhelgaas, thierry.reding,
	jingoohan1, gustavo.pimentel, linux-pci, linux-tegra,
	linux-kernel, kthota, mmaddireddy, sagar.tv

On Mon, May 17, 2021 at 05:18:36PM +0100, Lorenzo Pieralisi wrote:
> On Mon, May 17, 2021 at 03:11:00PM +0100, Jon Hunter wrote:
> > Hi Lorenzo, Bjorn,
> > 
> > On 06/05/2021 09:49, Jon Hunter wrote:
> > > 
> > > On 04/05/2021 18:21, Vidya Sagar wrote:
> > >> Commit 275e88b06a27 ("PCI: tegra: Fix host link initialization") broke
> > >> host initialization during resume as it misses out calling the API
> > >> dw_pcie_setup_rc() which is required for host and MSI initialization.
> > >>
> > >> Fixes: 275e88b06a27 ("PCI: tegra: Fix host link initialization")
> > >> Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
> > >> ---
> > >>  drivers/pci/controller/dwc/pcie-tegra194.c | 2 ++
> > >>  1 file changed, 2 insertions(+)
> > >>
> > >> diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c
> > >> index 6fa216e52d14..4c3c0738f2e6 100644
> > >> --- a/drivers/pci/controller/dwc/pcie-tegra194.c
> > >> +++ b/drivers/pci/controller/dwc/pcie-tegra194.c
> > >> @@ -2214,6 +2214,8 @@ static int tegra_pcie_dw_resume_noirq(struct device *dev)
> > >>  		goto fail_host_init;
> > >>  	}
> > >>  
> > >> +	dw_pcie_setup_rc(&pcie->pci.pp);
> > >> +
> > >>  	ret = tegra_pcie_dw_start_link(&pcie->pci);
> > >>  	if (ret < 0)
> > >>  		goto fail_host_init;
> > > 
> > > Thanks for fixing!
> > > 
> > > Tested-by: Jon Hunter <jonathanh@nvidia.com>
> > > 
> > > We should also mark this for stable so that this gets back-ported.
> > 
> > Can we queue this as a fix for v5.13 and tag for stable?
> 
> We usually send fixes for -rc* when the patches they are fixing
> were merged in the current cycle (ie merged for v5.13).

Looks like this has been broken since v5.11-rc1 (December 27, 2020),
when 275e88b06a27 was merged.  Probably would be worth an occasional
boot test to make sure things stay working.

> This is not the case so I shall send it for v5.14.
> 
> Lorenzo

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

* Re: [PATCH] PCI: tegra: Fix host initialization during resume
  2021-05-17 16:47       ` Bjorn Helgaas
@ 2021-05-17 17:41         ` Jon Hunter
  0 siblings, 0 replies; 7+ messages in thread
From: Jon Hunter @ 2021-05-17 17:41 UTC (permalink / raw)
  To: Bjorn Helgaas, Lorenzo Pieralisi
  Cc: Vidya Sagar, robh, bhelgaas, thierry.reding, jingoohan1,
	gustavo.pimentel, linux-pci, linux-tegra, linux-kernel, kthota,
	mmaddireddy, sagar.tv


On 17/05/2021 17:47, Bjorn Helgaas wrote:
> On Mon, May 17, 2021 at 05:18:36PM +0100, Lorenzo Pieralisi wrote:
>> On Mon, May 17, 2021 at 03:11:00PM +0100, Jon Hunter wrote:
>>> Hi Lorenzo, Bjorn,
>>>
>>> On 06/05/2021 09:49, Jon Hunter wrote:
>>>>
>>>> On 04/05/2021 18:21, Vidya Sagar wrote:
>>>>> Commit 275e88b06a27 ("PCI: tegra: Fix host link initialization") broke
>>>>> host initialization during resume as it misses out calling the API
>>>>> dw_pcie_setup_rc() which is required for host and MSI initialization.
>>>>>
>>>>> Fixes: 275e88b06a27 ("PCI: tegra: Fix host link initialization")
>>>>> Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
>>>>> ---
>>>>>  drivers/pci/controller/dwc/pcie-tegra194.c | 2 ++
>>>>>  1 file changed, 2 insertions(+)
>>>>>
>>>>> diff --git a/drivers/pci/controller/dwc/pcie-tegra194.c b/drivers/pci/controller/dwc/pcie-tegra194.c
>>>>> index 6fa216e52d14..4c3c0738f2e6 100644
>>>>> --- a/drivers/pci/controller/dwc/pcie-tegra194.c
>>>>> +++ b/drivers/pci/controller/dwc/pcie-tegra194.c
>>>>> @@ -2214,6 +2214,8 @@ static int tegra_pcie_dw_resume_noirq(struct device *dev)
>>>>>  		goto fail_host_init;
>>>>>  	}
>>>>>  
>>>>> +	dw_pcie_setup_rc(&pcie->pci.pp);
>>>>> +
>>>>>  	ret = tegra_pcie_dw_start_link(&pcie->pci);
>>>>>  	if (ret < 0)
>>>>>  		goto fail_host_init;
>>>>
>>>> Thanks for fixing!
>>>>
>>>> Tested-by: Jon Hunter <jonathanh@nvidia.com>
>>>>
>>>> We should also mark this for stable so that this gets back-ported.
>>>
>>> Can we queue this as a fix for v5.13 and tag for stable?
>>
>> We usually send fixes for -rc* when the patches they are fixing
>> were merged in the current cycle (ie merged for v5.13).
> 
> Looks like this has been broken since v5.11-rc1 (December 27, 2020),
> when 275e88b06a27 was merged.  Probably would be worth an occasional
> boot test to make sure things stay working.


Yes exactly it has been broken for a while and unfortunately went unnoticed.

We do boot test -next, mainline and the various stable branches on our
Tegra boards daily. The boot test did not catch this, but there is a
error generated when resuming from suspend and I am working to ensure we
catch such errors when resuming from suspend.

Cheers
Jon

-- 
nvpublic

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

* Re: [PATCH] PCI: tegra: Fix host initialization during resume
  2021-05-04 17:21 [PATCH] PCI: tegra: Fix host initialization during resume Vidya Sagar
  2021-05-06  8:49 ` Jon Hunter
@ 2021-06-03 14:21 ` Lorenzo Pieralisi
  1 sibling, 0 replies; 7+ messages in thread
From: Lorenzo Pieralisi @ 2021-06-03 14:21 UTC (permalink / raw)
  To: robh, jonathanh, Vidya Sagar, bhelgaas, gustavo.pimentel,
	jingoohan1, thierry.reding
  Cc: Lorenzo Pieralisi, linux-kernel, mmaddireddy, sagar.tv,
	linux-pci, kthota, linux-tegra

On Tue, 4 May 2021 22:51:57 +0530, Vidya Sagar wrote:
> Commit 275e88b06a27 ("PCI: tegra: Fix host link initialization") broke
> host initialization during resume as it misses out calling the API
> dw_pcie_setup_rc() which is required for host and MSI initialization.

Applied to pci/tegra, thanks!

[1/1] PCI: tegra: Fix host initialization during resume
      https://git.kernel.org/lpieralisi/pci/c/d0180ba464

Thanks,
Lorenzo

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

end of thread, other threads:[~2021-06-03 14:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-04 17:21 [PATCH] PCI: tegra: Fix host initialization during resume Vidya Sagar
2021-05-06  8:49 ` Jon Hunter
2021-05-17 14:11   ` Jon Hunter
2021-05-17 16:18     ` Lorenzo Pieralisi
2021-05-17 16:47       ` Bjorn Helgaas
2021-05-17 17:41         ` Jon Hunter
2021-06-03 14:21 ` Lorenzo Pieralisi

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.