All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/3] PCI: qcom: Don't unroll init if init fails
@ 2017-07-16  6:41 Bjorn Andersson
  2017-08-02 21:39 ` Bjorn Helgaas
  0 siblings, 1 reply; 6+ messages in thread
From: Bjorn Andersson @ 2017-07-16  6:41 UTC (permalink / raw)
  To: Stanimir Varbanov, Bjorn Helgaas; +Cc: linux-pci, linux-arm-msm, linux-kernel

When the init op fails it will restore the state of the resources, so we
should not disable them one more time when this happens.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
 drivers/pci/dwc/pcie-qcom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/dwc/pcie-qcom.c b/drivers/pci/dwc/pcie-qcom.c
index d15657dc3990..7b703741a3fd 100644
--- a/drivers/pci/dwc/pcie-qcom.c
+++ b/drivers/pci/dwc/pcie-qcom.c
@@ -901,7 +901,7 @@ static int qcom_pcie_host_init(struct pcie_port *pp)
 
 	ret = pcie->ops->init(pcie);
 	if (ret)
-		goto err_deinit;
+		return ret;
 
 	ret = phy_power_on(pcie->phy);
 	if (ret)
-- 
2.12.0

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

* Re: [PATCH 2/3] PCI: qcom: Don't unroll init if init fails
  2017-07-16  6:41 [PATCH 2/3] PCI: qcom: Don't unroll init if init fails Bjorn Andersson
@ 2017-08-02 21:39 ` Bjorn Helgaas
  0 siblings, 0 replies; 6+ messages in thread
From: Bjorn Helgaas @ 2017-08-02 21:39 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Stanimir Varbanov, Bjorn Helgaas, linux-pci, linux-arm-msm, linux-kernel

On Sat, Jul 15, 2017 at 11:41:53PM -0700, Bjorn Andersson wrote:
> When the init op fails it will restore the state of the resources, so we
> should not disable them one more time when this happens.
> 
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Stanimir, any opinion on this and the following patch?

> ---
>  drivers/pci/dwc/pcie-qcom.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/dwc/pcie-qcom.c b/drivers/pci/dwc/pcie-qcom.c
> index d15657dc3990..7b703741a3fd 100644
> --- a/drivers/pci/dwc/pcie-qcom.c
> +++ b/drivers/pci/dwc/pcie-qcom.c
> @@ -901,7 +901,7 @@ static int qcom_pcie_host_init(struct pcie_port *pp)
>  
>  	ret = pcie->ops->init(pcie);
>  	if (ret)
> -		goto err_deinit;
> +		return ret;
>  
>  	ret = phy_power_on(pcie->phy);
>  	if (ret)
> -- 
> 2.12.0
> 

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

* Re: [PATCH 2/3] PCI: qcom: Don't unroll init if init fails
  2017-07-16  6:39   ` Bjorn Andersson
@ 2017-08-03  9:24     ` Stanimir Varbanov
  -1 siblings, 0 replies; 6+ messages in thread
From: Stanimir Varbanov @ 2017-08-03  9:24 UTC (permalink / raw)
  To: Bjorn Andersson, Bjorn Helgaas
  Cc: open list:PCIE DRIVER FOR QUALCOMM MSM,
	open list:PCIE DRIVER FOR QUALCOMM MSM, open list

Hi,

The patch looks correct.

On 07/16/2017 09:39 AM, Bjorn Andersson wrote:
> When the init op fails it will restore the state of the resources, so we
> should not disable them one more time when this happens.
> 
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
>  drivers/pci/dwc/pcie-qcom.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Stanimir Varbanov <svarbanov@mm-sol.com>

> 
> diff --git a/drivers/pci/dwc/pcie-qcom.c b/drivers/pci/dwc/pcie-qcom.c
> index d15657dc3990..7b703741a3fd 100644
> --- a/drivers/pci/dwc/pcie-qcom.c
> +++ b/drivers/pci/dwc/pcie-qcom.c
> @@ -901,7 +901,7 @@ static int qcom_pcie_host_init(struct pcie_port *pp)
>  
>  	ret = pcie->ops->init(pcie);
>  	if (ret)
> -		goto err_deinit;
> +		return ret;
>  
>  	ret = phy_power_on(pcie->phy);
>  	if (ret)
> 

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

