2022-04-02 16:34:21

by Johan Hovold

[permalink] [raw]
Subject: [PATCH v2 0/2] PCI: qcom: Fix probe error paths

This series fixes a few problems in the probe error handling which could
cause trouble, for example, on probe deferral.

Johan


Changes in v2
- Capitalise subject lines according to PCI subsystem conventions


Johan Hovold (2):
PCI: qcom: Fix runtime PM imbalance on probe errors
PCI: qcom: Fix unbalanced PHY init on probe errors

drivers/pci/controller/dwc/pcie-qcom.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

--
2.35.1


2022-04-05 01:31:19

by Johan Hovold

[permalink] [raw]
Subject: [PATCH v2 1/2] PCI: qcom: Fix runtime PM imbalance on probe errors

Drop the leftover pm_runtime_disable() calls from the late probe error
paths that would, for example, prevent runtime PM from being reenabled
after a probe deferral.

Fixes: 6e5da6f7d824 ("PCI: qcom: Fix error handling in runtime PM support")
Cc: [email protected] # 4.20
Cc: Bjorn Andersson <[email protected]>
Signed-off-by: Johan Hovold <[email protected]>
---
drivers/pci/controller/dwc/pcie-qcom.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
index 20a0e6533a1c..0b0bd71f1bd2 100644
--- a/drivers/pci/controller/dwc/pcie-qcom.c
+++ b/drivers/pci/controller/dwc/pcie-qcom.c
@@ -1616,17 +1616,14 @@ static int qcom_pcie_probe(struct platform_device *pdev)
pp->ops = &qcom_pcie_dw_ops;

ret = phy_init(pcie->phy);
- if (ret) {
- pm_runtime_disable(&pdev->dev);
+ if (ret)
goto err_pm_runtime_put;
- }

platform_set_drvdata(pdev, pcie);

ret = dw_pcie_host_init(pp);
if (ret) {
dev_err(dev, "cannot initialize host\n");
- pm_runtime_disable(&pdev->dev);
goto err_pm_runtime_put;
}

--
2.35.1

2022-04-27 09:02:06

by Manivannan Sadhasivam

[permalink] [raw]
Subject: Re: [PATCH v2 1/2] PCI: qcom: Fix runtime PM imbalance on probe errors

On Fri, Apr 01, 2022 at 03:38:53PM +0200, Johan Hovold wrote:
> Drop the leftover pm_runtime_disable() calls from the late probe error
> paths that would, for example, prevent runtime PM from being reenabled
> after a probe deferral.
>
> Fixes: 6e5da6f7d824 ("PCI: qcom: Fix error handling in runtime PM support")
> Cc: [email protected] # 4.20
> Cc: Bjorn Andersson <[email protected]>
> Signed-off-by: Johan Hovold <[email protected]>

Reviewed-by: Manivannan Sadhasivam <[email protected]>

Thanks,
Mani

> ---
> drivers/pci/controller/dwc/pcie-qcom.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
> index 20a0e6533a1c..0b0bd71f1bd2 100644
> --- a/drivers/pci/controller/dwc/pcie-qcom.c
> +++ b/drivers/pci/controller/dwc/pcie-qcom.c
> @@ -1616,17 +1616,14 @@ static int qcom_pcie_probe(struct platform_device *pdev)
> pp->ops = &qcom_pcie_dw_ops;
>
> ret = phy_init(pcie->phy);
> - if (ret) {
> - pm_runtime_disable(&pdev->dev);
> + if (ret)
> goto err_pm_runtime_put;
> - }
>
> platform_set_drvdata(pdev, pcie);
>
> ret = dw_pcie_host_init(pp);
> if (ret) {
> dev_err(dev, "cannot initialize host\n");
> - pm_runtime_disable(&pdev->dev);
> goto err_pm_runtime_put;
> }
>
> --
> 2.35.1
>

2022-04-27 09:09:18

by Stanimir Varbanov

[permalink] [raw]
Subject: Re: [PATCH v2 0/2] PCI: qcom: Fix probe error paths

Hi Johan,


On 4/1/22 16:38, Johan Hovold wrote:
> This series fixes a few problems in the probe error handling which could
> cause trouble, for example, on probe deferral.
>
> Johan
>
>
> Changes in v2
> - Capitalise subject lines according to PCI subsystem conventions
>
>
> Johan Hovold (2):
> PCI: qcom: Fix runtime PM imbalance on probe errors
> PCI: qcom: Fix unbalanced PHY init on probe errors
>
> drivers/pci/controller/dwc/pcie-qcom.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>

Acked-by: Stanimir Varbanov <[email protected]>

--
regards,
Stan

2022-04-27 10:46:46

by Johan Hovold

[permalink] [raw]
Subject: Re: [PATCH v2 0/2] PCI: qcom: Fix probe error paths

On Fri, Apr 01, 2022 at 03:38:52PM +0200, Johan Hovold wrote:
> This series fixes a few problems in the probe error handling which could
> cause trouble, for example, on probe deferral.

> Johan Hovold (2):
> PCI: qcom: Fix runtime PM imbalance on probe errors
> PCI: qcom: Fix unbalanced PHY init on probe errors
>
> drivers/pci/controller/dwc/pcie-qcom.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)

Any comments to this series? Does it need a Qualcomm maintainer ack to
be merged? Bjorn?

Johan

2022-04-27 11:37:59

by Lorenzo Pieralisi

[permalink] [raw]
Subject: Re: [PATCH v2 0/2] PCI: qcom: Fix probe error paths

On Fri, 1 Apr 2022 15:38:52 +0200, Johan Hovold wrote:
> This series fixes a few problems in the probe error handling which could
> cause trouble, for example, on probe deferral.
>
> Johan
>
>
> Changes in v2
> - Capitalise subject lines according to PCI subsystem conventions
>
> [...]

Applied to pci/qcom, thanks!

[1/2] PCI: qcom: Fix runtime PM imbalance on probe errors
https://git.kernel.org/lpieralisi/pci/c/b986db29ed
[2/2] PCI: qcom: Fix unbalanced PHY init on probe errors
https://git.kernel.org/lpieralisi/pci/c/3ae93c5a97

Thanks,
Lorenzo