Skip to contentSkip to conversation

PCI: tegra: Fix host initialization during resume

PATCH Applied Vidya Sagar 4 participants 7 messages May 4, 2021 – Jun 3, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 PCI: tegra: Fix host initialization during resume

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")
---
 drivers/pci/controller/dwc/pcie-tegra194.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/pci/controller/dwc/pcie-tegra194.c +2 -0
index 6fa216e52d14..4c3c0738f2e6 100644
@@ -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;
Signature · 1 line
2.17.1
maintainer Tested-by on v1 1/1
#1 lore raw
Quoted 16 lines · Vidya Sagar

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")
---
 drivers/pci/controller/dwc/pcie-tegra194.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/pci/controller/dwc/pcie-tegra194.c +0 -0
index 6fa216e52d14..4c3c0738f2e6 100644

drivers/pci/controller/dwc/pcie-tegra194.c static int tegra_pcie_dw_resume_noirq(struct device *dev) · line 2221

Quoted 8 lines
drivers/pci/controller/dwc/pcie-tegra194.c +2 -0
@@ -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!

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

Jon

Signature · 1 line
nvpublic
maintainer
#2 lore raw

Hi Lorenzo, Bjorn,

Quoted 30 lines · Jon Hunter
Quoted 16 lines · Vidya Sagar

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")
---
 drivers/pci/controller/dwc/pcie-tegra194.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/pci/controller/dwc/pcie-tegra194.c +0 -0
index 6fa216e52d14..4c3c0738f2e6 100644

drivers/pci/controller/dwc/pcie-tegra194.c static int tegra_pcie_dw_resume_noirq(struct device *dev) · line 2221

Quoted 8 lines
drivers/pci/controller/dwc/pcie-tegra194.c +2 -0
@@ -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!

Quoted 3 lines

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

Signature · 1 line
nvpublic
#3 lore raw
Quoted 33 lines · Jon Hunter

Hi Lorenzo, Bjorn,

Quoted 30 lines · Jon Hunter
Quoted 16 lines · Vidya Sagar

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")
---
 drivers/pci/controller/dwc/pcie-tegra194.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/pci/controller/dwc/pcie-tegra194.c +0 -0
index 6fa216e52d14..4c3c0738f2e6 100644

drivers/pci/controller/dwc/pcie-tegra194.c static int tegra_pcie_dw_resume_noirq(struct device *dev) · line 2221

Quoted 8 lines
drivers/pci/controller/dwc/pcie-tegra194.c +2 -0
@@ -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!

Quoted 6 lines
Quoted 3 lines

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

#4 lore raw
Quoted 32 lines · Lorenzo Pieralisi
Quoted 31 lines · Jon Hunter

Hi Lorenzo, Bjorn,

Quoted 28 lines · Jon Hunter
Quoted 15 lines · Vidya Sagar

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")
---
 drivers/pci/controller/dwc/pcie-tegra194.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/pci/controller/dwc/pcie-tegra194.c +0 -0
index 6fa216e52d14..4c3c0738f2e6 100644

drivers/pci/controller/dwc/pcie-tegra194.c static int tegra_pcie_dw_resume_noirq(struct device *dev) · line 2221

Quoted 8 lines
drivers/pci/controller/dwc/pcie-tegra194.c +2 -0
@@ -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!

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

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.

Quoted 3 lines

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

Lorenzo

maintainer
#5 lore raw
Quoted 37 lines · Bjorn Helgaas
Quoted 36 lines · Lorenzo Pieralisi
Quoted 35 lines · Jon Hunter

Hi Lorenzo, Bjorn,

Quoted 31 lines · Jon Hunter
Quoted 15 lines · Vidya Sagar

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")
---
 drivers/pci/controller/dwc/pcie-tegra194.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/pci/controller/dwc/pcie-tegra194.c +0 -0
index 6fa216e52d14..4c3c0738f2e6 100644

drivers/pci/controller/dwc/pcie-tegra194.c static int tegra_pcie_dw_resume_noirq(struct device *dev) · line 2221

Quoted 8 lines
drivers/pci/controller/dwc/pcie-tegra194.c +2 -0
@@ -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!

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

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

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

Signature · 1 line
nvpublic