linux/drivers/pci/host
Murali Karicheri a782b5f986 PCI: designware: Check for iATU unroll only on platforms that use ATU
Previously we checked for iATU unroll support by reading PCIE_ATU_VIEWPORT
even on platforms, e.g., Keystone, that do not have ATU ports.  This can
cause bad behavior such as asynchronous external aborts:

  OF: PCI:   MEM 0x60000000..0x6fffffff -> 0x60000000
  Unhandled fault: asynchronous external abort (0x1211) at 0x00000000
  pgd = c0003000
  [00000000] *pgd=80000800004003, *pmd=00000000
  Internal error: : 1211 [#1] PREEMPT SMP ARM
  Modules linked in:
  CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.9.0-00009-g6ff59d2-dirty #7
  Hardware name: Keystone
  task: eb878000 task.stack: eb866000
  PC is at dw_pcie_setup_rc+0x24/0x380
  LR is at ks_pcie_host_init+0x10/0x170

Move the dw_pcie_iatu_unroll_enabled() check so we only call it on
platforms that do not use the ATU.  These platforms supply their own
->rd_other_conf() and ->wr_other_conf() methods.

[bhelgaas: changelog]
Fixes: a0601a4705 ("PCI: designware: Add iATU Unroll feature")
Fixes: 416379f9eb ("PCI: designware: Check for iATU unroll support after initializing host")
Tested-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-By: Joao Pinto <jpinto@synopsys.com>
CC: stable@vger.kernel.org	# v4.9+
2017-01-10 08:43:24 -06:00
..
Kconfig Merge branch 'pci/host-vmd' into next 2016-12-12 11:25:13 -06:00
Makefile PCI: Explain ARM64 ACPI/MCFG quirk Kconfig and build strategy 2016-12-07 14:34:58 -06:00
pci-aardvark.c PCI: aardvark: Remove unused platform data 2016-10-11 19:44:04 -05:00
pci-dra7xx.c PCI: dra7xx: Reorder struct dra7xx_pcie 2016-10-12 00:05:54 -05:00
pci-exynos.c PCI: exynos: Reorder struct exynos_pcie 2016-10-11 21:30:52 -05:00
pci-host-common.c Merge branch 'pci/enumeration' into next 2016-10-03 09:43:19 -05:00
pci-host-generic.c Merge branches 'pci/demodularize-hosts' and 'pci/host-request-windows' into next 2016-08-01 12:23:57 -05:00
pci-hyperv.c PCI: hv: Allocate physically contiguous hypercall params buffer 2016-11-29 17:22:43 -06:00
pci-imx6.c PCI: imx6: Remove unused return values 2016-10-11 22:26:28 -05:00
pci-keystone-dw.c PCI: keystone: Add app register accessors 2016-10-11 22:58:34 -05:00
pci-keystone.c PCI: keystone: Pass keystone_pcie, not address, to IRQ functions 2016-10-11 22:56:46 -05:00
pci-keystone.h PCI: keystone: Reorder struct keystone_pcie 2016-10-11 22:58:43 -05:00
pci-layerscape.c Merge branch 'pci/host-rockchip' into next 2016-12-12 11:25:11 -06:00
pci-mvebu.c PCI: mvebu: Use existing of_node pointer 2016-10-11 23:19:05 -05:00
pci-rcar-gen2.c PCI: rcar-gen2: Use gen2 fallback compatibility last 2016-12-07 16:56:02 -06:00
pci-tegra.c PCI: tegra: Add Tegra210 support 2016-12-07 12:06:42 -06:00
pci-thunder-ecam.c PCI: Add MCFG quirks for Cavium ThunderX pass1.x host controller 2016-12-06 13:45:50 -06:00
pci-thunder-pem.c PCI: Add MCFG quirks for Cavium ThunderX pass2.x host controller 2016-12-06 13:45:49 -06:00
pci-versatile.c PCI: versatile: Fix pci_remap_iospace() failure path 2016-09-06 12:41:15 -05:00
pci-xgene-msi.c PCI/xgene-msi: Convert to hotplug state machine 2016-11-22 23:34:40 +01:00
pci-xgene.c PCI: Add MCFG quirks for X-Gene host controller 2016-12-06 13:45:50 -06:00
pcie-altera-msi.c Merge branches 'pci/host-aardvark', 'pci/host-altera', 'pci/host-artpec', 'pci/host-designware', 'pci/host-hv', 'pci/host-keystone', 'pci/host-rcar', 'pci/host-rockchip', 'pci/host-tegra' and 'pci/host-xilinx' into next 2016-10-05 13:59:14 -05:00
pcie-altera.c PCI: altera: Remove redundant error message in altera_pcie_parse_dt() 2016-11-11 15:20:03 -06:00
pcie-armada8k.c PCI: armada: Reorder struct armada8k_pcie 2016-10-11 20:33:01 -05:00
pcie-artpec6.c PCI: artpec6: Add resource name comments 2016-10-11 20:49:40 -05:00
pcie-designware-plat.c PCI: designware-plat: Update author email 2016-11-16 16:16:40 -06:00
pcie-designware.c PCI: designware: Check for iATU unroll only on platforms that use ATU 2017-01-10 08:43:24 -06:00
pcie-designware.h PCI: designware: Export dw_pcie_readl_rc(), dw_pcie_writel_rc() 2016-10-11 08:31:52 -05:00
pcie-hisi.c Merge branch 'pci/host-hisi' into next 2016-12-12 11:25:07 -06:00
pcie-iproc-bcma.c PCI: iproc: Add BCMA type 2016-11-14 15:55:33 -06:00
pcie-iproc-msi.c PCI: iproc: Add BCMA type 2016-11-14 15:55:33 -06:00
pcie-iproc-platform.c PCI: iproc: Skip check for legacy IRQ on PAXC buses 2016-12-08 12:24:20 -06:00
pcie-iproc.c PCI: iproc: Skip check for legacy IRQ on PAXC buses 2016-12-08 12:24:20 -06:00
pcie-iproc.h PCI: iproc: Add support for the next-gen PAXB controller 2016-11-23 16:51:14 -06:00
pcie-qcom.c Merge branch 'pci/host-rockchip' into next 2016-12-12 11:25:11 -06:00
pcie-rcar.c PCI: rcar: Add gen3 fallback compatibility string for pcie-rcar 2016-12-07 16:56:56 -06:00
pcie-rockchip.c Merge branch 'pci/host-rockchip' into next 2016-12-12 11:25:11 -06:00
pcie-spear13xx.c PCI: spear: Use builtin_platform_driver() to simplify the code 2016-12-07 14:32:30 -06:00
pcie-xilinx-nwl.c PCI: xilinx-nwl: Remove unused platform data 2016-10-12 00:00:51 -05:00
pcie-xilinx.c PCI: xilinx: Removed unused xilinx_pcie_assign_msi() argument 2016-10-12 00:00:00 -05:00
vmd.c PCI: vmd: Fix suspend handlers defined-but-not-used warning 2016-12-07 12:17:27 -06:00