* Re: [PATCH 2/3] PCI: qcom: Don't unroll init if init fails
@ 2017-08-03  9:24     ` Stanimir Varbanov
  0 siblings, 0 replies; 6+ messages in thread
From: Stanimir Varbanov @ 2017-08-03  9:24 UTC (permalink / raw)
  To: Bjorn Andersson, Bjorn Helgaas
  Cc: open list:PCIE DRIVER FOR QUALCOMM MSM,
	open list:PCIE DRIVER FOR QUALCOMM MSM, open list

Hi,

The patch looks correct.

On 07/16/2017 09:39 AM, Bjorn Andersson wrote:
> When the init op fails it will restore the state of the resources, so we
> should not disable them one more time when this happens.
> 
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
>  drivers/pci/dwc/pcie-qcom.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Acked-by: Stanimir Varbanov <svarbanov@mm-sol.com>

> 
> diff --git a/drivers/pci/dwc/pcie-qcom.c b/drivers/pci/dwc/pcie-qcom.c
> index d15657dc3990..7b703741a3fd 100644
> --- a/drivers/pci/dwc/pcie-qcom.c
> +++ b/drivers/pci/dwc/pcie-qcom.c
> @@ -901,7 +901,7 @@ static int qcom_pcie_host_init(struct pcie_port *pp)
>  
>  	ret = pcie->ops->init(pcie);
>  	if (ret)
> -		goto err_deinit;
> +		return ret;
>  
>  	ret = phy_power_on(pcie->phy);
>  	if (ret)
> 

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

* [PATCH 2/3] PCI: qcom: Don't unroll init if init fails
  2017-07-16  6:39 [PATCH 1/3] PCI: dwc: Handle host_init failures Bjorn Andersson
@ 2017-07-16  6:39   ` Bjorn Andersson
  0 siblings, 0 replies; 6+ messages in thread
From: Bjorn Andersson @ 2017-07-16  6:39 UTC (permalink / raw)
  To: Stanimir Varbanov, Bjorn Helgaas
  Cc: open list:PCIE DRIVER FOR QUALCOMM MSM,
	open list:PCIE DRIVER FOR QUALCOMM MSM, open list

When the init op fails it will restore the state of the resources, so we
should not disable them one more time when this happens.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
 drivers/pci/dwc/pcie-qcom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/dwc/pcie-qcom.c b/drivers/pci/dwc/pcie-qcom.c
index d15657dc3990..7b703741a3fd 100644
--- a/drivers/pci/dwc/pcie-qcom.c
+++ b/drivers/pci/dwc/pcie-qcom.c
@@ -901,7 +901,7 @@ static int qcom_pcie_host_init(struct pcie_port *pp)
 
 	ret = pcie->ops->init(pcie);
 	if (ret)
-		goto err_deinit;
+		return ret;
 
 	ret = phy_power_on(pcie->phy);
 	if (ret)
-- 
2.12.0

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

* [PATCH 2/3] PCI: qcom: Don't unroll init if init fails
@ 2017-07-16  6:39   ` Bjorn Andersson
  0 siblings, 0 replies; 6+ messages in thread
From: Bjorn Andersson @ 2017-07-16  6:39 UTC (permalink / raw)
  To: Stanimir Varbanov, Bjorn Helgaas
  Cc: open list:PCIE DRIVER FOR QUALCOMM MSM,
	open list:PCIE DRIVER FOR QUALCOMM MSM, open list

When the init op fails it will restore the state of the resources, so we
should not disable them one more time when this happens.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
 drivers/pci/dwc/pcie-qcom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/dwc/pcie-qcom.c b/drivers/pci/dwc/pcie-qcom.c
index d15657dc3990..7b703741a3fd 100644
--- a/drivers/pci/dwc/pcie-qcom.c
+++ b/drivers/pci/dwc/pcie-qcom.c
@@ -901,7 +901,7 @@ static int qcom_pcie_host_init(struct pcie_port *pp)
 
 	ret = pcie->ops->init(pcie);
 	if (ret)
-		goto err_deinit;
+		return ret;
 
 	ret = phy_power_on(pcie->phy);
 	if (ret)
-- 
2.12.0

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

end of thread, other threads:[~2017-08-03  9:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-16  6:41 [PATCH 2/3] PCI: qcom: Don't unroll init if init fails Bjorn Andersson
2017-08-02 21:39 ` Bjorn Helgaas
  -- strict thread matches above, loose matches on Subject: below --
2017-07-16  6:39 [PATCH 1/3] PCI: dwc: Handle host_init failures Bjorn Andersson
2017-07-16  6:39 ` [PATCH 2/3] PCI: qcom: Don't unroll init if init fails Bjorn Andersson
2017-07-16  6:39   ` Bjorn Andersson
2017-08-03  9:24   ` Stanimir Varbanov
2017-08-03  9:24     ` Stanimir Varbanov

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.