1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/pci/controller/dwc
Johan Hovold c5097b9869 Revert "PCI: dwc: Wait for link up only if link is started"
This reverts commit da56a1bfba.

Bjorn Andersson, Fabio Estevam, Xiaolei Wang, and Jon Hunter reported that
da56a1bfba ("PCI: dwc: Wait for link up only if link is started") broke
controller probing by returning an error in case the link does not come up
during host initialisation, for example when the slot is empty.

As explained in commit 886a9c1347 ("PCI: dwc: Move link handling into
common code") and as indicated by the comment "Ignore errors, the link may
come up later" in the code, waiting for link up and ignoring errors is the
intended behaviour:

  Let's standardize this to succeed as there are usecases where devices
  (and the link) appear later even without hotplug. For example, a
  reconfigured FPGA device.

Reverting the offending commit specifically fixes a regression on Qualcomm
platforms like the Lenovo ThinkPad X13s which no longer reach the
interconnect sync state if a slot does not have a device populated (e.g. an
optional modem).

Note that enabling asynchronous probing by default as was done for Qualcomm
platforms by commit c0e1eb441b ("PCI: qcom: Enable async probe by
default"), should take care of any related boot time concerns.

Finally, note that the intel-gw driver is the only driver currently not
providing a .start_link() callback and instead starts the link in its
.host_init() callback, which may avoid an additional one-second timeout
during probe by making the link-up wait conditional. If anyone cares, that
can be done in a follow-up patch with a proper motivation.

[bhelgaas: add Fabio Estevam, Xiaolei Wang, Jon Hunter reports]
Fixes: da56a1bfba ("PCI: dwc: Wait for link up only if link is started")
Link: https://lore.kernel.org/r/20230706082610.26584-1-johan+linaro@kernel.org
Reported-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reported-by: Fabio Estevam <festevam@gmail.com>
Link: https://lore.kernel.org/r/20230704122635.1362156-1-festevam@gmail.com/
Reported-by: Xiaolei Wang <xiaolei.wang@windriver.com>
Link: https://lore.kernel.org/r/20230705010624.3912934-1-xiaolei.wang@windriver.com/
Reported-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://lore.kernel.org/r/6ca287a1-6c7c-7b90-9022-9e73fb82b564@nvidia.com
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Cc: Sajid Dalvi <sdalvi@google.com>
Cc: Ajay Agarwal <ajayagarwal@google.com>
2023-07-26 10:49:11 -05:00
..
Kconfig PCI: dwc: Sort Kconfig entries by vendor 2023-04-20 16:18:05 -05:00
Makefile PCI: dwc: Add Baikal-T1 PCIe controller support 2022-11-23 16:01:55 +01:00
pci-dra7xx.c PCI: dra7xx: Use threaded IRQ handler for "dra7xx-pcie-main" IRQ 2023-02-14 07:26:45 +09:00
pci-exynos.c Merge branch 'pci/ctrl/pm-ops' 2022-08-04 11:46:52 -05:00
pci-imx6.c PCI: imx6: Save and restore root port MSI control in suspend and resume 2023-06-19 11:16:54 +02:00
pci-keystone.c Merge branch 'pci/misc' 2022-08-04 11:46:53 -05:00
pci-layerscape-ep.c PCI: layerscape: Add the endpoint linkup notifier support 2023-06-23 15:06:18 -05:00
pci-layerscape.c PCI: Remove unnecessary <linux/of_irq.h> includes 2022-11-10 14:53:51 -06:00
pci-meson.c PCI: dwc: Rename struct pcie_port to dw_pcie_rp 2022-07-05 19:00:52 -05:00
pcie-al.c PCI: dwc: Rename struct pcie_port to dw_pcie_rp 2022-07-05 19:00:52 -05:00
pcie-armada8k.c PCI: Remove unnecessary <linux/of_irq.h> includes 2022-11-10 14:53:51 -06:00
pcie-artpec6.c PCI: dwc: Rename struct pcie_port to dw_pcie_rp 2022-07-05 19:00:52 -05:00
pcie-bt1.c PCI: dwc: Convert to platform remove callback returning void 2023-06-24 14:11:56 +00:00
pcie-designware-ep.c PCI: dwc: Add Root Port and Endpoint controller eDMA engine support 2023-02-22 13:46:14 -06:00
pcie-designware-host.c Revert "PCI: dwc: Wait for link up only if link is started" 2023-07-26 10:49:11 -05:00
pcie-designware-plat.c PCI: dwc-plat: Drop dw_plat_pcie_of_match[] forward declaration 2022-07-05 19:00:52 -05:00
pcie-designware.c Revert "PCI: dwc: Wait for link up only if link is started" 2023-07-26 10:49:11 -05:00
pcie-designware.h Revert "PCI: dwc: Wait for link up only if link is started" 2023-07-26 10:49:11 -05:00
pcie-dw-rockchip.c PCI: dwc: Rename struct pcie_port to dw_pcie_rp 2022-07-05 19:00:52 -05:00
pcie-fu740.c Merge branch 'pci/ctrl/fu740' 2022-08-04 11:41:55 -05:00
pcie-hisi.c PCI: hisi: Avoid invalid address space conversions 2022-01-03 15:05:28 -06:00
pcie-histb.c PCI: dwc: Convert to platform remove callback returning void 2023-06-24 14:11:56 +00:00
pcie-intel-gw.c PCI: dwc: Convert to platform remove callback returning void 2023-06-24 14:11:56 +00:00
pcie-keembay.c PCI: dwc: Convert struct pcie_port.msi_irq to an array 2022-08-01 15:15:33 -05:00
pcie-kirin.c PCI: dwc: Replace of_gpio_named_count() by gpiod_count() 2022-10-03 10:34:46 +02:00
pcie-qcom-ep.c Merge branch 'pci/controller/remove-void-callbacks' 2023-06-26 13:00:00 -05:00
pcie-qcom.c PCI: qcom: Do not advertise hotplug capability for IP v2.1.0 2023-06-20 12:12:44 +02:00
pcie-spear13xx.c Merge branch 'pci/misc' 2022-08-04 11:46:53 -05:00
pcie-tegra194-acpi.c PCI: dwc: Simplify in/outbound iATU setup methods 2022-08-01 15:15:09 -05:00
pcie-tegra194.c pci-v6.5-changes 2023-06-30 15:06:45 -07:00
pcie-uniphier-ep.c PCI: uniphier-ep: Add NX1 support 2022-02-11 16:26:21 +00:00
pcie-uniphier.c PCI: dwc: Rename struct pcie_port to dw_pcie_rp 2022-07-05 19:00:52 -05:00
pcie-visconti.c PCI: dwc: Rename struct pcie_port to dw_pcie_rp 2022-07-05 19:00:52 -05:00