linux-stable/drivers/pci/controller
Vidya Sagar 44191fb06d Revert "PCI: tegra194: Enable support for 256 Byte payload"
commit ebfde1584d upstream.

After commit 4fb8e46c1b ("PCI: tegra194: Enable support for 256 Byte
payload"), we initialize MPS=256 for tegra194 Root Ports before enumerating
the hierarchy.

Consider an Endpoint that supports only MPS=128.  In the default situation
(CONFIG_PCIE_BUS_DEFAULT set and no "pci=pcie_bus_*" parameter), Linux
tries to configure the MPS of every device to match the upstream bridge.
If the Endpoint is directly below the Root Port, Linux can reduce the Root
Port MPS to 128 to match the Endpoint.  But if there's a switch in the
middle, Linux doesn't reduce the Root Port MPS because other devices below
the switch may already be configured with MPS larger than 128.

This scenario results in uncorrectable Malformed TLP errors if the Root
Port sends TLPs with payloads larger than 128 bytes.  These errors can
be avoided by using the "pci=pcie_bus_safe" parameter, but it doesn't
seem to be a good idea to always have this parameter even for basic
functionality to work.

Revert commit 4fb8e46c1b ("PCI: tegra194: Enable support for 256 Byte
payload") so the Root Ports default to MPS=128, which all devices
support.

If peer-to-peer DMA is not required, one can use "pci=pcie_bus_perf" to
get the benefit of larger MPS settings.

[bhelgaas: commit log; kwilczynski: retain "u16 val_16" declaration at
the top, add missing acked by tag]
Fixes: 4fb8e46c1b ("PCI: tegra194: Enable support for 256 Byte payload")
Link: https://lore.kernel.org/linux-pci/20230619102604.3735001-1-vidyas@nvidia.com
Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Cc: stable@vger.kernel.org # v6.0-rc1+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-09-13 09:47:56 +02:00
..
cadence PCI: cadence: Fix Gen2 Link Retraining process 2023-07-19 16:36:09 +02:00
dwc Revert "PCI: tegra194: Enable support for 256 Byte payload" 2023-09-13 09:47:56 +02:00
mobiveil PCI: mobiveil: Sort Kconfig entries by vendor 2023-04-20 16:18:05 -05:00
Kconfig Revert "PCI: mvebu: Mark driver as BROKEN" 2023-08-16 18:32:22 +02:00
Makefile
pci-aardvark.c PCI: aardvark: Switch to using devm_gpiod_get_optional() 2022-12-07 08:19:53 -06:00
pci-ftpci100.c PCI: ftpci100: Release the clock resources 2023-07-19 16:36:10 +02:00
pci-host-common.c
pci-host-generic.c
pci-hyperv-intf.c
pci-hyperv.c PCI: hv: Add a per-bus mutex state_lock 2023-06-18 03:05:40 +00:00
pci-ixp4xx.c PCI: ixp4xx: Use PCI_CONF1_ADDRESS() macro 2023-03-24 16:48:32 +01:00
pci-loongson.c PCI: loongson: Add more devices that need MRRS quirk 2023-02-13 15:29:27 -06:00
pci-mvebu.c Merge branch 'pci/kbuild' 2022-12-10 10:36:52 -06:00
pci-rcar-gen2.c PCI: rcar-gen2: Add RZ/N1 SOC family compatible string 2022-06-23 17:37:05 -05:00
pci-tegra.c PCI: Use of_property_present() for testing DT property presence 2023-04-18 16:01:37 -05:00
pci-thunder-ecam.c
pci-thunder-pem.c
pci-v3-semi.c PCI: Drop of_match_ptr() to avoid unused variables 2022-11-17 13:32:21 -06:00
pci-versatile.c PCI: Remove MODULE_LICENSE so boolean drivers don't look like modules 2023-02-17 08:47:58 -06:00
pci-xgene-msi.c PCI: Remove unnecessary <linux/of_irq.h> includes 2022-11-10 14:53:51 -06:00
pci-xgene.c PCI: Remove unnecessary <linux/of_irq.h> includes 2022-11-10 14:53:51 -06:00
pcie-altera-msi.c PCI: Remove unnecessary <linux/of_irq.h> includes 2022-11-10 14:53:51 -06:00
pcie-altera.c
pcie-apple.c PCI: apple: Do not leak reset GPIO on unbind/unload/error 2022-09-14 17:45:47 +02:00
pcie-brcmstb.c PCI: brcmstb: Set RCB_{MPS,64B}_MODE bits 2022-11-11 11:42:05 +01:00
pcie-hisi-error.c PCI: Remove MODULE_LICENSE so boolean drivers don't look like modules 2023-02-17 08:47:58 -06:00
pcie-iproc-bcma.c PCI: Add defines for normal and subtractive PCI bridges 2022-02-17 15:29:35 -06:00
pcie-iproc-msi.c PCI: iproc: Use bitmap API to allocate bitmaps 2022-07-05 15:02:56 -05:00
pcie-iproc-platform.c PCI: Remove unnecessary <linux/of_irq.h> includes 2022-11-10 14:53:51 -06:00
pcie-iproc.c PCI: Remove unnecessary <linux/of_irq.h> includes 2022-11-10 14:53:51 -06:00
pcie-iproc.h
pcie-mediatek-gen3.c PCI: mediatek-gen3: Change driver name to mtk-pcie-gen3 2022-08-23 14:58:49 +02:00
pcie-mediatek.c PCI: Use of_property_present() for testing DT property presence 2023-04-18 16:01:37 -05:00
pcie-microchip-host.c PCI: Remove MODULE_LICENSE so boolean drivers don't look like modules 2023-02-17 08:47:58 -06:00
pcie-mt7621.c PCI: mt7621: Use dev_info() to log PCIe card detection 2023-03-24 16:36:22 +01:00
pcie-rcar-ep.c
pcie-rcar-host.c PCI: rcar: Avoid defines prefixed with CONFIG 2023-03-10 13:34:27 +01:00
pcie-rcar.c
pcie-rcar.h PCI: rcar: Avoid defines prefixed with CONFIG 2023-03-10 13:34:27 +01:00
pcie-rockchip-ep.c PCI: rockchip: Don't advertise MSI-X in PCIe capabilities 2023-08-03 10:25:44 +02:00
pcie-rockchip-host.c PCI: Remove unnecessary <linux/of_irq.h> includes 2022-11-10 14:53:51 -06:00
pcie-rockchip.c PCI: rockchip: Add poll and timeout to wait for PHY PLLs to be locked 2023-07-23 13:54:00 +02:00
pcie-rockchip.h PCI: rockchip: Don't advertise MSI-X in PCIe capabilities 2023-08-03 10:25:44 +02:00
pcie-xilinx-cpm.c PCI: Remove unnecessary <linux/of_irq.h> includes 2022-11-10 14:53:51 -06:00
pcie-xilinx-nwl.c Merge branch 'pci/kbuild' 2022-12-10 10:36:52 -06:00
pcie-xilinx.c
vmd.c PCI: vmd: Fix uninitialized variable usage in vmd_enable_domain() 2023-07-19 16:36:17 +02:00