mirror-linux/drivers/pci/controller
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
..
cadence pci-v6.19-changes 2025-12-04 17:29:41 -08:00
dwc PCI: meson: Report that link is up while in ASPM L0s and L1 states 2026-01-05 11:20:29 -06:00
mobiveil PCI: mobiveil: Switch to msi_create_parent_irq_domain() 2025-07-24 16:24:02 -05:00
plda PCI: plda: Remove dev_err_probe() when the errno is -ENOMEM 2025-09-08 15:44:31 +05:30
Kconfig Merge branch 'pci/controller/rzg3s-host' 2025-12-03 14:18:41 -06:00
Makefile PCI: Add Renesas RZ/G3S host controller driver 2025-11-25 12:34:48 -06:00
pci-aardvark.c PCI: aardvark: Switch to msi_create_parent_irq_domain() 2025-07-24 16:24:15 -05:00
pci-ftpci100.c PCI: Switch to irq_domain_create_linear() 2025-05-16 21:06:10 +02:00
pci-host-common.c PCI: host-generic: Move bridge allocation outside of pci_host_common_init() 2025-11-25 19:39:42 +05:30
pci-host-common.h PCI: host-generic: Move bridge allocation outside of pci_host_common_init() 2025-11-25 19:39:42 +05:30
pci-host-generic.c PCI: host-common: Convert to library for host controller drivers 2025-05-30 12:21:57 -05:00
pci-hyperv-intf.c PCI: hv: Fix warnings for missing export.h header inclusion 2025-07-09 23:46:06 +00:00
pci-hyperv.c PCI: Enable host bridge emulation for PCI_DOMAINS_GENERIC platforms 2025-10-28 12:36:34 -05:00
pci-ixp4xx.c PCI: ixp4xx: Guard ARM32-specific hook_fault_code() 2025-10-19 13:08:19 +05:30
pci-loongson.c
pci-mvebu.c PCI: mvebu: Fix use of for_each_of_range() iterator 2025-09-08 14:40:27 -05:00
pci-rcar-gen2.c
pci-tegra.c PCI: tegra: Convert struct tegra_msi mask_lock into raw spinlock 2025-09-25 18:02:30 -05:00
pci-thunder-ecam.c PCI: host-common: Convert to library for host controller drivers 2025-05-30 12:21:57 -05:00
pci-thunder-pem.c PCI: host-common: Convert to library for host controller drivers 2025-05-30 12:21:57 -05:00
pci-v3-semi.c
pci-versatile.c
pci-xgene-msi.c PCI: xgene-msi: Return negative -EINVAL in xgene_msi_handler_setup() 2025-08-11 16:30:43 +05:30
pci-xgene.c PCI: xgene: Drop XGENE_PCIE_IP_VER_UNKN 2025-07-22 15:33:16 -05:00
pcie-altera-msi.c PCI: altera-msi: Switch to msi_create_parent_irq_domain() 2025-07-24 16:24:15 -05:00
pcie-altera.c PCI: controller: Use dev_fwnode() instead of of_fwnode_handle() 2025-07-24 16:00:47 -05:00
pcie-apple.c PCI: host-generic: Move bridge allocation outside of pci_host_common_init() 2025-11-25 19:39:42 +05:30
pcie-brcmstb.c PCI: brcmstb: Add panic/die handler to driver 2025-11-13 10:47:16 -06:00
pcie-hisi-error.c
pcie-iproc-bcma.c
pcie-iproc-msi.c PCI: iproc: Switch to msi_create_parent_irq_domain() 2025-07-24 16:24:16 -05:00
pcie-iproc-platform.c
pcie-iproc.c PCI: iproc: Implement MSI controller node detection with of_msi_xlate() 2025-11-22 17:09:03 +01:00
pcie-iproc.h
pcie-mediatek-gen3.c PCI: mediatek-gen3: Add support for MediaTek MT8196 SoC 2025-08-19 20:05:57 +05:30
pcie-mediatek.c PCI: mediatek: Add support for Airoha AN7583 SoC 2025-10-21 07:29:56 +05:30
pcie-mt7621.c
pcie-rcar-ep.c PCI: endpoint: Drop superfluous pci_epc_features initialization 2025-08-14 10:42:42 -05:00
pcie-rcar-host.c PCI: rcar-host: Convert struct rcar_msi mask_lock into raw spinlock 2025-09-25 18:05:12 -05:00
pcie-rcar.c
pcie-rcar.h
pcie-rockchip-ep.c PCI: endpoint: Drop superfluous pci_epc_features initialization 2025-08-14 10:42:42 -05:00
pcie-rockchip-host.c Merge branch 'pci/controller/rockchip-host' 2025-07-31 16:12:17 -05:00
pcie-rockchip.c
pcie-rockchip.h PCI: rockchip: Switch to FIELD_PREP_WM16* macros 2025-09-02 20:06:47 -04:00
pcie-rzg3s-host.c PCI: rzg3s-host: Initialize MSI status bitmap before use 2025-12-09 12:42:48 -06:00
pcie-xilinx-common.h
pcie-xilinx-cpm.c PCI: Switch to irq_domain_create_linear() 2025-05-16 21:06:10 +02:00
pcie-xilinx-dma-pl.c PCI: xilinx-xdma: Switch to msi_create_parent_irq_domain() 2025-07-24 16:24:16 -05:00
pcie-xilinx-nwl.c PCI: xilinx-nwl: Fix ECAM programming 2025-09-29 16:37:23 -05:00
pcie-xilinx.c PCI: xilinx: Fix NULL pointer dereference in xilinx_pcie_intr_handler() 2025-08-12 11:31:24 -05:00
vmd.c pci-v6.19-changes 2025-12-04 17:29:41 -08:00