linux-stable/drivers/pci
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
..
controller Revert "PCI: tegra194: Enable support for 256 Byte payload" 2023-09-13 09:47:56 +02:00
endpoint PCI: epf-test: Fix DMA transfer completion detection 2023-07-23 13:53:59 +02:00
hotplug PCI: acpiphp: Use pci_assign_unassigned_bridge_resources() only for non-root bus 2023-08-30 14:52:42 +02:00
msi PCI/MSI: Remove over-zealous hardware size check in pci_msix_validate_entries() 2023-04-16 14:11:51 +02:00
pcie PCI/ASPM: Avoid link retraining race 2023-08-03 10:25:44 +02:00
switch driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00
Kconfig
Makefile
access.c
ats.c
bus.c PCI: move OF status = "disabled" detection to dev->match_driver 2023-08-16 18:32:26 +02:00
doe.c PCI/DOE: Relax restrictions on request and response size 2023-04-18 10:36:58 -07:00
ecam.c
host-bridge.c
iov.c
irq.c
mmap.c
of.c PCI: move OF status = "disabled" detection to dev->match_driver 2023-08-16 18:32:26 +02:00
p2pdma.c PCI/P2PDMA: Fix pci_p2pmem_find_many() kernel-doc 2023-04-06 16:37:51 -05:00
pci-acpi.c PCI/ACPI: Call _REG when transitioning D-states 2023-07-05 18:30:30 +01:00
pci-bridge-emul.c
pci-bridge-emul.h
pci-driver.c PCI/PM: Drop pci_bridge_wait_for_secondary_bus() timeout parameter 2023-04-11 17:35:06 -05:00
pci-label.c
pci-mid.c
pci-pf-stub.c
pci-stub.c
pci-sysfs.c driver core: bus: mark the struct bus_type for sysfs callbacks as constant 2023-03-23 13:20:40 +01:00
pci.c PCI/PM: Avoid putting EloPOS E2/S2/H2 PCIe Ports in D3cold 2023-07-23 13:53:59 +02:00
pci.h cxl for v6.4 2023-04-30 11:51:51 -07:00
probe.c PCI: Release resource invalidated by coalescing 2023-07-23 13:53:59 +02:00
proc.c
quirks.c PCI: Add function 1 DMA alias quirk for Marvell 88SE9235 2023-07-23 13:53:59 +02:00
remove.c cxl for v6.4 2023-04-30 11:51:51 -07:00
rom.c
search.c
setup-bus.c PCI: Make pci_bus_for_each_resource() index optional 2023-04-05 15:10:09 -05:00
setup-irq.c
setup-res.c PCI: Introduce pci_dev_for_each_resource() 2023-04-04 10:43:52 -05:00
slot.c
syscall.c
vc.c
vgaarb.c PCI: Introduce pci_dev_for_each_resource() 2023-04-04 10:43:52 -05:00
vpd.c
xen-pcifront.c PCI: Introduce pci_dev_for_each_resource() 2023-04-04 10:43:52 -05:00