Re: [PATCH 3/5] PCI: intel-gw: Add start_link callback function

Manivannan Sadhasivam
2026-03-26T16:13:43Z

On Tue, Mar 17, 2026 at 11:12:51AM +0100, Florian Eckert wrote:
> The pcie-intel-gw driver has no start_link callback function. This commit
> adds the missing callback function so that the driver works again and does
> not abort with an error during probing.
>

So the driver was broken due to the below commits? If so, please share some
failure logs as well.

- Mani

> Fixes: c5097b9869a1 ("Revert "PCI: dwc: Wait for link up only if link is started"")
> Fixes: da56a1bfbab5 ("PCI: dwc: Wait for link up only if link is started")
> Signed-off-by: Florian Eckert <fe@dev.tdt.de>
> ---
> drivers/pci/controller/dwc/pcie-intel-gw.c | 23 +++++++++++------------
> 1 file changed, 11 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/pci/controller/dwc/pcie-intel-gw.c b/drivers/pci/controller/dwc/pcie-intel-gw.c
> index 6110a8adb8732dbbd5e9e2db68a0606ccf032ae1..6bd25f8da605032bfdb97596fb3a1f6a03e88bfc 100644
> --- a/drivers/pci/controller/dwc/pcie-intel-gw.c
> +++ b/drivers/pci/controller/dwc/pcie-intel-gw.c
> @@ -285,6 +285,16 @@ static void intel_pcie_turn_off(struct intel_pcie *pcie)
> pcie_rc_cfg_wr_mask(pcie, PCI_COMMAND, PCI_COMMAND_MEMORY, 0);
> }
>
> +static int intel_pcie_start_link(struct dw_pcie *pci)
> +{
> + struct intel_pcie *pcie = dev_get_drvdata(pci->dev);
> +
> + intel_pcie_device_rst_deassert(pcie);
> + intel_pcie_ltssm_enable(pcie);
> +
> + return 0;
> +}
> +
> static int intel_pcie_host_setup(struct intel_pcie *pcie)
> {
> int ret;
> @@ -310,20 +320,8 @@ static int intel_pcie_host_setup(struct intel_pcie *pcie)
> intel_pcie_ltssm_disable(pcie);
> intel_pcie_link_setup(pcie);
> intel_pcie_init_n_fts(pci);
> -
> - ret = dw_pcie_setup_rc(&pci->pp);
> - if (ret)
> - goto phy_err;
> -
> dw_pcie_upconfig_setup(pci);
>
> - intel_pcie_device_rst_deassert(pcie);
> - intel_pcie_ltssm_enable(pcie);
> -
> - ret = dw_pcie_wait_for_link(pci);
> - if (ret)
> - goto phy_err;
> -
> intel_pcie_core_irq_enable(pcie);
>
> return 0;
> @@ -386,6 +384,7 @@ static int intel_pcie_rc_init(struct dw_pcie_rp *pp)
> }
>
> static const struct dw_pcie_ops intel_pcie_ops = {
> + .start_link = intel_pcie_start_link,
> };
>
> static const struct dw_pcie_host_ops intel_pcie_dw_ops = {
>
> --
> 2.47.3
>

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