Re: [PATCH v4 5/5] PCI: dwc: Fail dw_pcie_host_init() if dw_pcie_wait_for_link() returns -ETIMEDOUT

From: Niklas Cassel

Date: Wed Jan 21 2026 - 03:29:10 EST


On Tue, Jan 20, 2026 at 11:17:44PM +0530, Manivannan Sadhasivam via B4 Relay wrote:
> From: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxxxxxxxx>
>
> The dw_pcie_wait_for_link() API now distinguishes link failures more
> precisely:
>
> -ENODEV: Device not found on the bus.
> -EIO: Device found but inactive.
> -ETIMEDOUT: Link failed to come up.
>
> Out of these three errors, only -ETIMEDOUT represents a definitive link
> failure since it signals that something is wrong with the link. For the
> other two errors, there is a possibility that the link might come up later.
> So fail dw_pcie_host_init() if -ETIMEDOUT is returned and skip the failure
> otherwise.
>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxxxxxxxx>
> ---

Reviewed-by: Niklas Cassel <cassel@xxxxxxxxxx>