linux-stable/drivers/pci/controller
Huacai Chen 8b3517f88f PCI: loongson: Prevent LS7A MRRS increases
Except for isochronous-configured devices, software may set
Max_Read_Request_Size (MRRS) to any value up to 4096.  If a device issues a
read request with size greater than the completer's Max_Payload_Size (MPS),
the completer is required to break the response into multiple completions.

Instead of correctly responding with multiple completions to a large read
request, some LS7A Root Ports respond with a Completer Abort.  To prevent
this, the MRRS must be limited to an implementation-specific value.

The OS cannot detect that value, so rely on BIOS to configure MRRS before
booting, and quirk the Root Ports so we never set an MRRS larger than that
BIOS value for any downstream device.

N.B. Hot-added devices are not configured by BIOS, and they power up with
MRRS = 512 bytes, so these devices will be limited to 512 bytes.  If the
LS7A limit is smaller, those hot-added devices may not work correctly, but
per [1], hotplug is not supported with this chipset revision.

[1] https://lore.kernel.org/r/073638a7-ae68-2847-ac3d-29e5e760d6af@loongson.cn

[bhelgaas: commit log]
Link: https://bugzilla.kernel.org/show_bug.cgi?id=216884
Link: https://lore.kernel.org/r/20230201043018.778499-3-chenhuacai@loongson.cn
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
2023-02-01 12:49:29 -06:00
..
cadence PCI: Remove unnecessary <linux/of_irq.h> includes 2022-11-10 14:53:51 -06:00
dwc phy-for-6.2 2022-12-19 08:40:58 -06:00
mobiveil PCI/MSI: Get rid of PCI_MSI_IRQ_DOMAIN 2022-11-17 15:15:19 +01:00
Kconfig PCI/MSI: Get rid of PCI_MSI_IRQ_DOMAIN 2022-11-17 15:15:19 +01:00
Makefile Merge branch 'pci/host/mt7621' 2021-11-05 11:28:51 -05:00
pci-aardvark.c PCI: aardvark: Switch to using devm_gpiod_get_optional() 2022-12-07 08:19:53 -06:00
pci-ftpci100.c PCI: Drop of_match_ptr() to avoid unused variables 2022-11-17 13:32:21 -06:00
pci-host-common.c
pci-host-generic.c
pci-hyperv-intf.c
pci-hyperv.c Updates for the interrupt core and driver subsystem: 2022-12-12 11:21:29 -08:00
pci-ixp4xx.c ARM: ixp4xx: fix building both pci drivers 2021-08-12 23:10:09 +02:00
pci-loongson.c PCI: loongson: Prevent LS7A MRRS increases 2023-02-01 12:49:29 -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-v6.2-changes 2022-12-14 09:54:10 -08:00
pci-thunder-ecam.c PCI: thunder: Drop error data fabrication when config read fails 2021-11-18 13:39:32 -06:00
pci-thunder-pem.c PCI: thunder: Drop error data fabrication when config read fails 2021-11-18 13:39:32 -06:00
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: versatile: Remove redundant variable retval 2022-04-28 10:46:37 +01: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 Merge branch 'pci/driver-cleanup' 2022-01-13 09:57:53 -06:00
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
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: Convert to new *_PM_OPS macros 2022-07-27 11:56:17 -05:00
pcie-microchip-host.c PCI: Remove unnecessary <linux/of_irq.h> includes 2022-11-10 14:53:51 -06:00
pcie-mt7621.c PCI: mt7621: Add sentinel to quirks table 2022-12-06 12:04:23 +01:00
pcie-rcar-ep.c PCI: rcar-ep: Remove unneeded includes 2021-10-08 09:41:38 -05:00
pcie-rcar-host.c PCI: Convert to new *_PM_OPS macros 2022-07-27 11:56:17 -05:00
pcie-rcar.c
pcie-rcar.h PCI: rcar: Add L1 link state fix into data abort hook 2021-08-16 14:51:30 +01:00
pcie-rockchip-ep.c PCI: rockchip: Fix find_first_zero_bit() limit 2022-04-08 14:42:07 +01:00
pcie-rockchip-host.c PCI: Remove unnecessary <linux/of_irq.h> includes 2022-11-10 14:53:51 -06:00
pcie-rockchip.c
pcie-rockchip.h PCI: Add defines for normal and subtractive PCI bridges 2022-02-17 15:29:35 -06: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 PCI: xilinx: Rename xilinx_pcie_port to xilinx_pcie 2022-01-03 15:05:28 -06:00
vmd.c PCI: vmd: Fix secondary bus reset for Intel bridges 2022-12-06 11:45:25 +01:00