Re: [PATCH v4 1/5] PCI: dwc: Return -ENODEV from dw_pcie_wait_for_link() if device is not found
From: Niklas Cassel
Date: Wed Jan 21 2026 - 03:27:07 EST
On Tue, Jan 20, 2026 at 11:17:40PM +0530, Manivannan Sadhasivam via B4 Relay wrote:
> From: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxxxxxxxx>
>
> The dw_pcie_wait_for_link() function waits up to 1 second for the PCIe link
> to come up and returns -ETIMEDOUT for all failures without distinguishing
> cases where no device is present on the bus. But the callers may want to
> just skip the failure if the device is not found on the bus and handle
> failure for other reasons.
>
> So after timeout, if the LTSSM is in Detect.Quiet or Detect.Active state,
> return -ENODEV to indicate the callers that the device is not found on the
> bus and return -ETIMEDOUT otherwise.
>
> Also add kernel doc to document the parameter and return values.
>
> Tested-by: Richard Zhu <hongxing.zhu@xxxxxxx>
> Tested-by: Vincent Guittot <vincent.guittot@xxxxxxxxxx>
> Reviewed-by: Shawn Lin <shawn.lin@xxxxxxxxxxxxxx>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxxxxxxxx>
> ---
Reviewed-by: Niklas Cassel <cassel@xxxxxxxxxx>