linux/drivers/pci/host
Shawn Lin dc8cca5ef2 PCI: rockchip: Use normal register bank for config accessors
Rockchip's RC has two banks of registers for the root port: a normal bank
that is strictly compatible with the PCIe spec, and a privileged bank that
can be used to change RO bits of root port registers.

When probing the RC driver, we use the privileged bank to do some basic
setup work as some RO bits are hw-inited to wrong value.  But we didn't
change to the normal bank after probing the driver.

This leads to a serious problem when the PME code tries to clear the PME
status by writing PCI_EXP_RTSTA_PME to the register of PCI_EXP_RTSTA.  Per
PCIe 3.0 spec, section 7.8.14, the PME status bit is RW1C.  So the PME code
is doing the right thing to clear the PME status but we find the RC doesn't
clear it but actually setting it to one.  So finally the system trap in
pcie_pme_work_fn() as PCI_EXP_RTSTA_PME is true now forever.  This issue
can be reproduced by booting kernel with pci=nomsi.

Use the normal register bank for the PCI config accessors.  The privileged
bank is used only internally by this driver.

Fixes: e77f847d ("PCI: rockchip: Add Rockchip PCIe controller support")
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Cc: stable@vger.kernel.org
Cc: Jeffy Chen <jeffy.chen@rock-chips.com>
Cc: Brian Norris <briannorris@chromium.org>
2017-07-03 08:12:19 -05:00
..
Kconfig Merge branch 'pci/host-rockchip' into next 2017-04-28 10:33:10 -05:00
Makefile PCI: faraday: Add Faraday Technology FTPCI100 PCI Host Bridge driver 2017-03-24 10:31:17 -05:00
pci-aardvark.c PCI: aardvark: Convert PCI scan API to pci_scan_root_bus_bridge() 2017-07-02 16:14:23 -05:00
pci-ftpci100.c PCI: faraday: Drop pci_fixup_irqs() 2017-07-02 16:51:19 -05:00
pci-host-common.c PCI: generic: Drop pci_fixup_irqs() 2017-07-02 16:51:19 -05:00
pci-host-generic.c PCI: Don't allow unbinding host controllers that aren't prepared 2017-04-28 10:38:00 -05:00
pci-hyperv.c PCI: hv: Convert hv_pci_dev.refs from atomic_t to refcount_t 2017-04-18 09:02:48 -05:00
pci-mvebu.c Merge branch 'pci/msi' into next 2017-04-28 10:34:19 -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: Drop pci_fixup_irqs() 2017-07-02 16:51:17 -05:00
pci-thunder-ecam.c PCI: Don't allow unbinding host controllers that aren't prepared 2017-04-28 10:38:00 -05:00
pci-thunder-pem.c PCI: Don't allow unbinding host controllers that aren't prepared 2017-04-28 10:38:00 -05:00
pci-versatile.c PCI: versatile: Drop pci_fixup_irqs() 2017-07-02 16:51:19 -05:00
pci-xgene-msi.c PCI/MSI: pci-xgene-msi: Fix CPU hotplug registration handling 2017-01-17 08:41:51 -06:00
pci-xgene.c PCI: xgene: Move to struct pci_host_bridge IRQ mapping functions 2017-07-02 16:51:19 -05: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: Drop pci_fixup_irqs() 2017-07-02 16:51:19 -05:00
pcie-iproc-bcma.c PCI: iproc: Convert PCI scan API to pci_scan_root_bus_bridge() 2017-07-02 16:14:24 -05:00
pcie-iproc-msi.c PCI: iproc: Add BCMA type 2016-11-14 15:55:33 -06:00
pcie-iproc-platform.c PCI: iproc: Convert PCI scan API to pci_scan_root_bus_bridge() 2017-07-02 16:14:24 -05:00
pcie-iproc.c PCI: iproc: Drop pci_fixup_irqs() 2017-07-02 16:51:18 -05:00
pcie-iproc.h PCI: iproc: Save host bridge window resource in struct iproc_pcie 2017-03-09 11:27:07 -06:00
pcie-rcar.c PCI: rcar: Drop pci_fixup_irqs() 2017-07-02 16:51:18 -05:00
pcie-rockchip.c PCI: rockchip: Use normal register bank for config accessors 2017-07-03 08:12:19 -05:00
pcie-xilinx-nwl.c PCI: xilinx-nwl: Move to struct pci_host_bridge IRQ mapping functions 2017-07-02 16:51:20 -05:00
pcie-xilinx.c PCI: xilinx: Drop pci_fixup_irqs() 2017-07-02 16:51:17 -05:00
vmd.c treewide: Constify most dma_map_ops structures 2017-01-24 12:23:35 -05:00