[PATCH v5 6/6] PCI: dwc: Don't return error when wait for link up in dw_pcie_resume_noirq()

Manivannan Sadhasivam mani at kernel.org
Fri Sep 19 23:34:59 PDT 2025


On Tue, Sep 02, 2025 at 04:01:51PM +0800, Richard Zhu wrote:
> When waiting for the PCIe link to come up, both link up and link down
> are valid results depending on the device state.
> 
> Since the link may come up later and to get rid of the following
> mis-reported PM errors. Do not return an -ETIMEDOUT error, as the
> outcome has already been reported in dw_pcie_wait_for_link().
> 
> PM error logs introduced by the -ETIMEDOUT error return.
> imx6q-pcie 33800000.pcie: Phy link never came up
> imx6q-pcie 33800000.pcie: PM: dpm_run_callback(): genpd_resume_noirq returns -110
> imx6q-pcie 33800000.pcie: PM: failed to resume noirq: error -110
> 
> Signed-off-by: Richard Zhu <hongxing.zhu at nxp.com>

Again, Fixes tag is needed. Also CC stable list since this should be backported.

- Mani

> Reviewed-by: Frank Li <Frank.Li at nxp.com>
> ---
>  drivers/pci/controller/dwc/pcie-designware-host.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/pci/controller/dwc/pcie-designware-host.c b/drivers/pci/controller/dwc/pcie-designware-host.c
> index b303a74b0fd7..c4386be38a07 100644
> --- a/drivers/pci/controller/dwc/pcie-designware-host.c
> +++ b/drivers/pci/controller/dwc/pcie-designware-host.c
> @@ -1084,10 +1084,9 @@ int dw_pcie_resume_noirq(struct dw_pcie *pci)
>  	if (ret)
>  		return ret;
>  
> -	ret = dw_pcie_wait_for_link(pci);
> -	if (ret)
> -		return ret;
> +	/* Ignore errors, the link may come up later */
> +	dw_pcie_wait_for_link(pci);
>  
> -	return ret;
> +	return 0;
>  }
>  EXPORT_SYMBOL_GPL(dw_pcie_resume_noirq);
> -- 
> 2.37.1
> 

-- 
மணிவண்ணன் சதாசிவம்



More information about the linux-arm-kernel mailing list