linux-stable/drivers/pci
Pali Rohár 661c399a65 PCI: aardvark: Fix checking for link up via LTSSM state
Current implementation of advk_pcie_link_up() is wrong as it marks also
link disabled or hot reset states as link up.

Fix it by marking link up only to those states which are defined in PCIe
Base specification 3.0, Table 4-14: Link Status Mapped to the LTSSM.

To simplify implementation, Define macros for every LTSSM state which
aardvark hardware can return in CFG_REG register.

Fix also checking for link training according to the same Table 4-14.
Define a new function advk_pcie_link_training() for this purpose.

Link: https://lore.kernel.org/r/20211005180952.6812-13-kabel@kernel.org
Fixes: 8c39d71036 ("PCI: aardvark: Add Aardvark PCI host controller driver")
Signed-off-by: Pali Rohár <pali@kernel.org>
Signed-off-by: Marek Behún <kabel@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Marek Behún <kabel@kernel.org>
Cc: stable@vger.kernel.org
Cc: Remi Pommarel <repk@triplefau.lt>
2021-10-07 14:27:59 +01:00
..
controller PCI: aardvark: Fix checking for link up via LTSSM state 2021-10-07 14:27:59 +01:00
endpoint pci-v5.15-changes 2021-09-07 19:13:42 -07:00
hotplug Merge branch 'pci/reset' 2021-09-02 14:56:42 -05:00
pcie pci-v5.15-changes 2021-09-07 19:13:42 -07:00
switch
access.c
ats.c PCI: Allow PASID on fake PCIe devices without TLP prefixes 2021-08-26 14:21:42 -05:00
bus.c
ecam.c
host-bridge.c PCI: VMD: ACPI: Make ACPI companion lookup work for VMD bus 2021-09-02 17:59:58 +02:00
iov.c Merge branch 'pci/virtualization' 2021-07-06 10:56:26 -05:00
irq.c
Kconfig
Makefile
mmap.c
msi.c Updates to the interrupt core and driver subsystems: 2021-08-30 14:38:37 -07:00
of.c PCI: of: Don't fail devm_pci_alloc_host_bridge() on missing 'ranges' 2021-08-04 12:20:00 +01:00
p2pdma.c Merge branch 'pci/sysfs' 2021-07-06 10:56:25 -05:00
pci-acpi.c PCI/ACPI: Don't reset a fwnode set by OF 2021-09-15 16:26:59 -05:00
pci-bridge-emul.c
pci-bridge-emul.h PCI: pci-bridge-emul: Add PCIe Root Capabilities Register 2021-08-05 10:51:49 +01:00
pci-driver.c VFIO update for v5.15-rc1 2021-09-02 13:41:33 -07:00
pci-label.c
pci-mid.c
pci-pf-stub.c
pci-stub.c
pci-sysfs.c pci-v5.15-changes 2021-09-07 19:13:42 -07:00
pci.c pci-v5.15-changes 2021-09-07 19:13:42 -07:00
pci.h pci-v5.15-changes 2021-09-07 19:13:42 -07:00
probe.c Merge branch 'remotes/lorenzo/pci/hyper-v' 2021-09-02 14:56:47 -05:00
proc.c pci-v5.15-changes 2021-09-07 19:13:42 -07:00
quirks.c PCI: Add AMD GPU multi-function power dependencies 2021-09-15 16:31:41 -05:00
remove.c PCI: Remove reset_fn field from pci_dev 2021-08-17 17:44:38 -05:00
rom.c
search.c
setup-bus.c
setup-irq.c
setup-res.c
slot.c
syscall.c PCI: Return int from pciconfig_read() syscall 2021-08-03 16:55:48 -05:00
vc.c
vpd.c PCI/VPD: Defer VPD sizing until first access 2021-09-15 16:26:13 -05:00
xen-pcifront.c Merge branch 'stable/for-linus-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb 2021-09-03 10:34:44 -07:00