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 the following error messages during probing.
[ 2.512015] intel-gw-pcie d1000000.pcie: host bridge /soc/pcie@d1000000 ranges:
[ 2.517868] intel-gw-pcie d1000000.pcie: MEM 0x00dc000000..0x00ddffffff -> 0x00dc000000
[ 2.528450] intel-combo-phy d0c00000.combo-phy: Set combo mode: combophy[1]: mode: PCIe single lane mode
[ 2.551619] intel-gw-pcie d1000000.pcie: No outbound iATU found
[ 2.556060] intel-gw-pcie d1000000.pcie: Cannot initialize host
[ 2.561901] intel-gw-pcie d1000000.pcie: probe with driver intel-gw-pcie failed with error -22
[ 2.571041] intel-gw-pcie c1100000.pcie: host bridge /soc/pcie@c1100000 ranges:
[ 2.577736] intel-gw-pcie c1100000.pcie: MEM 0x00ce000000..0x00cfffffff -> 0x00ce000000
[ 2.588299] intel-combo-phy c0c00000.combo-phy: Set combo mode: combophy[3]: mode: PCIe single lane mode
[ 2.611471] intel-gw-pcie c1100000.pcie: No outbound iATU found
[ 2.615934] intel-gw-pcie c1100000.pcie: Cannot initialize host
[ 2.621759] intel-gw-pcie c1100000.pcie: probe with driver intel-gw-pcie failed with error -22
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 | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/drivers/pci/controller/dwc/pcie-intel-gw.c b/drivers/pci/controller/dwc/pcie-intel-gw.c
index 6d9499d954674a26a74bff56b7fb5759767424c0..24c463781f1e31d5617a5ff81bdbce563ed5a1d0 100644
--- a/drivers/pci/controller/dwc/pcie-intel-gw.c
+++ b/drivers/pci/controller/dwc/pcie-intel-gw.c
@@ -284,6 +284,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,19 +320,8 @@ static int intel_pcie_host_setup(struct intel_pcie *pcie)
intel_pcie_link_setup(pcie);
intel_pcie_init_n_fts(pci);
- ret = dw_pcie_setup_rc(&pci->pp);
- if (ret)
- goto 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 err;
-
intel_pcie_core_irq_enable(pcie);
return 0;
@@ -386,6 +385,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
Hi Florian,
kernel test robot noticed the following build warnings:
[auto build test WARNING on f338e77383789c0cae23ca3d48adcc5e9e137e3c]
url: https://github.com/intel-lab-lkp/linux/commits/Florian-Eckert/PCI-intel-gw-Remove-unused-define/20260401-051352
base: f338e77383789c0cae23ca3d48adcc5e9e137e3c
patch link: https://lore.kernel.org/r/20260330-pcie-intel-gw-v2-4-8bd07367a298%40dev.tdt.de
patch subject: [PATCH v2 4/7] PCI: intel-gw: Add start_link callback function
config: arm64-randconfig-001-20260401 (https://download.01.org/0day-ci/archive/20260401/202604011157.4RiSNWVi-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260401/202604011157.4RiSNWVi-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202604011157.4RiSNWVi-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/pci/controller/dwc/pcie-intel-gw.c:329:1: warning: unused label 'err' [-Wunused-label]
329 | err:
| ^~~~
1 warning generated.
vim +/err +329 drivers/pci/controller/dwc/pcie-intel-gw.c
6cbd614d1f7c81 Florian Eckert 2026-03-30 296
733770d4a2bea0 Fan Fei 2021-12-22 297 static int intel_pcie_host_setup(struct intel_pcie *pcie)
ed22aaaede44f6 Dilip Kota 2019-12-09 298 {
ed22aaaede44f6 Dilip Kota 2019-12-09 299 int ret;
733770d4a2bea0 Fan Fei 2021-12-22 300 struct dw_pcie *pci = &pcie->pci;
ed22aaaede44f6 Dilip Kota 2019-12-09 301
733770d4a2bea0 Fan Fei 2021-12-22 302 intel_pcie_core_rst_assert(pcie);
733770d4a2bea0 Fan Fei 2021-12-22 303 intel_pcie_device_rst_assert(pcie);
733770d4a2bea0 Fan Fei 2021-12-22 304 intel_pcie_core_rst_deassert(pcie);
ed22aaaede44f6 Dilip Kota 2019-12-09 305
1927e1ec66a6ee Florian Eckert 2026-03-30 306 /* Controller clock must be provided earlier than PHY */
733770d4a2bea0 Fan Fei 2021-12-22 307 ret = clk_prepare_enable(pcie->core_clk);
ed22aaaede44f6 Dilip Kota 2019-12-09 308 if (ret) {
733770d4a2bea0 Fan Fei 2021-12-22 309 dev_err(pcie->pci.dev, "Core clock enable failed: %d\n", ret);
ed22aaaede44f6 Dilip Kota 2019-12-09 310 goto clk_err;
ed22aaaede44f6 Dilip Kota 2019-12-09 311 }
ed22aaaede44f6 Dilip Kota 2019-12-09 312
1cc9a559993a4a Rob Herring 2020-11-05 313 pci->atu_base = pci->dbi_base + 0xC0000;
1cc9a559993a4a Rob Herring 2020-11-05 314
1927e1ec66a6ee Florian Eckert 2026-03-30 315 ret = phy_init(pcie->phy);
1927e1ec66a6ee Florian Eckert 2026-03-30 316 if (ret)
1927e1ec66a6ee Florian Eckert 2026-03-30 317 goto phy_err;
1927e1ec66a6ee Florian Eckert 2026-03-30 318
733770d4a2bea0 Fan Fei 2021-12-22 319 intel_pcie_ltssm_disable(pcie);
733770d4a2bea0 Fan Fei 2021-12-22 320 intel_pcie_link_setup(pcie);
1cc9a559993a4a Rob Herring 2020-11-05 321 intel_pcie_init_n_fts(pci);
ce06bf570390fb Serge Semin 2022-06-24 322
1cc9a559993a4a Rob Herring 2020-11-05 323 dw_pcie_upconfig_setup(pci);
1cc9a559993a4a Rob Herring 2020-11-05 324
4db57fd92a7d2d Florian Eckert 2026-03-30 325 intel_pcie_core_irq_enable(pcie);
ed22aaaede44f6 Dilip Kota 2019-12-09 326
ed22aaaede44f6 Dilip Kota 2019-12-09 327 return 0;
ed22aaaede44f6 Dilip Kota 2019-12-09 328
1927e1ec66a6ee Florian Eckert 2026-03-30 @329 err:
1927e1ec66a6ee Florian Eckert 2026-03-30 330 phy_exit(pcie->phy);
1927e1ec66a6ee Florian Eckert 2026-03-30 331 phy_err:
733770d4a2bea0 Fan Fei 2021-12-22 332 clk_disable_unprepare(pcie->core_clk);
ed22aaaede44f6 Dilip Kota 2019-12-09 333 clk_err:
733770d4a2bea0 Fan Fei 2021-12-22 334 intel_pcie_core_rst_assert(pcie);
ed22aaaede44f6 Dilip Kota 2019-12-09 335
ed22aaaede44f6 Dilip Kota 2019-12-09 336 return ret;
ed22aaaede44f6 Dilip Kota 2019-12-09 337 }
ed22aaaede44f6 Dilip Kota 2019-12-09 338
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Hi Florian,
kernel test robot noticed the following build warnings:
[auto build test WARNING on f338e77383789c0cae23ca3d48adcc5e9e137e3c]
url: https://github.com/intel-lab-lkp/linux/commits/Florian-Eckert/PCI-intel-gw-Remove-unused-define/20260401-051352
base: f338e77383789c0cae23ca3d48adcc5e9e137e3c
patch link: https://lore.kernel.org/r/20260330-pcie-intel-gw-v2-4-8bd07367a298%40dev.tdt.de
patch subject: [PATCH v2 4/7] PCI: intel-gw: Add start_link callback function
config: sparc-randconfig-002-20260401 (https://download.01.org/0day-ci/archive/20260401/202604011153.Qo18yHpp-lkp@intel.com/config)
compiler: sparc64-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260401/202604011153.Qo18yHpp-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202604011153.Qo18yHpp-lkp@intel.com/
All warnings (new ones prefixed by >>):
drivers/pci/controller/dwc/pcie-intel-gw.c: In function 'intel_pcie_host_setup':
>> drivers/pci/controller/dwc/pcie-intel-gw.c:329:1: warning: label 'err' defined but not used [-Wunused-label]
err:
^~~
vim +/err +329 drivers/pci/controller/dwc/pcie-intel-gw.c
6cbd614d1f7c81 Florian Eckert 2026-03-30 296
733770d4a2bea0 Fan Fei 2021-12-22 297 static int intel_pcie_host_setup(struct intel_pcie *pcie)
ed22aaaede44f6 Dilip Kota 2019-12-09 298 {
ed22aaaede44f6 Dilip Kota 2019-12-09 299 int ret;
733770d4a2bea0 Fan Fei 2021-12-22 300 struct dw_pcie *pci = &pcie->pci;
ed22aaaede44f6 Dilip Kota 2019-12-09 301
733770d4a2bea0 Fan Fei 2021-12-22 302 intel_pcie_core_rst_assert(pcie);
733770d4a2bea0 Fan Fei 2021-12-22 303 intel_pcie_device_rst_assert(pcie);
733770d4a2bea0 Fan Fei 2021-12-22 304 intel_pcie_core_rst_deassert(pcie);
ed22aaaede44f6 Dilip Kota 2019-12-09 305
1927e1ec66a6ee Florian Eckert 2026-03-30 306 /* Controller clock must be provided earlier than PHY */
733770d4a2bea0 Fan Fei 2021-12-22 307 ret = clk_prepare_enable(pcie->core_clk);
ed22aaaede44f6 Dilip Kota 2019-12-09 308 if (ret) {
733770d4a2bea0 Fan Fei 2021-12-22 309 dev_err(pcie->pci.dev, "Core clock enable failed: %d\n", ret);
ed22aaaede44f6 Dilip Kota 2019-12-09 310 goto clk_err;
ed22aaaede44f6 Dilip Kota 2019-12-09 311 }
ed22aaaede44f6 Dilip Kota 2019-12-09 312
1cc9a559993a4a Rob Herring 2020-11-05 313 pci->atu_base = pci->dbi_base + 0xC0000;
1cc9a559993a4a Rob Herring 2020-11-05 314
1927e1ec66a6ee Florian Eckert 2026-03-30 315 ret = phy_init(pcie->phy);
1927e1ec66a6ee Florian Eckert 2026-03-30 316 if (ret)
1927e1ec66a6ee Florian Eckert 2026-03-30 317 goto phy_err;
1927e1ec66a6ee Florian Eckert 2026-03-30 318
733770d4a2bea0 Fan Fei 2021-12-22 319 intel_pcie_ltssm_disable(pcie);
733770d4a2bea0 Fan Fei 2021-12-22 320 intel_pcie_link_setup(pcie);
1cc9a559993a4a Rob Herring 2020-11-05 321 intel_pcie_init_n_fts(pci);
ce06bf570390fb Serge Semin 2022-06-24 322
1cc9a559993a4a Rob Herring 2020-11-05 323 dw_pcie_upconfig_setup(pci);
1cc9a559993a4a Rob Herring 2020-11-05 324
4db57fd92a7d2d Florian Eckert 2026-03-30 325 intel_pcie_core_irq_enable(pcie);
ed22aaaede44f6 Dilip Kota 2019-12-09 326
ed22aaaede44f6 Dilip Kota 2019-12-09 327 return 0;
ed22aaaede44f6 Dilip Kota 2019-12-09 328
1927e1ec66a6ee Florian Eckert 2026-03-30 @329 err:
1927e1ec66a6ee Florian Eckert 2026-03-30 330 phy_exit(pcie->phy);
1927e1ec66a6ee Florian Eckert 2026-03-30 331 phy_err:
733770d4a2bea0 Fan Fei 2021-12-22 332 clk_disable_unprepare(pcie->core_clk);
ed22aaaede44f6 Dilip Kota 2019-12-09 333 clk_err:
733770d4a2bea0 Fan Fei 2021-12-22 334 intel_pcie_core_rst_assert(pcie);
ed22aaaede44f6 Dilip Kota 2019-12-09 335
ed22aaaede44f6 Dilip Kota 2019-12-09 336 return ret;
ed22aaaede44f6 Dilip Kota 2019-12-09 337 }
ed22aaaede44f6 Dilip Kota 2019-12-09 338
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
© 2016 - 2026 Red Hat, Inc.