mirror-linux/drivers/pci/controller/dwc
Bjorn Helgaas df27c03b9e PCI: meson: Report that link is up while in ASPM L0s and L1 states
Previously meson_pcie_link_up() only returned true if the link was in the
L0 state.  This was incorrect because hardware autonomously manages
transitions between L0, L0s, and L1 while both components on the link stay
in D0.  Those states should all be treated as "link is active".

Returning false when the device was in L0s or L1 broke config accesses
because dw_pcie_other_conf_map_bus() fails if the link is down, which
caused errors like this:

  meson-pcie fc000000.pcie: error: wait linkup timeout
  pci 0000:01:00.0: BAR 0: error updating (0xfc700004 != 0xffffffff)

Remove the LTSSM state check, timeout, speed check, and error message from
meson_pcie_link_up(), the dw_pcie_ops.link_up() method, so it is a simple
boolean check of whether the link is active.  Timeouts and error messages
are handled at a higher level, e.g., dw_pcie_wait_for_link().

Fixes: 9c0ef6d34f ("PCI: amlogic: Add the Amlogic Meson PCIe controller driver")
Reported-by: Linnaea Lavia <linnaea-von-lavia@live.com>
Closes: https://lore.kernel.org/r/DM4PR05MB102707B8CDF84D776C39F22F2C7F0A@DM4PR05MB10270.namprd05.prod.outlook.com
[bhelgaas: squash removal of unused WAIT_LINKUP_TIMEOUT by
Martin Blumenstingl <martin.blumenstingl@googlemail.com>:
https://patch.msgid.link/20260105125625.239497-1-martin.blumenstingl@googlemail.com]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Linnaea Lavia <linnaea-von-lavia@live.com>
Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on BananaPi M2S
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20251103221930.1831376-1-helgaas@kernel.org
Link: https://patch.msgid.link/20260105125625.239497-1-martin.blumenstingl@googlemail.com
2026-01-05 11:20:29 -06:00
..
Kconfig Merge branch 'pci/controller/spacemit-k1' 2025-12-03 14:18:44 -06:00
Makefile Merge branch 'pci/controller/spacemit-k1' 2025-12-03 14:18:44 -06:00
pci-dra7xx.c PCI: endpoint: Drop superfluous pci_epc_features initialization 2025-08-14 10:42:42 -05:00
pci-exynos.c PCI: dwc: Add support for ELBI resource mapping 2025-09-25 18:33:37 +05:30
pci-imx6.c Merge branch 'pci/controller/imx6' 2025-10-03 12:13:18 -05:00
pci-keystone.c PCI: keystone: Add support to build as a loadable module 2025-11-13 12:20:46 -06:00
pci-layerscape-ep.c
pci-layerscape.c PCI: layerscape: Fix arg_count to syscon_regmap_lookup_by_phandle_args() 2025-03-27 13:11:14 -05:00
pci-meson.c PCI: meson: Report that link is up while in ASPM L0s and L1 states 2026-01-05 11:20:29 -06:00
pcie-al.c PCI: dwc: Support ECAM mechanism by enabling iATU 'CFG Shift Feature' 2025-09-25 18:34:01 +05:30
pcie-amd-mdb.c PCI: amd-mdb: Add support for PCIe RP PERST# signal handling 2025-08-11 16:09:45 +05:30
pcie-armada8k.c PCI: dwc: Return bool from link up check 2025-05-13 10:12:59 +01:00
pcie-artpec6.c PCI: endpoint: Drop superfluous pci_epc_features initialization 2025-08-14 10:42:42 -05:00
pcie-bt1.c
pcie-designware-debugfs.c PCI: dwc: Make dw_pcie_ptm_ops static 2025-07-07 13:23:15 +05:30
pcie-designware-ep.c PCI: dwc: Export dw_pcie_allocate_domains() and dw_pcie_ep_raise_msix_irq() 2025-11-13 12:20:46 -06:00
pcie-designware-host.c pci-v6.19-changes 2025-12-04 17:29:41 -08:00
pcie-designware-plat.c PCI: endpoint: Drop superfluous pci_epc_features initialization 2025-08-14 10:42:42 -05:00
pcie-designware.c Merge branch 'pci/controller/meson' 2025-12-03 14:18:39 -06:00
pcie-designware.h Merge branch 'pci/pwrctrl-tc9563' 2025-12-03 14:18:45 -06:00
pcie-dw-rockchip.c Merge branch 'pci/controller/dw-rockchip' 2025-12-03 14:18:36 -06:00
pcie-fu740.c
pcie-hisi.c PCI: host-common: Convert to library for host controller drivers 2025-05-30 12:21:57 -05:00
pcie-histb.c PCI: dwc: Return bool from link up check 2025-05-13 10:12:59 +01:00
pcie-intel-gw.c PCI: intel-gw: Remove intel_pcie_cpu_addr() 2025-03-24 14:58:35 -05:00
pcie-keembay.c PCI: endpoint: Drop superfluous pci_epc_features initialization 2025-08-14 10:42:42 -05:00
pcie-kirin.c PCI: dwc: Return bool from link up check 2025-05-13 10:12:59 +01:00
pcie-nxp-s32g.c PCI: s32g: Add NXP S32G PCIe controller driver (RC) 2025-12-02 14:03:11 -06:00
pcie-qcom-common.c PCI: qcom: Fix macro typo for CURSOR 2025-09-04 22:25:22 +05:30
pcie-qcom-common.h PCI: qcom: Add equalization settings for 8.0 GT/s and 32.0 GT/s 2025-09-04 22:24:04 +05:30
pcie-qcom-ep.c Merge branch 'pci/controller/qcom' 2025-10-03 12:13:20 -05:00
pcie-qcom.c PCI: qcom: Remove ASPM L0s support for MSM8996 SoC 2025-12-30 11:12:22 -06:00
pcie-rcar-gen4.c Merge branch 'pci/controller/rcar-gen4' 2025-10-03 12:13:21 -05:00
pcie-sophgo.c PCI: dwc: Add Sophgo SG2044 PCIe controller driver in Root Complex mode 2025-07-24 16:29:46 -05:00
pcie-spacemit-k1.c PCI: spacemit: Add SpacemiT PCIe host driver 2025-11-17 18:59:03 +05:30
pcie-spear13xx.c PCI: dwc: Return bool from link up check 2025-05-13 10:12:59 +01:00
pcie-stm32-ep.c PCI: stm32: Don't use 'proxy' headers 2025-11-17 14:38:52 -06:00
pcie-stm32.c PCI: stm32: Don't use 'proxy' headers 2025-11-17 14:38:52 -06:00
pcie-stm32.h PCI: stm32: Don't use 'proxy' headers 2025-11-17 14:38:52 -06:00
pcie-tegra194-acpi.c
pcie-tegra194.c PCI: tegra194: Remove unnecessary L1SS disable code 2025-11-24 16:47:19 -06:00
pcie-uniphier-ep.c
pcie-uniphier.c pci-v6.16-changes 2025-06-04 11:26:17 -07:00
pcie-visconti.c PCI: dwc: Return bool from link up check 2025-05-13 10:12:59 +01:00