android_kernel_oneplus_msm8998/drivers/pci
Vidya Sagar dd47fd5ba8 PCI: tegra: Enable Relaxed Ordering only for Tegra20 & Tegra30
commit 7be142caabc4780b13a522c485abc806de5c4114 upstream.

The PCI Tegra controller conversion to a device tree configurable
driver in commit d1523b52bf ("PCI: tegra: Move PCIe driver
to drivers/pci/host") implied that code for the driver can be
compiled in for a kernel supporting multiple platforms.

Unfortunately, a blind move of the code did not check that some of the
quirks that were applied in arch/arm (eg enabling Relaxed Ordering on
all PCI devices - since the quirk hook erroneously matches PCI_ANY_ID
for both Vendor-ID and Device-ID) are now applied in all kernels that
compile the PCI Tegra controlled driver, DT and ACPI alike.

This is completely wrong, in that enablement of Relaxed Ordering is only
required by default in Tegra20 platforms as described in the Tegra20
Technical Reference Manual (available at
https://developer.nvidia.com/embedded/downloads#?search=tegra%202 in
Section 34.1, where it is mentioned that Relaxed Ordering bit needs to
be enabled in its root ports to avoid deadlock in hardware) and in the
Tegra30 platforms for the same reasons (unfortunately not documented
in the TRM).

There is no other strict requirement on PCI devices Relaxed Ordering
enablement on any other Tegra platforms or PCI host bridge driver.

Fix this quite upsetting situation by limiting the vendor and device IDs
to which the Relaxed Ordering quirk applies to the root ports in
question, reported above.

Signed-off-by: Vidya Sagar <vidyas@nvidia.com>
[lorenzo.pieralisi@arm.com: completely rewrote the commit log/fixes tag]
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-12 19:13:24 +01:00
..
host PCI: tegra: Enable Relaxed Ordering only for Tegra20 & Tegra30 2019-11-12 19:13:24 +01:00
hotplug PCI: rpadlpar: Fix leaked device_node references in add/remove paths 2019-06-22 08:18:21 +02:00
pcie PCI/AER: Report non-fatal errors only to the affected endpoint 2017-12-25 14:22:15 +01:00
access.c PCI: Use function 0 VPD for identical functions, regular VPD for others 2015-09-24 17:06:32 -05:00
ats.c PCI: Remove pci_ats_enabled() 2015-08-13 15:59:59 -05:00
bus.c PCI: Fix minimum allocation address overwrite 2016-02-17 12:30:56 -08:00
host-bridge.c
hotplug-pci.c
htirq.c
iov.c PCI: Create SR-IOV virtfn/physfn links before attaching driver 2017-12-25 14:22:14 +01:00
irq.c
Kconfig PCI,parisc: Enable 64-bit bus addresses on PA-RISC 2015-09-08 15:30:47 +02:00
Makefile PCI: Build setup-irq.o for arm64 2015-08-20 12:02:49 -05:00
msi.c genirq/msi: Make sure PCI MSIs are activated early 2016-09-07 08:32:38 +02:00
of.c PCI/MSI: Use of_msi_get_domain instead of open-coded "msi-parent" parsing 2015-10-16 13:07:14 +01:00
pci-acpi.c ACPI / PCI: Bail early in acpi_pci_add_bus() if there is no ACPI handle 2018-08-09 12:19:28 +02:00
pci-driver.c PCI: Restore config space on runtime resume despite being unbound 2018-05-30 07:49:12 +02:00
pci-label.c
pci-stub.c
pci-sysfs.c PCI: sysfs: Ignore lockdep for remove attribute 2019-08-04 09:34:57 +02:00
pci.c PCI: PM: Fix pci_power_up() 2019-10-29 09:13:32 +01:00
pci.h PCI: Remove pci_resource_bar() and pci_iov_resource_bar() 2017-03-30 09:35:19 +02:00
probe.c PCI: Skip MPS logic for Virtual Functions (VFs) 2018-08-24 13:27:01 +02:00
proc.c
quirks.c PCI: Mark Atheros AR9462 to avoid bus reset 2019-06-11 12:23:48 +02:00
remove.c PCI: Detach driver before procfs & sysfs teardown on device remove 2017-12-20 10:05:00 +01:00
rom.c PCI: Add comments about ROM BAR updating 2017-03-30 09:35:19 +02:00
search.c
setup-bus.c PCI: Handle IORESOURCE_PCI_FIXED when assigning resources 2015-10-29 17:35:39 -05:00
setup-irq.c
setup-res.c PCI: Make PCI_ROM_ADDRESS_MASK a 32-bit constant 2018-04-08 11:51:57 +02:00
slot.c PCI: Hold pci_slot_mutex while searching bus->slots list 2015-07-30 16:19:53 -05:00
syscall.c
vc.c
vpd.c
xen-pcifront.c xen/pcifront: Fix mysterious crashes when NUMA locality information was extracted. 2016-03-03 15:07:30 -08:00